-
Notifications
You must be signed in to change notification settings - Fork 229
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
dcm2niix reverses Philips PET time series #184
Comments
Thanks for this example. There are two issues here:
For the moment, I have added a basic detection system, which will alert the user to these anomalous images: |
Paul Morgan for noted that PET scans can describe image number with 0054,1330. In the example dataset 0054,1330 provides the correct slice order while 0008,0032 does not. My sense is that your example is technically legal: 0020,0013 is unique for each image, even though it is not meaningful. However, I would strongly encourage you contact Philips and ask them to use a sensible 0020,0013 as many tools display images using these values. I have uploaded a patch that sorts based on 0054,1330 if this tag exists and the modality is PET. I have also added some logic that detect variable time intervals between volumes. In the case where timing is not consistent, it will save one volume for each time point (as NIfTI assumes regular timing between volumes) and provide a warning message that provides the onset time. For the sample data you will see:
I think this patch will close this issue, but please test carefully for unintended consequences. Dealing with these variations makes the code more complicated and harder to maintain. The vendor should be admonished. |
Generally most PET processing software that I've worked with acknowledges that the .nii file doesn't have timing information and allows us to specify the time intervals, so splitting them into individual files isn't really necessary. It would actually create an extra step re-merging the frames.. maybe we can just leave them together? This is not the first time we've had problems with Philips, sometimes catastrophic. Our institution is replacing our scanners with Siemens in the near future, in part due to frustrations with critical elements of their system |
Hi Instance numbers do not require mapping to any spatial or temporal order and that should obtained from other values - see for example stack overflow and this one - it's not even guaranteed to be unique. Matthew |
Matthew, One worries about using such a complex, evolved format that different vendors interpret differently for important health data. Given the ubiquity of DICOM, we are stuck with it. However, I do think everyone would be better off if the top vendors could agree on a core set of features to allow simpler images. A similar thing happened to OpenGL, where features kept on getting added on top of old ones. They then developed a "core" specification, where old features are provided for compatibility but modern developers can use just the streamlined core subset. |
Obviously I agree - part of the problem was that it was never intended as a stand alone file format - it was designed as a communication protocol between servers which is why the disk files were always opaquely named. If you have server you can negotiate your facilities up front before data storage and get the data you expect - whereas file export requires us to store everything that any software might support. It would be possible to only store the mandatory fields, no private tags and strip out much of the variable items, however then this would not serve the research (who are bascically the users of DICOM files) as we keep getting requests to add more. This in conjunction with the fact that most research tooling is written as a means to an end and often doesn't attempt to implement the standard as whole which leads to, entirely reasonable, short cuts. |
I think the vendors could come up with a core specification that would allow them to store private data and yet make it far easier (and faster) for typical tools to parse the datasets. For example, providing nested dataset SQs with explicit lengths at the start would allow tools that are not interested in those block to skip them entirely rather than having to parse them to work out each element length. Well designed, such a core specification could allow vendors to continue to store verbose data but allow tools to rapidly parse the relevant data. |
* tag 'v1.0.20180404': Avoid overflows Better Phasemap and Multiecho detection Handle odd XINAPSE PHILIPS images rordenlab#182 Report but do not segment scans where time varies between volumes rordenlab#184 PET image index and variable timing rordenlab#184 Warning for rordenlab#184 Fix typo in appveyor.yml Update AppVeyor cmake configuration. Mark 'STATIC_LIBCXX' as advanced cmake variable. Fix 'size_t' format warning in printf. Remove obsolete content, fix ECAT7 regression rordenlab#183 Report PhaseEncodingAxis (rordenlab#163) Fix appvevor.yml Update CMake options in CI configurations. ENH: cmake - pass C and CXX _FLAGS and VERBOSE to console subproj (main one for the proj) DOC: COMPILE.md - minor typo fix and wikipedia pointers Increase stack reserve size on MSVC to 8MB. Refine GCC version check in CMake file. SuperBuild now checks if "libstdc++.a" exists when "USE_STATIC_RUNTIME" is ON.
The order of frames of dynamic scans acquired on Philips PET Gemini TOF is reversed by dcm2niix. Most likely it is due to "creative" use of the headers on their part..
The text was updated successfully, but these errors were encountered: