Get the names of metadata fields from an image dataset's header(s)

header_fields(img_data)

Arguments

img_data

Image data returned by e.g. read_dicom or read_nifti1

Value

Vector of header field names

Examples

data(sample_dicom_img)
data(sample_nifti_img)
header_fields(sample_dicom_img)
#>  [1] "AccessionNumber"              "AcquisitionMatrix"           
#>  [3] "AcquisitionNumber"            "BitsAllocated"               
#>  [5] "BitsStored"                   "Columns"                     
#>  [7] "ContentDate"                  "ContentTime"                 
#>  [9] "ContrastBolusAgent"           "DeidentificationMethod"      
#> [11] "EchoTime"                     "EchoTraInLength"             
#> [13] "FileMetaInformationVersion"   "FlipAngle"                   
#> [15] "FrameOfReferenceUID"          "GroupLength"                 
#> [17] "HighBit"                      "ImageOrientationPatient"     
#> [19] "ImagePositionPatient"         "ImagesInAcquisition"         
#> [21] "ImageType"                    "ImagingFrequency"            
#> [23] "ImplementationClassUID"       "ImplementationVersionName"   
#> [25] "InstanceCreationDate"         "InstanceCreationTime"        
#> [27] "InstanceCreatorUID"           "InstanceNumber"              
#> [29] "MagneticFieldStrength"        "Manufacturer"                
#> [31] "ManufacturersModelName"       "MediaStorageSOPClassUID"     
#> [33] "MediaStorageSOPInstanceUID"   "Modality"                    
#> [35] "MRAcquisitionType"            "NumberOfAverages"            
#> [37] "NumberOfTemporalPositions"    "PatientID"                   
#> [39] "PatientIdentityRemoved"       "PatientPosition"             
#> [41] "PatientsAge"                  "PatientsBirthDate"           
#> [43] "PatientsName"                 "PatientsSex"                 
#> [45] "PatientsWeight"               "PercentPhaseFieldOfView"     
#> [47] "PhotometricInterpretation"    "PixelData"                   
#> [49] "PixelRepresentation"          "PixelSpacing"                
#> [51] "PositionReferenceIndicator"   "ProtocolName"                
#> [53] "ReferringPhysiciansName"      "RepetitionTime"              
#> [55] "Rows"                         "SamplesperPixel"             
#> [57] "ScanningSequence"             "ScanOptions"                 
#> [59] "SequenceVariant"              "SeriesDate"                  
#> [61] "SeriesDescription"            "SeriesInstanceUID"           
#> [63] "SeriesNumber"                 "SeriesTime"                  
#> [65] "SliceLocation"                "SliceThickness"              
#> [67] "SoftwareVersions"             "SOPClassUID"                 
#> [69] "SOPInstanceUID"               "SourceApplicationEntityTitle"
#> [71] "SpecificCharacterSet"         "StudyDate"                   
#> [73] "StudyDescription"             "StudyID"                     
#> [75] "StudyInstanceUID"             "StudyTime"                   
#> [77] "TemporalPositionIdentifier"   "TemporalResolution"          
#> [79] "TimezoneOffsetFromUTC"        "TransferSyntaxUID"           
#> [81] "WindowCenter"                 "WindowWidth"                 
header_fields(sample_nifti_img)
#>  [1] ".Data"          "sizeof_hdr"     "data_type"      "db_name"       
#>  [5] "extents"        "session_error"  "regular"        "dim_info"      
#>  [9] "dim_"           "intent_p1"      "intent_p2"      "intent_p3"     
#> [13] "intent_code"    "datatype"       "bitpix"         "slice_start"   
#> [17] "pixdim"         "vox_offset"     "scl_slope"      "scl_inter"     
#> [21] "slice_end"      "slice_code"     "xyzt_units"     "cal_max"       
#> [25] "cal_min"        "slice_duration" "toffset"        "glmax"         
#> [29] "glmin"          "descrip"        "aux_file"       "qform_code"    
#> [33] "sform_code"     "quatern_b"      "quatern_c"      "quatern_d"     
#> [37] "qoffset_x"      "qoffset_y"      "qoffset_z"      "srow_x"        
#> [41] "srow_y"         "srow_z"         "intent_name"    "magic"         
#> [45] "extender"       "reoriented"