Skip to content

Commit

Permalink
More phantom conversion fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bilgelm committed Mar 4, 2024
1 parent 4a8635f commit f6d4993
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 23 deletions.
50 changes: 32 additions & 18 deletions scripts/matlab_conversions.m
Original file line number Diff line number Diff line change
Expand Up @@ -471,17 +471,23 @@
meta.Units = 'Bq/mL';
meta.TracerName = 'FDG';
meta.TracerRadionuclide = 'F18';
meta.InjectedRadioactivity = 81.24; % Mbq
meta.SpecificRadioactivity = 1.3019e+04; % ~ 81240000 Bq/ 6240 g
meta.InjectedRadioactivity = 0.788;
meta.InjectedRadioactivityUnits = 'mCi';
meta.SpecificRadioactivity = 'n/a';
meta.SpecificRadioactivityUnits = 'n/a';
meta.ModeOfAdministration = 'infusion';
meta.AcquisitionMode = 'list mode';
meta.ImageDecayCorrected = true; % when passing this as string it fails validation
meta.ImageDecayCorrectionTime = 0;
meta.ReconFilterType = 'none';
meta.ReconFilterSize = 0;
meta.ReconFilterType = 'Gaussian';
meta.ReconFilterSize = 2;
meta.AttenuationCorrection = 'transmission scan with a 137Cs point source';
% meta.FrameDuration = 1200; % not needed, encoded in ecat even for 4D images
% meta.FrameTimesStart = 0;
meta.ScatterCorrectionMethod = 'Single-scatter simulation';
meta.ScanStart = 0;
meta.InjectionStart = -2183;
meta.ReconMethodParameterLabels = ["subsets" "iterations"];
meta.ReconMethodParameterLabels = ["none" "none"];
meta.ReconMethodParameterValues = [16 2];

out = ecat2nii(fullfile(source,['SiemensHRRT-JHU' filesep 'Hoffman.v']),...
meta,'gz',true,'FileListOut',fullfile(destination,['sub-SiemensHRRTJHU' filesep 'pet' filesep 'sub-SiemensHRRTJHU.nii']));
Expand All @@ -503,23 +509,25 @@
meta.Units = 'Bq/mL';
meta.TracerName = 'FDG';
meta.TracerRadionuclide = 'F18';
meta.InjectedRadioactivity = 75.8500; % Mbq
meta.SpecificRadioactivity = 418713.8; % ~ 75850000 Bq/ 6240 g
meta.InjectedRadioactivity = 0.788;
meta.InjectedRadioactivityUnits = 'mCi';
meta.SpecificRadioactivity = 'n/a';
meta.SpecificRadioactivityUnits = 'n/a';
meta.ModeOfAdministration = 'infusion';
meta.ScanStart = 0;
meta.InjectionStart = -5336;
meta.FrameTimesStart = 0;
meta.AcquisitionMode = 'list mode';
meta.ImageDecayCorrected = 'true';
meta.ImageDecayCorrectionTime = 0;
meta.ScatterCorrectionMethod = 'Gaussian Fit';
meta.FrameDuration = 98000;
meta.FrameTimesStart = 0;
meta.ReconMethodName = 'filtered backprojection with ramp filter';
meta.ScatterCorrectionMethod = 'Single-scatter simulation';
meta.ReconMethodName = '3D Reprojection';
meta.ReconMethodParameterLabels = ["none"];
meta.ReconParameterUnits = ["none"];
meta.ReconMethodParameterValues = [0];
meta.ReconFilterType = "none";
meta.ReconFilterSize = 1;
meta.AttenuationCorrection = '2D-acquired transmission scan with a 68Ge rod source';
meta.ReconFilterSize = 0;
meta.AttenuationCorrection = '2D-acquired transmission scan with a 68Ge pin';

dcm2niix4pet(fullfile(source,'GeneralElectricAdvance-JHU'),...
meta,'o',fullfile(destination,['sub-GeneralElectricAdvanceJHU' filesep 'pet']));
Expand All @@ -544,16 +552,22 @@
meta.Units = 'Bq/mL';
meta.TracerName = 'FDG';
meta.TracerRadionuclide = 'F18';
meta.InjectedRadioactivity = 32.19; % Mbq
meta.SpecificRadioactivity = 32190000/6240;
meta.InjectedRadioactivity = 0.87;
meta.InjectedRadioactivityUnits = 'mCi';
meta.SpecificRadioactivity = 'n/a';
meta.SpecificRadioactivityUnits = 'n/a';
meta.ModeOfAdministration = 'infusion';
meta.FrameTimesStart = 0;
meta.ScanStart = 0;
meta.InjectionStart = -2312;
meta.FrameTimesStart = [0 300 600 900];
meta.AcquisitionMode = 'list mode';
meta.ImageDecayCorrected = 'true';
meta.ImageDecayCorrectionTime = 0;
meta.ReconMethodParameterLabels = ["subsets" "iterations"];
meta.ReconMethodParameterLabels = ["none" "none"];
meta.ReconMethodParameterValues = [24 5];
meta.ReconFilterType = "Gaussian";
meta.ReconFilterSize = 2;
meta.ReconFilterSize = 4;

dcm2niix4pet(fullfile(source,'CanonCartesionPrimePETCT-NIA'),...
meta,'o',fullfile(destination,['sub-CanonCartesionPrimeNIA' filesep 'pet']));
Expand Down
10 changes: 5 additions & 5 deletions scripts/python_conversions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ ReconMethodParameterUnits="[none, none]" \
ReconMethodParameterValues="[0, 0]" \
--silent

# John Hopkins University
# -----------------------
# Johns Hopkins University
# ------------------------

# Siemens HRRT
# ------------
Expand All @@ -433,8 +433,6 @@ ModeOfAdministration='infusion' \
AcquisitionMode='list mode' \
ImageDecayCorrected=true \
ImageDecayCorrectionTime=0 \
ReconFilterType='none' \
ReconFilterSize=0 \
AttenuationCorrection='transmission scan with a 137Cs point source' \
ScatterCorrectionMethod='Single-scatter simulation' \
ScanStart=0 \
Expand Down Expand Up @@ -467,7 +465,9 @@ AcquisitionMode='list mode' \
ImageDecayCorrected='true' \
ImageDecayCorrectionTime=0 \
ScatterCorrectionMethod='Single-scatter simulation' \
FrameTimesStart="[0]" \
ReconMethodParameterLabels='["none"]' \
ReconMethodParameterUnits='["none"]' \
ReconMethodParameterValues='[0]' \
ReconFilterType="none" \
ReconFilterSize=0 \
AttenuationCorrection='2D-acquired transmission scan with a 68Ge pin'
Expand Down

0 comments on commit f6d4993

Please sign in to comment.