bids-validator
bids-validator copied to clipboard
ASL M0scan json "intended for": struggle with array of strings
trafficstars
Raised here.
Could reproduce with validator 1.12.0 by modifying one of the ASL examples.
From my understanding and according to the spec a single M0scan could be intended for several ASM files.
asl002_with_acq
├── dataset_description.json
├── README
└── sub-Sub103
├── anat
│ ├── sub-Sub103_T1w.json
│ └── sub-Sub103_T1w.nii.gz
└── perf
├── sub-Sub103_acq-foo_aslcontext.tsv
├── sub-Sub103_acq-foo_asl.json
├── sub-Sub103_acq-foo_asl.nii.gz
├── sub-Sub103_aslcontext.tsv
├── sub-Sub103_asl.json
├── sub-Sub103_asl.nii.gz
├── sub-Sub103_m0scan.json
└── sub-Sub103_m0scan.nii.gz
With this content for asl002_with_acq/sub-Sub103/perf/sub-Sub103_m0scan.json
{
"Manufacturer":"Philips",
"ManufacturersModelName":"Achieva",
"SoftwareVersions":"5.1.7_5.1.7.2",
"MagneticFieldStrength":3,
"ReceiveCoilName":"MULTI_COIL",
"MRAcquisitionType":"2D",
"PulseSequenceType":"EPI",
"ScanningSequence":"GR",
"SequenceVariant":"SK",
"ScanOptions":"FS",
"PulseSequenceDetails":"Philips 2D epi pcasl product",
"PartialFourier":0.421875,
"PhaseEncodingDirection":"j",
"TotalReadoutTime":0.02198740305218437,
"EchoTime":0.015001,
"SliceTiming":[0,0.0385,0.077,0.1155,0.154,0.1925,0.231,0.2695,0.308,0.3465,0.385,0.4235,0.462,0.5004999999999999,0.539,0.5775,0.616,0.6545,0.6929999999999999,0.7315],
"FlipAngle":90,
"RepetitionTimePreparation":9,
"IntendedFor":[
"bids::sub-Sub103/ses-01N/sub-Sub103_ses-01N_asl.nii.gz",
"bids::sub-Sub103/ses-01N/sub-Sub103_ses-01N_acq-foo_asl.nii.gz"
]
}
and I get this with the validator
$ bids-validator --ignoreNiftiHeaders asl002_with_acq
[email protected]
(node:98831) Warning: Closing directory handle on garbage collection
(Use `node --trace-warnings ...` to show where the warning was created)
1: [ERR] M0Type was not defined correctly. If 'M0Type' is equal to separate, the dataset should include a *_m0scan.nii[.gz] and *_m0scan.json file. (code: 202 - M0Type_SET_INCORRECTLY)
./sub-Sub103/perf/sub-Sub103_acq-foo_asl.nii.gz
Evidence: /sub-Sub103/perf/sub-Sub103_acq-foo_m0scan.nii.gz
Please visit https://neurostars.org/search?q=M0Type_SET_INCORRECTLY for existing conversations about this issue.
1: [WARN] It is recommended to define 'AcquisitionVoxelSize' for this file. 'AcquisitionVoxelSize' is an array of numbers with a length of 3, in millimeters. This parameter denotes the original acquisition voxel size, excluding any inter-slice gaps and before any interpolation or resampling within reconstruction or image processing. Any point spread function effects (e.g. due to T2-blurring) that would decrease the effective resolution are not considered here. (code: 143 - ACQUISITION_VOXELSIZE_MISSING)
./sub-Sub103/perf/sub-Sub103_m0scan.nii.gz
Please visit https://neurostars.org/search?q=ACQUISITION_VOXELSIZE_MISSING for existing conversations about this issue.
Summary: Available Tasks: Available Modalities:
12 Files, 5.18KB MRI
1 - Subject
1 - Session
If you have any questions, please post on https://neurostars.org/tags/bids.
attaching the dummy example
Note that if the acq entity in the M0scan filename is present then you get an error with the other file:
asl002_with_acq
├── dataset_description.json
├── README
└── sub-Sub103
├── anat
│ ├── sub-Sub103_T1w.json
│ └── sub-Sub103_T1w.nii.gz
└── perf
├── sub-Sub103_acq-foo_aslcontext.tsv
├── sub-Sub103_acq-foo_asl.json
├── sub-Sub103_acq-foo_asl.nii.gz
├── sub-Sub103_acq-foo_m0scan.json
├── sub-Sub103_acq-foo_m0scan.nii.gz
├── sub-Sub103_aslcontext.tsv
├── sub-Sub103_asl.json
└── sub-Sub103_asl.nii.gz
bids-validator --ignoreNiftiHeaders asl002_with_acq
[email protected]
(node:100755) Warning: Closing directory handle on garbage collection
(Use `node --trace-warnings ...` to show where the warning was created)
1: [ERR] M0Type was not defined correctly. If 'M0Type' is equal to separate, the dataset should include a *_m0scan.nii[.gz] and *_m0scan.json file. (code: 202 - M0Type_SET_INCORRECTLY)
./sub-Sub103/perf/sub-Sub103_asl.nii.gz
Evidence: /sub-Sub103/perf/sub-Sub103_m0scan.nii.gz
Please visit https://neurostars.org/search?q=M0Type_SET_INCORRECTLY for existing conversations about this issue.
1: [WARN] It is recommended to define 'AcquisitionVoxelSize' for this file. 'AcquisitionVoxelSize' is an array of numbers with a length of 3, in millimeters. This parameter denotes the original acquisition voxel size, excluding any inter-slice gaps and before any interpolation or resampling within reconstruction or image processing. Any point spread function effects (e.g. due to T2-blurring) that would decrease the effective resolution are not considered here. (code: 143 - ACQUISITION_VOXELSIZE_MISSING)
./sub-Sub103/perf/sub-Sub103_acq-foo_m0scan.nii.gz
Please visit https://neurostars.org/search?q=ACQUISITION_VOXELSIZE_MISSING for existing conversations about this issue.
Summary: Available Tasks: Available Modalities:
12 Files, 5.18KB MRI
1 - Subject
1 - Session
If you have any questions, please post on https://neurostars.org/tags/bids.
fixed with the deno validator