Configuration#

The configuration file is a JSON file that contains the following keys. The values of these keys are used to include or exclude certain scans from the dataset.

  • begin: The scans acquired before this date are excluded from the dataset. This is a string in the format YYYY-MM-DD. For example, 2019-01-01.

  • end: The scans acquired after this date are excluded from the dataset. This is a string in the format YYYY-MM-DD. For example, 2019-01-01.

  • include_sequences: The user can choose to skip phantoms, localizers, motion-correction scans (moco), derived sequences (perfusion-weighted) and single-band references (sbref) by setting the values for phantom, moco and sbref as false.

  • use_echonumbers: In general (for Siemens) multi-echo sequences can be identified by the presence of EchoNumber in the DICOM header. However, this is not always the case. Then, the folder is scanned for the presence of multiple echo times. In the future, we plan to add support for GE and Philips scanners.

  • include_parameters: The user can choose to include or exclude certain parameters from the dataset. For example, include_parameters: ['RepetitionTime', 'EchoTime']. Note that the parameters are case-sensitive. They should be specified in camel-case. A complete list of parameters can be found here.

  • exclude_subjects: The scans from the subjects in this list are excluded from the dataset. This is a list of strings. For example, ['sub-01', 'sub-02'].

 1{
 2    "begin": "2014-03-12",
 3    "end": "2017-03-12",
 4    "include_sequence": {
 5        "phantom": true,
 6        "nifti_header": false,
 7        "moco": false,
 8        "sbref": false,
 9        "derived": false
10    },
11    "use_echonumbers": true,
12    "horizontal_audit": {
13        "stratify_by": "series_number",
14        "include_parameters": [
15            "EchoTrainLength",
16            "ParallelAcquisitionTechnique",
17            "MagneticFieldStrength",
18            "MRAcquisitionType",
19            "MultiSliceMode",
20            "PhasePolarity",
21            "PhaseEncodingSteps",
22            "PixelBandwidth",
23            "ScanningSequence",
24            "SequenceVariant",
25            "RepetitionTime",
26            "EchoTime",
27            "FlipAngle",
28            "PhaseEncodingDirection",
29            "ShimMode",
30            "Rows",
31            "Columns",
32            "AcquisitionMatrix"
33        ]
34    },
35    "exclude_subjects": [
36        "210098",
37        "210078"
38    ]
39}
VALID_PARAMETERS = ['AcquisitionMatrix', 'AngioFlag', 'BitsAllocated', 'BitsStored', 'BodyPartExamined', 'CoilString', 'Columns', 'DwellTime', 'EchoNumber', 'EchoTime', 'EchoTrainLength', 'FieldOfView', 'FlipAngle', 'FlowCompensation', 'GradientMode', 'HighBit', 'ImageOrientationPatient', 'ImagePositionPatient', 'ImageType', 'ImagedNucleus', 'ImagingFrequency', 'InversionTime', 'LargestImagePixelValue', 'MRAcquisitionType', 'MRTransmitCoilSequence', 'MTState', 'MagneticFieldStrength', 'Manufacturer', 'ManufacturersModelName', 'MultiBandAccelerationFactor', 'MultiSliceMode', 'NonLinearGradientCorrection', 'NumberOfAverages', 'PATMode', 'ParallelAcquisitionTechnique', 'ParallelReductionFactorInPlane', 'PartialFourier', 'PartialFourierDirection', 'PatientPosition', 'PercentPhaseFOV', 'PercentSampling', 'PhaseEncodingDirection', 'PhaseEncodingSteps', 'PhasePolarity', 'PhotometricInterpretation', 'PixelBandwidth', 'PixelRepresentation', 'PixelSpacing', 'PositivePCSDirections', 'ReceiveCoilActiveElements', 'ReceiveCoilName', 'RepetitionTime', 'Rows', 'SAR', 'SamplesPerPixel', 'ScanOptions', 'ScanningSequence', 'SequenceName', 'SequenceVariant', 'ShimMode', 'ShimSetting', 'SliceLocation', 'SliceMeasurementDuration', 'SliceResolution', 'SliceThickness', 'SmallestImagePixelValue', 'SoftwareVersions', 'SpacingBetweenSlices', 'SpoilingState', 'TransmitCoilName', 'VariableFlipAngleFlag', 'WindowCenter', 'WindowCenterWidthExplanation', 'WindowWidth']#

Parameters that are supported by MRdataset

previous_log_fpath(folder, name)#

Return the path to the previous run log file