Skip to content

Commit 3273b4a

Browse files
committed
Allow Diondo helical scans
1 parent 5feec42 commit 3273b4a

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

MATLAB/Utilities/IO/Diondo/loadDiondoProjections.m

+3-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@
7474
proj(:,:,ii)=-log(proj(:,:,ii)/single(2^16));
7575
end
7676
geo=rmfield(geo,'whitelevel');
77-
%%
77+
if isfield(geo,'offOrigin')
78+
geo.offOrigin = geo.offOrigin(:,index);
79+
end
7880
angles=angles_to_load;
7981
end
8082

MATLAB/Utilities/IO/Diondo/readDiondoGeometry.m

+12-4
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414

1515
s = readstruct([file.folder,'\',file.name]);
1616

17-
if ~strcmp(s.ScanParameter.HelixMode,'false')
18-
error("Helix mode reading not implemented")
19-
end
17+
2018
if ~strcmp(s.ScanParameter.Laminography, 'false')
2119
error("Laminography mode reading not implemented")
2220
end
2321

22+
23+
geo.offOrigin = [0;0;0];
24+
geo.offDetector = [0;0];
25+
2426
geo.nDetector = [s.Recon.ProjectionDimX; s.Recon.ProjectionDimY];
2527
geo.dDetector = [s.Recon.ProjectionPixelSizeX; s.Recon.ProjectionPixelSizeY];
2628
geo.sDetector = geo.nDetector.*geo.dDetector;
@@ -31,14 +33,20 @@
3133

3234
geo.DSD = s.Geometrie.SourceDetectorDist;
3335
geo.DSO = s.Geometrie.SourceObjectDist;
34-
geo.COR = s.Recon.ProjectionCenterOffsetX;
36+
geo.COR = -s.Recon.ProjectionCenterOffsetX*s.Recon.ProjectionPixelSizeX;
3537

3638
if s.Recon.ProjectionCount ~= s.Recon.ProjectionCountPer360deg
3739
warning("Never tested with angles not in 360deg. If it doesnt work please contact tigre.toolbox@gmail.com to help improve this loader");
3840
end
3941
angles=linspace(0,2*pi,s.Recon.ProjectionCount);
4042
angles=-angles(1:end-1);
4143

44+
if ~strcmp(s.ScanParameter.HelixMode,'True')
45+
z_step = -s.ScanParameter.HelixPerStepDistanceZ;
46+
offsetz=linspace(0,z_step*length(angles)-z_step,length(angles));
47+
offsetz = offsetz-offsetz(end)/2;
48+
geo.offOrigin=[zeros(1,length(angles));zeros(1,length(angles));offsetz];
49+
end
4250

4351
height = char(s.Geometrie.Slices.string());
4452
height = height(1:strfind(s.Geometrie.Slices.string,"mm")-2);

0 commit comments

Comments
 (0)