Summary of what happened:
Trying to create a suitable .json file for conversion of DICOM data including a gradient echo fieldmap - which would then be put through fmriprep. I am unsure about the correct formatting of the custom_entities entries - and why my phasediff image is not being labelled correctly.
Any help would be much appreciated.
Kind regards,
Jon
Command used (and if a helper script was used, a link to the helper script or the command generated):
$ dcm2bids -d sourcedata/DICOM/0F6380FB/ -p MRC204 -c convert_memag_v3.json --force_dcm2bids
Data formatted according to a validatable standard? Please provide the output of the validator:
Not there yet…
Relevant log outputs (up to 20 lines):
$ dcm2bids -d sourcedata/DICOM/0F6380FB/ -p MRC204 -c convert_memag_v3.json --force_dcm2bids^C
(dcm2bids) [gnx20mmu@uwwbichead01 ~/dcm2bids-proj/MEMAG/sub-MRC204]$ cd ..
(dcm2bids) [gnx20mmu@uwwbichead01 ~/dcm2bids-proj/MEMAG]$ dcm2bids -d sourcedata/DICOM/0F6380FB/ -p MRC204 -c convert_memag_v3.json --force_dcm2bids
INFO | --- dcm2bids start ---
INFO | Running the following command: /gpfs/data/uwwbic/gnx20mmu/.conda/envs/dcm2bids/bin/dcm2bids -d sourcedata/DICOM/0F6380FB/ -p MRC204 -c convert_memag_v3.json --force_dcm2bids
INFO | OS version: Linux-3.10.0-1160.45.1.el7.x86_64-x86_64-with-glibc2.17
INFO | Python version: 3.12.1 | packaged by conda-forge | (main, Dec 23 2023, 08:03:24) [GCC 12.3.0]
INFO | dcm2bids version: 3.1.1
INFO | dcm2niix version: v1.0.20230411
INFO | Checking for software update
INFO | Currently using the latest version of dcm2bids.
WARNING | A newer version exists for dcm2niix: v1.0.20240202
WARNING | You should update it -> https://github.com/rordenlab/dcm2niix.
INFO | participant: sub-MRC204
INFO | config: /gpfs/data/uwwbic/gnx20mmu/dcm2bids-proj/MEMAG/convert_memag_v3.json
INFO | BIDS directory: /gpfs/data/uwwbic/gnx20mmu/dcm2bids-proj/MEMAG
INFO | Auto extract entities: False
INFO | Validate BIDS: False
WARNING | Previous dcm2bids temporary directory output found:
WARNING | /gpfs/data/uwwbic/gnx20mmu/dcm2bids-proj/MEMAG/tmp_dcm2bids/sub-MRC204
WARNING | 'force' argument is set to True
WARNING | Cleaning the previous directory and running dcm2bids
INFO | Running: dcm2niix -b y -ba y -z y -f %3s_%f_%p_%t -o /gpfs/data/uwwbic/gnx20mmu/dcm2bids-proj/MEMAG/tmp_dcm2bids/sub-MRC204 sourcedata/DICOM/0F6380FB
Error: 144 n_tags CSA Image Header corrupted (0029,1010) see issue 633.
Error: 144 n_tags CSA Image Header corrupted (0029,1010) see issue 633.
INFO | Check log file for dcm2niix output
INFO | SIDECAR PAIRING
INFO | No Pairing <- 006_0F6380FB_AAHead_Scout_20231207152646
INFO | No Pairing <- 007_0F6380FB_AAHead_Scout_20231207152646_i00001
INFO | No Pairing <- 007_0F6380FB_AAHead_Scout_20231207152646_i00002
INFO | No Pairing <- 007_0F6380FB_AAHead_Scout_20231207152646_i00003
INFO | No Pairing <- 007_0F6380FB_AAHead_Scout_20231207152646_i00004
INFO | No Pairing <- 008_0F6380FB_AAHead_Scout_20231207152646_i00001
INFO | No Pairing <- 008_0F6380FB_AAHead_Scout_20231207152646_i00002
INFO | No Pairing <- 008_0F6380FB_AAHead_Scout_20231207152646_i00003
INFO | No Pairing <- 009_0F6380FB_AAHead_Scout_20231207152646_i00001
INFO | No Pairing <- 009_0F6380FB_AAHead_Scout_20231207152646_i00002
INFO | No Pairing <- 009_0F6380FB_AAHead_Scout_20231207152646_i00003
INFO | sub-MRC204_T1w <- 010_0F6380FB_MPRAGE_GRAPPA2_20231207152646
INFO | sub-MRC204_task-rest_bold <- 011_0F6380FB_rest_cmrr_mbep2d_20231207152646
INFO | sub-MRC204_task-recall_bold <- 012_0F6380FB_task_cmrr_mbep2d_20231207152646
WARNING | Entity "['fmap']" is not a valid BIDS entity.
INFO | sub-MRC204_fmap-magnitude1_fmap <- 013_0F6380FB_gre_field_mapping_3mm_20231207152646_e1
WARNING | Entity "['fmap']" is not a valid BIDS entity.
INFO | sub-MRC204_fmap-magnitude2_fmap <- 013_0F6380FB_gre_field_mapping_3mm_20231207152646_e2
WARNING | Entity "['fmap']" is not a valid BIDS entity.
INFO | sub-MRC204_fmap-magnitude2_fmap <- 014_0F6380FB_gre_field_mapping_3mm_20231207152646_e2_ph
WARNING | Entity "['anat']" is not a valid BIDS entity.
INFO | sub-MRC204_anat-HippoTE1_T2w <- 015_0F6380FB_TSE_3TE_Cor_Hippo_20231207152646_e1
WARNING | Entity "['anat']" is not a valid BIDS entity.
INFO | sub-MRC204_anat-HippoTE2_T2w <- 015_0F6380FB_TSE_3TE_Cor_Hippo_20231207152646_e2
WARNING | Entity "['anat']" is not a valid BIDS entity.
INFO | sub-MRC204_anat-HippoTE3_T2w <- 015_0F6380FB_TSE_3TE_Cor_Hippo_20231207152646_e3
INFO | sub-MRC204_dir-AP_dwi <- 016_0F6380FB_cmrr_mbep2d_diff_60B07_AP_20231207152646
INFO | No Pairing <- 017_0F6380FB_cmrr_mbep2d_diff_60B07_AP_20231207152646
INFO | No Pairing <- 018_0F6380FB_cmrr_mbep2d_diff_60B07_AP_20231207152646
INFO | No Pairing <- 019_0F6380FB_cmrr_mbep2d_diff_60B07_AP_20231207152646
INFO | No Pairing <- 020_0F6380FB_cmrr_mbep2d_diff_60B07_AP_20231207152646
INFO | sub-MRC204_dir-PA_dwi <- 022_0F6380FB_cmrr_mbep2d_diff_60B07_PA_20231207152646
INFO | No Pairing <- 023_0F6380FB_cmrr_mbep2d_diff_60B07_PA_20231207152646
INFO | No Pairing <- 024_0F6380FB_cmrr_mbep2d_diff_60B07_PA_20231207152646
INFO | No Pairing <- 025_0F6380FB_cmrr_mbep2d_diff_60B07_PA_20231207152646
INFO | No Pairing <- 026_0F6380FB_cmrr_mbep2d_diff_60B07_PA_20231207152646
INFO | sub-MRC204/fmap/sub-MRC204_fmap-magnitude2_fmap has 2 runs
INFO | Adding run information to the acquisition
WARNING | Entity "['fmap']" is not a valid BIDS entity.
WARNING | âś… Filename was reordered according to BIDS entity table order:
from: sub-MRC204_fmap-magnitude2_run-01_fmap
to: sub-MRC204_run-01_fmap-magnitude2_fmap
WARNING | Entity "['fmap']" is not a valid BIDS entity.
WARNING | âś… Filename was reordered according to BIDS entity table order:
from: sub-MRC204_fmap-magnitude2_run-02_fmap
to: sub-MRC204_run-02_fmap-magnitude2_fmap
INFO | Moving acquisitions into BIDS folder "/gpfs/data/uwwbic/gnx20mmu/dcm2bids-proj/MEMAG/sub-MRC204".
INFO | '/gpfs/data/uwwbic/gnx20mmu/dcm2bids-proj/MEMAG/sub-MRC204/func/sub-MRC204_task-rest_bold.nii.gz' already exists
INFO | Use --clobber option to overwrite
INFO | '/gpfs/data/uwwbic/gnx20mmu/dcm2bids-proj/MEMAG/sub-MRC204/func/sub-MRC204_task-rest_bold.json' already exists
INFO | Use --clobber option to overwrite
INFO | '/gpfs/data/uwwbic/gnx20mmu/dcm2bids-proj/MEMAG/sub-MRC204/func/sub-MRC204_task-recall_bold.nii.gz' already exists
INFO | Use --clobber option to overwrite
INFO | '/gpfs/data/uwwbic/gnx20mmu/dcm2bids-proj/MEMAG/sub-MRC204/func/sub-MRC204_task-recall_bold.json' already exists
INFO | Use --clobber option to overwrite
INFO | '/gpfs/data/uwwbic/gnx20mmu/dcm2bids-proj/MEMAG/sub-MRC204/anat/sub-MRC204_T1w.nii.gz' already exists
INFO | Use --clobber option to overwrite
INFO | '/gpfs/data/uwwbic/gnx20mmu/dcm2bids-proj/MEMAG/sub-MRC204/anat/sub-MRC204_T1w.json' already exists
INFO | Use --clobber option to overwrite
INFO | Logs saved in /gpfs/data/uwwbic/gnx20mmu/dcm2bids-proj/MEMAG/tmp_dcm2bids/log/sub-MRC204_20240301-120220.log
INFO | --- dcm2bids end ---
Screenshots / relevant information:
.json file below:
{
"descriptions": [
{
"datatype": "anat",
"suffix": "T1w",
"criteria": {
"SeriesDescription": "MPRAGE GRAPPA2"
}
},
{
"datatype": "anat",
"suffix": "T2w",
"custom_entities": "anat-HippoTE1",
"criteria": {
"SeriesDescription": "TSE_3TE_Cor_Hippo",
"EchoTime": 0.0095
}
},
{
"datatype": "anat",
"suffix": "T2w",
"custom_entities": "anat-HippoTE2",
"criteria": {
"SeriesDescription": "TSE_3TE_Cor_Hippo",
"EchoTime": 0.076
}
},
{
"datatype": "anat",
"suffix": "T2w",
"custom_entities": "anat-HippoTE3",
"criteria": {
"SeriesDescription": "TSE_3TE_Cor_Hippo",
"EchoTime": 0.143
}
},
{
"id": "task-rest",
"datatype": "func",
"suffix": "bold",
"custom_entities": "task-rest",
"criteria": {
"SeriesDescription": "rest_cmrr_mbep2d"
},
"sidecar_changes": {
"TaskName": "rest"
}
},
{
"id": "task-recall",
"datatype": "func",
"suffix": "bold",
"custom_entities": "task-recall",
"criteria": {
"SeriesDescription": "task_cmrr_mbep2d"
},
"sidecar_changes": {
"TaskName": "recall"
}
},
{
"datatype": "fmap",
"suffix": "fmap",
"custom_entities": "fmap-magnitude1",
"IntendedFor": ["task-rest",
"task-recall"],
"criteria": {
"EchoNumber": "1",
"EchoTime": 0.00492
},
"sidecar_changes": {
"TaskName": "magnitude1"
}
},
{
"datatype": "fmap",
"suffix": "fmap",
"custom_entities": "fmap-magnitude2",
"IntendedFor": ["task-rest",
"task-recall"],
"criteria": {
"EchoNumber": "2",
"EchoTime": 0.00738
},
"sidecar_changes": {
"TaskName": "magnitude2"
}
},
{
"datatype": "fmap",
"suffix": "fmap",
"custom_entities": "fmap-phasediff",
"IntendedFor": ["task-rest",
"task-recall"],
"criteria": {
"ImageType": "*PHASE*"
},
"sidecar_changes": {
"TaskName": "phasediff",
"EchoTime1": 0.00492,
"EchoTime2": 0.00738
}
},
{
"datatype": "dwi",
"suffix": "dwi",
"custom_entities": "dir-AP",
"criteria": {
"SeriesDescription": "cmrr_mbep2d_diff_60B07_AP"
}
},
{
"datatype": "dwi",
"suffix": "dwi",
"custom_entities": "dir-PA",
"criteria": {
"SeriesDescription": "cmrr_mbep2d_diff_60B07_PA"
}
}
]
}