DicomMetadata {tractor.base} | R Documentation |
This class represents DICOM metadata, which typically contains detailed information about the scan parameters and subject. Only DICOM files from magnetic resonance scanners are supported.
newDicomMetadataFromFile(fileName, checkFormat = TRUE, dictionary = NULL) isDicomMetadata(object) ## S3 method for class 'metadata.dicom': print(x, descriptions = FALSE, ...)
fileName |
The name of a DICOM file. |
checkFormat |
If TRUE, the function will check for the magic string "DICM" at byte offset 128. This string should be present, but in reality not all files contain it. |
dictionary |
A tag dictionary to use when reading the file. If NULL then the built-in dictionary will be loaded and used. |
object |
Any object. |
x |
Object of class metadata.dicom . |
descriptions |
Logical value: should tag descriptions be given? Numeric tag numbers are printed if this is FALSE (the default). |
... |
Further options to print (though none are supported for this type of object). |
Tag descriptions and types are read from the DICOM dictionary
.
newDicomMetadataFromFile
returns a DicomMetadata object, or NULL on failure. isDicomMetadata
returns TRUE if object
is a DicomMetadata object. print.metadata.dicom
is only called for its side-effect.
A DicomMetadata object is a list object (see list.object
) with class c("metadata.dicom", "list.object", "list")
and the following function elements.
getAvailableTags() |
Retrieve a list of lists representing all available tags. Each element of the outer list has identifying elements "group" and "element". See the DICOM standard for more information. |
getDataLength() |
Retrieve the length of the data part of the DICOM file in bytes. |
getDataOffset() |
Retrieve the byte offset of the data in the DICOM file. |
getEndianness() |
Retrieve the endianness of the file: "big" or "little". |
getSource() |
Retrieve the name of the source file. |
getTagOffset() |
Retrieve the byte offset of useful tags in the file. |
getTagValue(group, element) |
Retrieve the value of the tag with specified group and element numbers, usually given in hex. |
nTags() |
Retrieve the number of tags stored in this object. |
Jon Clayden
The DICOM standard, found online at http://medical.nema.org/. (Warning: may produce headaches!) Also dictionary
, and newMriImageFromDicom
for information on how to create MriImage objects from DICOM files.