Skip to content
Snippets Groups Projects
Commit e0eafaf3 authored by Tamino Huxohl's avatar Tamino Huxohl
Browse files

correctly pass args in recon script

parent df4cde3d
No related branches found
No related tags found
No related merge requests found
...@@ -69,16 +69,16 @@ OSMAPOSLParameters := ...@@ -69,16 +69,16 @@ OSMAPOSLParameters :=
; warning: do not normally use together with a prior ; warning: do not normally use together with a prior
;inter-iteration filter subiteration interval := 4 ;inter-iteration filter subiteration interval := 4
;inter-iteration filter type := Separable Gaussian ;inter-iteration filter type := Separable Gaussian
post-filter type := Separable Gaussian ;post-filter type := Separable Gaussian
separable gaussian filter parameters := ;separable gaussian filter parameters :=
x-dir filter fwhm (in mm) := 6 ;x-dir filter fwhm (in mm) := 6
y-dir filter fwhm (in mm) := 6 ;y-dir filter fwhm (in mm) := 6
z-dir filter fwhm (in mm) := 6 ;z-dir filter fwhm (in mm) := 6
x-dir maximum kernel size := 129 ;x-dir maximum kernel size := 129
y-dir maximum kernel size := 129 ;y-dir maximum kernel size := 129
z-dir maximum kernel size := 31 ;z-dir maximum kernel size := 31
Normalise filter to 1 := 1 ;Normalise filter to 1 := 1
end separable gaussian filter parameters := ;end separable gaussian filter parameters :=
END := END :=
""" """
...@@ -112,6 +112,7 @@ def reconstruct( ...@@ -112,6 +112,7 @@ def reconstruct(
init: Optional[Tuple[Dict[str, str], np.ndarray]] = None, init: Optional[Tuple[Dict[str, str], np.ndarray]] = None,
n_subsets: Optional[int] = 4, n_subsets: Optional[int] = 4,
n_iterations: Optional[int] = 10, n_iterations: Optional[int] = 10,
**kwargs,
): ):
# sanitize parameters # sanitize parameters
n_subiterations = n_subsets * n_iterations n_subiterations = n_subsets * n_iterations
...@@ -222,7 +223,11 @@ if __name__ == "__main__": ...@@ -222,7 +223,11 @@ if __name__ == "__main__":
else: else:
projection = load_as_interfile(args.projection) projection = load_as_interfile(args.projection)
header, image = reconstruct(projection, mu_map=mu_map) kwargs = vars(args)
del kwargs["mu_map"]
del kwargs["projection"]
print(kwargs)
header, image = reconstruct(projection, mu_map=mu_map, **kwargs)
image = image[:, :, ::-1] image = image[:, :, ::-1]
write_interfile(args.out, header, image) write_interfile(args.out, header, image)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment