-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
24 hour time #322
Comments
I also think there is an error in this InjectedRadioactivity "InjectedRadioactivity": 21,
"InjectedRadioactivityUnits": "MBq", I believe this should match DICOM Radionuclide Total Dose (0018,1074) which is defined as MBq:
The pet2bids source code is converting megabecquerels (MBq) to gigabecquerels (GBq). So the results should either be: "InjectedRadioactivity": 20924990,
"InjectedRadioactivityUnits": "MBq", or "InjectedRadioactivity": 21,
"InjectedRadioactivityUnits": "GBq", I suspect the source of this issue is the developer assumed that the DICOM RadionuclideTotalDose is defined in Becquerels, but it is actually megabecquerels. |
Hmm, not getting that error with the latest version of pypet2bids, will have to check Matlab next. See Above was generated using the following arguments:
Could you attach the full JSON you're seeing that in? If you're referring to the sidecar json in the Computerome hosted dataset don't worry about it. I'll have access the output there shortly. |
And good catch with the InjectedRadioactivity, but it's not wrong per say as the user ultimately decided that the dicom was wrong. Here is the snippet that was used to convert it: try
clear meta
meta.TimeZero = 'ScanStart';
meta.Manufacturer = 'General Electric';
meta.ManufacturersModelName = 'Signa PET/MR';
meta.InstitutionName = 'Århus University Hospital, DK';
meta.BodyPart = 'Phantom';
meta.Units = 'Bq/mL';
meta.TracerName = 'FDG';
meta.TracerRadionuclide = 'F18';
meta.InjectedRadioactivity = 21; % Mbq
meta.SpecificRadioactivity = 3.7234e+03; % ~ 21000000 Bq/ 5640 ml
meta.ModeOfAdministration = 'infusion';
meta.FrameTimesStart = 0;
meta.AcquisitionMode = 'list mode';
meta.ImageDecayCorrected = 'true';
meta.ImageDecayCorrectionTime = 0;
meta.AttenuationCorrection = 'MR-corrected';
meta.FrameDuration = 600;
meta.FrameTimesStart = 0;
meta.ReconFilterType = "none";
meta.ReconFilterSize = 0;
meta.ReconMethodParameterLabels = ["none"];
meta.ReconMethodParameterUnits = ["none"];
meta.ReconMethodParameterValues = [0];
meta.InjectionEnd = [10];
dcm2niix4pet(fullfile(source,'GeneralElectricSignaPETMR-Aarhus'),meta,...
'o',fullfile(destination,['sub-GeneralElectricSignaAarhus' filesep 'pet'])); % note we only need to use folders here
catch
disp(message);
end I've gone ahead and deleted the conversion script you referenced earlier as it's not been used in some time. Will double check the dataset on Computerome once I have access tomorrow and make any additional fixes. Thanks again. |
The errors I report are from the JSONs in the OpenNeuroPET Phantoms validation dataset. |
Hmm, I wouldn't necessarily trust the information in the dicom header over the information applied manually via the Alternatively, we could add the conversion script used to generate those files to the dataset so there's less confusion on how they arrived in their existing state. |
@CPernet tagging you in as I'm having difficulty accessing the data on Computerome. Do you think we should:
I was working on the first of those, but I'm slightly stuck until I have access to one of the phantoms. |
Okay okay, not sure if it was a picnic issue or other with collecting the phantoms from Computerome. But, getting back on point, in the Readme associated with this dataset it's not 100% clear that the dicoms won't match the BIDS output:
So, do we want to make it more explicit that the scripts injected values that aren't in the dicoms? Or make the scripts "correct" to referect the dicom header info? Thanks! |
I do think it would be great if we could create a regression testing validation structure similar to the dcm_qa series. This would ensure changes do not break compatibility, and also provide a roadmap for extracting as much as possible from the DICOMs without human intervention. I would start with the basic dcm_qa that just uses dcm2niix to convert the DICOMs. You could apply a regression test that ignores tags we know can not currently be populated by dcm2niix, e.g. dcm_qa validation test ignore the key |
Oh, that's pretty clever, the most we're doing now is comparing the outputs between the Matlab and Python versions of the conversions. I think we'd just need to add a run of dcm2niix over the same folders that pet2bids is targeting before we move onto a comparison between the two. I'll include that in the upcoming PR. |
@bendhouseart can you point me to the code you use to retrieve the phamtom data (you do not need any login, there is a open access link) |
@CPernet I mentioned this on Monday at our meeting; it turns out I'm just not very tech savvy and missed the download link here it's working fine for me now. @neurolabusc a little history for you that might explain some things: Initially we would warn users if the dicom header values didn't match the given user inputs either via arguments or from an input spreadsheet. But, at some point I got enough complaints about the verbosity of those warnings and I disabled that functionality. The same wasn't done in the Matlab version as those users didn't feel the same or are more used to being ignored. Of course some year(s) later I'm having trouble pinpointing exactly when/where those changes took place. The discrepancy you've observed between the dicom headers and the BIDS sidecars, in most cases, exists because the dicom values are incorrect. I haven't had nearly enough time at the scanner, but Cyril will tell you that more often than not the manufacturer's have limited a users ability to enter the correct values into the console at scan time. If you speak to a PET imager they'll tell you that all "important" PET data being captured by some other means and recorded into a spreadsheet or text file later. It could be different at other locations, but in my encounters it's almost always the case that blood and radioactivity data accompany the imaging data in the form of a spreadsheet. All that said, I still don't think it would hurt to update our documentation to better inform users of as much, nor adding in some mention of the differences between dcm2niix output and the extra metadata PET2BIDS tacks onto it. I think the documentation is more than due for a update with that and then some.
I still think your suggestion is worthwhile and I'll be chipping away at it as soon as I get back from the holidays! Cheers, Anthony |
The terrific validation dataset provides both the input DICOMs as well as the reference conversion to BIDS.
I notice there is an error for TimeZero in the file
sub-GeneralElectricSignaAarhus_pet.json
. The DICOM image suggests this is at 1pm using 24-hour time format:but the JSON suggests 1am (12-hour format does not disambiguate morning or afternoon).
The text was updated successfully, but these errors were encountered: