-
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
started to split 4d philips into individual files due to "Slices not stacked: trigger time varies" #395
Comments
@yarikoptic I believe this is an unintended consequence of the changes made for issue 189. Specifically, if you look at the Multi-echo Philips 3T Achieva dStream 5.3.0.3 images from Baxter Rogers, you will see that the images must be segmented based on the DICOM Trigger Time (0018,1060) tags (e.g. series 701 and 1201 of sample dataset). I really do not know how to proceed, as dcm2niix seems to be following the recipe provided by your DICOMs. I note your images have been handled by a few tools, so it is unclear if the trigger time tag was initially generated by Philips software or as a time-stamp that was inserted later by some other tool. While my aim is to resolve your issue automatically, I note that this data was touched by gdcmanon, and it would be easy enough to use that tool to simply remove the mysterious tag (e.g. Maybe @baxpr or @drmclem can provide input. Do we ignore 0018,1060 if the maximum value is far too long to be the time between two successive heart beats? In your case, the 155 volumes have the trigger time increment with TR, so should a tool ignore the trigger time if it precisely matches the TR? I really do not know what the intention of the trigger time is in your data, as the R-wave should be occurring many times in the 310 seconds of the series. In brief, your data seems to have a creative interpretation for the meaning of 0018,1060. |
Issue 189 is the only time I have encountered TriggerDelayTime. In that case it was extremely helpful for dcm2niix to sort and name nii files based on the trigger delays, and I believe the implemented solution was necessary to avoid ambiguity or errors in the nii files. I haven't seen this use of TriggerDelayTime in any of our Philips fMRIs, for what that's worth. Anybody know if these values came from the scanner, or were inserted later? I agree this use doesn't seem to be in line with the DICOM spec. |
May be @mih could also shine some light on these data he shared if there was anything special about it (dicoms were anonimized but I guess that should have not changed any other field). I also won't be surprised if it ends up being scanner software version specific behavior which was changed later to accommodate new paradigms. |
BTW in my case trigger times are all at a regular interval. May be dcm2niix should split into multiple when difference varies, like it does for slices iirc? |
In the specific case in our DICOMs that prompted the change, the trigger delay times were evenly spaced at 1010, 3310, 5610 ms. Thinking about it, that's even in a plausible range for fMRI volume times too. |
Our pulse sequence is doing this by the way: |
FTR: The gdcmanon call used on the files was
They should be unmodified otherwise. I could investigate further, if needed. |
Hi - are you doing dynamic MP2Rage ? MP2RAge is not defualt philips seqence and will be a custom implementation. One way of perfoming the necessary two different inversion times is to re-use cardiac inversion functionality which could result in the trigger time value being populated with the inversion delays or somethng like it. Or course if you are not doing this sequence - ignore this! |
Not dynamic. We are as you say re-using the cardiac inversion functionality. It's a local patch, but I think the only change from product is the shape of the pulses. |
So - on the list above the trigger time is the inversion time ? |
That's right. |
So it seems like neither of these examples are actually using the public tag TriggerTime as specified by the DICOM standard. I have committed a patch that should resolve this. It leverages the fact that for @yarikoptic's data the TriggerTime (in milliseconds) is identical to the Philips private tag MRImageDynamicScanBeginTime (2005,10a0) which is specified in seconds. If these two values match, dcm2niix ignores the TriggerTime. It is a kludge, but I think it is a robust one. @yarikoptic data where TriggerTime actually stores Dynamic Scan Begin Time:
@baxpr example where TriggerTime actually stores Inversion Time:
|
So just to be clear - these are basically single customer solutions because of implementation details of a custom MP2RAGE sequence and don't form part of the Philips product. |
If there is a standard triggered cardiac scan from the product sequence, don't we still need to split on the TriggerTime field? I don't have test data for this though. |
I think this should be robust. It should segment based on TriggerTime regardless of whether this truly reflect TriggerTime or some other variable. The only situation where data will not be segmented based on TriggerTime is if it matches the MRImageDynamicScanBeginTime. So while it is based on a single customer's experiences, it should work across sequences. @yarikoptic if you are happy with this solution, can you close the issue. |
as long as it works for me ;) that field (was not) extracted by dcm2niix so can't check quickly if it is the same... will dig with dcmdump later on |
FWIW, in 'my' data -- I see no other field matching the Time, e.g. $> dcmdump MR.1.3.46.670589.11.38317.5.0.4476.2014042516045946836 | grep 34000
(0018,1060) DS [34000] # 6, 1 TriggerTime |
Remember, 0018,1060 is in milliseconds, but 2005,10a0 is in seconds. In your example you would want to look for "[34]" |
;-) thank you @neurolabusc - sorry that I had missed your original comment which had all the details. Is a new release coming? or would you bless me to include the patch into neurodebian pkg? |
Stable releases are on typically about a 6 month cadence. Unless this issue impacts many users, my sense is to not generate a new release, as it seems like an edge case. I try to test releases on a wide set of images. On the other hand, since there are no major changes in the development branch. Therefore, I think the chances for regression are minor. Feel free to update neurodebian. |
Isn't that testing automated already or there are some additional sweeps of cases?
Ok, I will go directly to current state of development branch v1.0.20190410-94-gad0e1c8 (according to |
I would suggest calling it |
I just uploaded 1.0.20200427 to neurodebian, and consider this issue resolved. Thank you @neurolabusc ! |
…to debian * upstream/development: Discrepant uses for TriggerTime (rordenlab#395) Developmental version bump Great and desperate Siemens XA classic kludge (rordenlab#394)
Data is at https://github.com/datalad/example-dicom-functional and we use it for testing of https://github.com/datalad/datalad-neuroimaging/ where we run heudiconv with dcm2niix to convert into bids dataset first. Our tests started to fail, boiled down to newer dcm2niix (1.0.20200331) stopped placing them into a single 4d .nii.gz
here is how looks with elderly 1.0.20181125
how looks with 1.0.20200331
at least according to .json, seems to be consistent in TriggerDelayTime increment at 2000 msec interval:
The text was updated successfully, but these errors were encountered: