-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch AcquisitionTime from dicom header and encode it in json sidecars #90
Comments
dcm2niix considers acquisition time personal data. If you create a bids file without BIDS anyonymization ( |
Thank you for your input @neurolabusc ! The reason I prefer to not rely on the first volume |
@neurolabusc would you be open to the idea of having |
@effigies the BIDS specification defines RepetitionTime as @jcohenadad if you compile the latest version of the dcm2niix development branch and run it on your data, you will see that the BIDS JSON file lists a new field
There are two independent issues with your data:
The AcquisitionTime (0008,0032) is sampled with low precision. You can demonstrate this by connecting a trigger pulse detector to the optical output of your scanner. You will find that the scans are actually being acquired at very regular intervals, despite the jitter in the reported AcquisitionTime (0008,0032). If you decrease the
Again, I would discourage this, in my evaluations the variabilities in these timings reflect variability in the time stamp inserted in the DICOM, not variability in the actual acquisition. Due to the inaccuracy of AcquisitionTime (0008,0032), our estimate of TimeBetweenVolumes will always have some inaccuracy. However, using the times for the first and last volume minimizes this. |
@neurolabusc this is awesome!!! 🎉 Thank you so much for the quick changes. I was able to successfully reproduce your results (from this commit) Yes, I am aware of the poor precision of the Again, thank you so much for the quick support. I'm sure this feature will be useful for many people in our community. |
I don't really know the context of this edge case, but if I'm looking at a 4D series, the For qMRI cases, BEP-001 is introducing |
@effigies indeed, for the dataset posted in #90 (comment), the So anticipating that BEP001 will be adopted soon, it might be wise to revert the recent changes in the development branch of |
That sounds reasonable to me. Along with BEP-001, we should modify the text of |
@jcohenadad this sounds reasonable. When the measured time between volumes differs dramatically from 0018, 0080, one would use the time between volumes for the BIDS tag 'RepetitionTime' and the value from 0018, 0080 as However, reading BEP001 it is unclear to me how a tool determines from a DICOM whether 0018, 0080 refers to |
I guess these BEP initiatives could (should) also serve as incentives for vendors to update what goes in their DICOMs. The "enhanced DICOM" is probably a step in that direction. It should also be mentioned that while DICOMs are popular and convenient (for good reasons), vendor-agnostic formats such as ISMRMRD are also a means to get NIfTIs out. But this comment is probably a bit out-of-scope... |
@neurolabusc Can you comment on BEP001 with this concern? I think it's worth bringing up while the BEP is being finalized. |
@jcohenadad The latest patch to the developmental branch will generate As an aside, I am an advocate of vendor-agnostic formats. However, I think we also need to advocate for big data friendly formats. As scientists, we need to be very careful in creating and curating formats so that they retain high performance (the era of big data is only beginning), retain precision, and are simple to describe so they can be accessed by many tools. By these metrics, I am not a fan of the ISMRMRD format. The choice of HDF5 has profound implications. I remain a critic of storing floating point data as ASCII text (this includes BIDS). Beyond the speed and size considerations, moving data back and forth between machine native binary and ASCII representations has implications. As Kernighan and Plauger note Floating point numbers are like piles of sand; every time you move one you lose a little sand and pick up a little dirt. We saw with the MRI vendors the consequences associated with rounding errors in the text input boxes and the binary representations. @effigies I have posted a comment noting I remain uncertain how to distinguish |
@neurolabusc Thank you for making these changes, and for sharing this interesting perspective about the HDF5 format. |
Closing as the change is now implemented in a stable version of dcm2niix |
* tag 'v1.0.20201102': (68 commits) New stable release (v1.0.20201102) Update dcm_qa_nih submodule. Update dcm_qa submodule. Unify GE slice timing Disable to estimate Slice Time for Diffusion and Others Verbose GE slice time GE enhancing software version detection epi/epi2/EPI/EPI2 bug fix Check slices in volume consistent with locations in acquisition (GE: 0021,104F; public: 0054,0081). Detecting missing DICOMs for GE series. GE Detect Group Delay SliceTiming GE multi-phase. detection GE Slice Times Further work on GE slice timing Improve GE Slice Timing Detection RepetitionTimeExcitation (rordenlab#439) Typo Detect if TR and TimeBetweenVolumes differ (UNFmontreal/Dcm2Bids#90) Identify GE Localizers (rordenlab#432) GE enhanced BIDS: report epi/epiRT, through-plane interpolation, round bvec ...
Context
Some applications (e.g. realtime shimming) require information about acquisition time of each volume, from EPI or GRE sequences.
Currently, multiple Dicom files corresponding to a single series are saved into a single NIfTI file (and, de facto, a single JSON file). The JSON file does have a field
AcquisitionTime
, however it only corresponds to the first volume. The information of the other volumes is lost.Suggestion
Suggestion 1: Use the existing field
AcquisitionTime
to encode a list of acquisition timestamp for each volume.Suggestion 2: Create a custom field, e.g.
AcquisitionTimeList
that would encode a list of acquisition timestamp for each volumeTesting data
Testing data: echo_2.46.zip
Syntax:
dcm2niix -v 2 echo_2.46 | grep 0008,0032
Result: Outputs acquisition time per volume
The additional feature of
dcm2bids
would be to fetch that information and encode it in the JSON file.The text was updated successfully, but these errors were encountered: