Get the values of header attributes that are constant across slices

dicom_constant_header_values(dicom_data, numeric = TRUE)

Arguments

dicom_data

DICOM data returned by read_dicom

numeric

Convert number values to numeric instead of strings

Value

List of field values that are constant across all slices. List identifiers are field names and values are the common attribute values. Fields that are included more than once in the header are excluded from the return list.

Examples

data(sample_dicom_img)
dicom_constant_header_values(sample_dicom_img)
#> Warning: `funs()` was deprecated in dplyr 0.8.0.
#> Please use a list of either functions or lambdas: 
#> 
#>   # Simple named list: 
#>   list(mean = mean, median = median)
#> 
#>   # Auto named with `tibble::lst()`: 
#>   tibble::lst(mean, median)
#> 
#>   # Using lambdas
#>   list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_warnings()` to see where this warning was generated.
#> $FileMetaInformationVersion
#> [1] "\001"
#> 
#> $MediaStorageSOPClassUID
#> [1] "1.2.840.10008.5.1.4.1.1.4"
#> 
#> $TransferSyntaxUID
#> [1] "1.2.840.10008.1.2.1"
#> 
#> $ImplementationClassUID
#> [1] "1.3.6.1.4.1.5962.2"
#> 
#> $ImplementationVersionName
#> [1] "DCTOOL100"
#> 
#> $SourceApplicationEntityTitle
#> [1] "CLUNIE1"
#> 
#> $SpecificCharacterSet
#> [1] "ISO_IR 100"
#> 
#> $ImageType
#> [1] "ORIGINAL PRIMARY OTHER"
#> 
#> $InstanceCreationDate
#> [1] 20040624
#> 
#> $InstanceCreatorUID
#> [1] "1.3.6.1.4.1.5962.3"
#> 
#> $SOPClassUID
#> [1] "1.2.840.10008.5.1.4.1.1.4"
#> 
#> $StudyDate
#> [1] 20030505
#> 
#> $SeriesDate
#> [1] 20030505
#> 
#> $ContentDate
#> [1] 20030505
#> 
#> $Modality
#> [1] "MR"
#> 
#> $Manufacturer
#> [1] "Philips Medical Systems, Inc."
#> 
#> $ReferringPhysiciansName
#> [1] ""
#> 
#> $TimezoneOffsetFromUTC
#> [1] 0
#> 
#> $SeriesDescription
#> [1] "FAST LOCALIZER"
#> 
#> $ManufacturersModelName
#> [1] "Eclipse 1.5T"
#> 
#> $PatientsName
#> [1] "Doe Peter"
#> 
#> $PatientID
#> [1] 98890234
#> 
#> $PatientsBirthDate
#> [1] ""
#> 
#> $PatientsSex
#> [1] "M"
#> 
#> $PatientsAge
#> [1] "045Y"
#> 
#> $PatientsWeight
#> [1] 81.6327
#> 
#> $PatientIdentityRemoved
#> [1] "YES"
#> 
#> $DeidentificationMethod
#> [1] "dcanon no identifiers keep descriptions keep manufacturer keep retired keep private no uids keep pet demographics keep dates dcdtchg change dates"
#> 
#> $ContrastBolusAgent
#> [1] ""
#> 
#> $ScanningSequence
#> [1] "GR"
#> 
#> $ScanOptions
#> [1] ""
#> 
#> $MRAcquisitionType
#> [1] ""
#> 
#> $SliceThickness
#> [1] 10
#> 
#> $EchoTime
#> [1] 3.7
#> 
#> $NumberOfAverages
#> [1] 1
#> 
#> $ImagingFrequency
#> [1] 63.6978
#> 
#> $MagneticFieldStrength
#> [1] 1.5
#> 
#> $EchoTraInLength
#> [1] 1
#> 
#> $PercentPhaseFieldOfView
#> [1] 100
#> 
#> $SoftwareVersions
#> [1] "VIA5.2"
#> 
#> $ProtocolName
#> [1] "FAST LOCALIZER"
#> 
#> $AcquisitionMatrix
#> [1] 256
#> 
#> $FlipAngle
#> [1] 20
#> 
#> $PatientPosition
#> [1] "HFS"
#> 
#> $SeriesNumber
#> [1] 1
#> 
#> $AcquisitionNumber
#> [1] 2
#> 
#> $InstanceNumber
#> [1] 1
#> 
#> $ImagePositionPatient
#> [1] "0.000000e+00 -1.750000e+02 1.750000e+02"
#> 
#> $ImageOrientationPatient
#> [1] "0.00000e+00 1.00000e+00 -0.00000e+00 -0.00000e+00 0.00000e+00 -1.00000e+00"
#> 
#> $TemporalPositionIdentifier
#> [1] 1
#> 
#> $NumberOfTemporalPositions
#> [1] 1
#> 
#> $ImagesInAcquisition
#> [1] 1
#> 
#> $SliceLocation
#> [1] 0
#> 
#> $SamplesperPixel
#> [1] 1
#> 
#> $PhotometricInterpretation
#> [1] "MONOCHROME2"
#> 
#> $Rows
#> [1] 256
#> 
#> $Columns
#> [1] 256
#> 
#> $PixelSpacing
#> [1] "1.367188e+00 1.367188e+00"
#> 
#> $BitsAllocated
#> [1] 16
#> 
#> $BitsStored
#> [1] 16
#> 
#> $HighBit
#> [1] 15
#> 
#> $PixelRepresentation
#> [1] 1
#> 
#> $PixelData
#> [1] "PixelData"
#>