-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5feec42
commit 3273b4a
Showing
2 changed files
with
15 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,13 +14,15 @@ | |
|
||
s = readstruct([file.folder,'\',file.name]); | ||
|
||
if ~strcmp(s.ScanParameter.HelixMode,'false') | ||
error("Helix mode reading not implemented") | ||
end | ||
|
||
if ~strcmp(s.ScanParameter.Laminography, 'false') | ||
error("Laminography mode reading not implemented") | ||
end | ||
|
||
|
||
geo.offOrigin = [0;0;0]; | ||
geo.offDetector = [0;0]; | ||
|
||
geo.nDetector = [s.Recon.ProjectionDimX; s.Recon.ProjectionDimY]; | ||
geo.dDetector = [s.Recon.ProjectionPixelSizeX; s.Recon.ProjectionPixelSizeY]; | ||
geo.sDetector = geo.nDetector.*geo.dDetector; | ||
|
@@ -31,14 +33,20 @@ | |
|
||
geo.DSD = s.Geometrie.SourceDetectorDist; | ||
geo.DSO = s.Geometrie.SourceObjectDist; | ||
geo.COR = s.Recon.ProjectionCenterOffsetX; | ||
geo.COR = -s.Recon.ProjectionCenterOffsetX*s.Recon.ProjectionPixelSizeX; | ||
|
||
if s.Recon.ProjectionCount ~= s.Recon.ProjectionCountPer360deg | ||
warning("Never tested with angles not in 360deg. If it doesnt work please contact [email protected] to help improve this loader"); | ||
end | ||
angles=linspace(0,2*pi,s.Recon.ProjectionCount); | ||
angles=-angles(1:end-1); | ||
|
||
if ~strcmp(s.ScanParameter.HelixMode,'True') | ||
z_step = -s.ScanParameter.HelixPerStepDistanceZ; | ||
offsetz=linspace(0,z_step*length(angles)-z_step,length(angles)); | ||
offsetz = offsetz-offsetz(end)/2; | ||
geo.offOrigin=[zeros(1,length(angles));zeros(1,length(angles));offsetz]; | ||
end | ||
|
||
height = char(s.Geometrie.Slices.string()); | ||
height = height(1:strfind(s.Geometrie.Slices.string,"mm")-2); | ||
|