Home

Awesome

THIS REPOSITORY IS ARCHIVE. Please refer to https://gitlab.com/flywheel-io/flywheel-apps/dcm2niix for the new active repo.

CircleCI Docker Pulls

dcm2niix Gear

A Flywheel Gear for implementing Chris Rorden's dcm2niix for converting DICOM (or PAR/REC) to NIfTI (or NRRD), with an optional implementation of Poldrack Lab's PyDeface to remove facial structures from NIfTI.

Description

Chris Rorden's dcm2niix is a popular tool for converting images from the complicated formats used by scanner manufacturers (DICOM, PAR/REC) to the NIfTI format used by many scientific tools. Alternatively, this tool also outputs the NRRD format. dcm2niix works for all modalities (CT, MRI, PET, SPECT) and sequence types.

The Poldrack Lab's PyDeface is a popular tool for removing facial structures from NIfTI.

Gear Inputs

Required

Optional

Config Settings

dcm2niix

PyDeface

Other

Workflow

Metadata

The dcm2niix tool extracts DICOM tags and collates these into a JSON file (i.e., the BIDS sidecar). What is extracted depends on the input data. If present, the following DICOM tags are extracted via the dcm2niix tool and applied as metadata to the output files of the dcm2niix Gear:

AcquisitionMatrixPE
AcquisitionNumber
AcquisitionTime
BaseResolution
BodyPartExamined
CoilString
ConversionSoftware
ConversionSoftwareVersion
DeviceSerialNumber
EchoTime
EchoTrainLength
EffectiveEchoSpacing
EstimatedEffectiveEchoSpacing
EstimatedTotalReadoutTime
FlipAngle
FrameTimesStart
ImageComments
ImageOrientationPatientDICOM
ImageType
ImagingFrequency
InPlanePhaseEncodingDirectionDICOM
InstitutionAddress
InstitutionalDepartmentName
InstitutionName
InternalPulseSequenceName
MagneticFieldStrength
Manufacturer
ManufacturersModelName
Modality
MRAcquisitionType
ParallelReductionFactorInPlane
ParallelReductionOutOfPlane
PartialFourier
PatientPosition
PercentPhaseFOV
PercentSampling
PhaseEncodingAxis
PhaseEncodingDirection
PhaseEncodingPolarityGE
PhaseEncodingSteps
PhaseResolution
PhilipsRescaleIntercept
PhilipsRescaleSlope
PhilipsRWVIntercept
PhilipsRWVSlope
PixelBandwidth
ProcedureStepDescription
ProtocolName
PulseSequenceDetails
ReceiveCoilName
ReconMatrixPE
RepetitionTime
SAR
ScanningSequence
ScanOptions
SequenceName
SequenceVariant
SeriesDescription
SeriesNumber
ShimSetting
SliceThickness
SliceTiming
SoftwareVersions
SpacingBetweenSlices
StationName
TotalReadoutTime
TxRefAmp
UsePhilipsFloatNotDisplayScaling
WaterFatShift

If the Gear inputs are DICOMs, additional metadata is captured. If present, the following DICOM tags are extracted using Pydicom and applied as metadata to the output files of the dcm2niix Gear:

AcquisitionDuration, tag(0018,9073)
AcquisitionMatrix
Columns
InPlanePhaseEncodingDirection
PercentPhaseFieldOfView
PercentSampling
PixelSpacing
PrepulseDelay, tag(2001,101B)
PrepulseType, tag(2001,101C)
Rows
ScanningTechnique, tag(2001,1020)
ScanType, tag(2005,10A1)
SliceOrientation, tag(2001,100B)
SpacingBetweenSlices
NumberOfEchos, tag(2001,1014)
NumberOfSlices, tag(2001,1018)
NumberOfTemporalPositions

All metadata applied to the output files from the dcm2niix Gear are extracted from the raw DICOM tags. As such, the units of measurement remain consistent with the DICOM standard. To find more information on DICOM, take a look at NiBabel's very useful Introduction to DICOM.