Skip to content

Commit 2c61a42

Browse files
committed
reconstruction methods updates
1 parent 47e2bfe commit 2c61a42

13 files changed

+56
-38
lines changed

httomo_backends/methods_database/packages/backends/httomolibgpu/httomolibgpu.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ prep:
145145
method: module
146146
recon:
147147
algorithm:
148-
FBP:
148+
FBP3d_tomobar:
149149
pattern: sinogram
150150
output_dims_change: True
151151
implementation: gpu_cupy
@@ -154,7 +154,7 @@ recon:
154154
memory_gpu:
155155
multiplier: None
156156
method: module
157-
SIRT:
157+
SIRT3d_tomobar:
158158
pattern: sinogram
159159
output_dims_change: True
160160
implementation: gpu_cupy
@@ -163,7 +163,7 @@ recon:
163163
memory_gpu:
164164
multiplier: None
165165
method: module
166-
CGLS:
166+
CGLS3d_tomobar:
167167
pattern: sinogram
168168
output_dims_change: True
169169
implementation: gpu_cupy

httomo_backends/methods_database/packages/backends/httomolibgpu/supporting_funcs/recon/algorithm.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
from httomo_backends.cufft import CufftType, cufft_estimate_1d
2727

2828
__all__ = [
29-
"_calc_memory_bytes_FBP",
30-
"_calc_memory_bytes_SIRT",
31-
"_calc_memory_bytes_CGLS",
32-
"_calc_output_dim_FBP",
33-
"_calc_output_dim_SIRT",
34-
"_calc_output_dim_CGLS",
29+
"_calc_memory_bytes_FBP3d_tomobar",
30+
"_calc_memory_bytes_SIRT3d_tomobar",
31+
"_calc_memory_bytes_CGLS3d_tomobar",
32+
"_calc_output_dim_FBP3d_tomobar",
33+
"_calc_output_dim_SIRT3d_tomobar",
34+
"_calc_output_dim_CGLS3d_tomobar",
3535
]
3636

3737

@@ -49,19 +49,19 @@ def __calc_output_dim_recon(non_slice_dims_shape, **kwargs):
4949
return output_dims
5050

5151

52-
def _calc_output_dim_FBP(non_slice_dims_shape, **kwargs):
52+
def _calc_output_dim_FBP3d_tomobar(non_slice_dims_shape, **kwargs):
5353
return __calc_output_dim_recon(non_slice_dims_shape, **kwargs)
5454

5555

56-
def _calc_output_dim_SIRT(non_slice_dims_shape, **kwargs):
56+
def _calc_output_dim_SIRT3d_tomobar(non_slice_dims_shape, **kwargs):
5757
return __calc_output_dim_recon(non_slice_dims_shape, **kwargs)
5858

5959

60-
def _calc_output_dim_CGLS(non_slice_dims_shape, **kwargs):
60+
def _calc_output_dim_CGLS3d_tomobar(non_slice_dims_shape, **kwargs):
6161
return __calc_output_dim_recon(non_slice_dims_shape, **kwargs)
6262

6363

64-
def _calc_memory_bytes_FBP(
64+
def _calc_memory_bytes_FBP3d_tomobar(
6565
non_slice_dims_shape: Tuple[int, int],
6666
dtype: np.dtype,
6767
**kwargs,
@@ -118,7 +118,7 @@ def _calc_memory_bytes_FBP(
118118

119119
# 7. astra backprojection will generate an output array
120120
# https://github.com/dkazanc/ToMoBAR/blob/54137829b6326406e09f6ef9c95eb35c213838a7/tomobar/astra_wrappers/astra_base.py#L524
121-
output_dims = _calc_output_dim_FBP(non_slice_dims_shape, **kwargs)
121+
output_dims = _calc_output_dim_FBP3d_tomobar(non_slice_dims_shape, **kwargs)
122122
recon_output_size = np.prod(output_dims) * np.float32().itemsize
123123

124124
# 7. astra backprojection makes a copy of the input
@@ -148,14 +148,14 @@ def _calc_memory_bytes_FBP(
148148
return (tot_memory_bytes, fixed_amount)
149149

150150

151-
def _calc_memory_bytes_SIRT(
151+
def _calc_memory_bytes_SIRT3d_tomobar(
152152
non_slice_dims_shape: Tuple[int, int],
153153
dtype: np.dtype,
154154
**kwargs,
155155
) -> Tuple[int, int]:
156156
DetectorsLengthH = non_slice_dims_shape[1]
157157
# calculate the output shape
158-
output_dims = _calc_output_dim_SIRT(non_slice_dims_shape, **kwargs)
158+
output_dims = _calc_output_dim_SIRT3d_tomobar(non_slice_dims_shape, **kwargs)
159159

160160
in_data_size = np.prod(non_slice_dims_shape) * dtype.itemsize
161161
out_data_size = np.prod(output_dims) * dtype.itemsize
@@ -166,14 +166,14 @@ def _calc_memory_bytes_SIRT(
166166
return (tot_memory_bytes, 0)
167167

168168

169-
def _calc_memory_bytes_CGLS(
169+
def _calc_memory_bytes_CGLS3d_tomobar(
170170
non_slice_dims_shape: Tuple[int, int],
171171
dtype: np.dtype,
172172
**kwargs,
173173
) -> Tuple[int, int]:
174174
DetectorsLengthH = non_slice_dims_shape[1]
175175
# calculate the output shape
176-
output_dims = _calc_output_dim_CGLS(non_slice_dims_shape, **kwargs)
176+
output_dims = _calc_output_dim_CGLS3d_tomobar(non_slice_dims_shape, **kwargs)
177177

178178
in_data_size = np.prod(non_slice_dims_shape) * dtype.itemsize
179179
out_data_size = np.prod(output_dims) * dtype.itemsize

httomo_backends/pipelines_full/gpu_360_distortion_FBP_directive.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
module_path: httomolibgpu.misc.morph
1111
- method: remove_stripe_based_sorting
1212
module_path: httomolibgpu.prep.stripe
13-
- method: FBP
13+
- method: FBP3d_tomobar
1414
module_path: httomolibgpu.recon.algorithm
1515
- method: calculate_stats
1616
module_path: httomo.methods

httomo_backends/pipelines_full/gpu_360_paganin_FBP_directive.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
module_path: httomolibgpu.recon.rotation
77
- method: sino_360_to_180
88
module_path: httomolibgpu.misc.morph
9-
- method: paganin_filter_tomopy
10-
module_path: httomolibgpu.prep.phase
119
- method: remove_stripe_based_sorting
1210
module_path: httomolibgpu.prep.stripe
13-
- method: FBP
11+
- method: paganin_filter_tomopy
12+
module_path: httomolibgpu.prep.phase
13+
- method: FBP3d_tomobar
1414
module_path: httomolibgpu.recon.algorithm
1515
- method: calculate_stats
1616
module_path: httomo.methods

httomo_backends/pipelines_full/gpu_diad_FBP_directive.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
module_path: httomolibgpu.prep.normalize
99
- method: remove_stripe_based_sorting
1010
module_path: httomolibgpu.prep.stripe
11-
- method: FBP
11+
- method: FBP3d_tomobar
1212
module_path: httomolibgpu.recon.algorithm
1313
- method: calculate_stats
1414
module_path: httomo.methods

httomo_backends/pipelines_full/gpu_diad_FBP_noimagesaving_directive.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
module_path: httomolibgpu.prep.normalize
99
- method: remove_stripe_based_sorting
1010
module_path: httomolibgpu.prep.stripe
11-
- method: FBP
11+
- method: FBP3d_tomobar
1212
module_path: httomolibgpu.recon.algorithm
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- method: standard_tomo
2+
module_path: httomo.data.hdf.loaders
3+
- method: find_center_vo
4+
module_path: httomolibgpu.recon.rotation
5+
- method: normalize
6+
module_path: httomolibgpu.prep.normalize
7+
- method: FBP2d_astra
8+
module_path: httomolibgpu.recon.algorithm
9+

httomo_backends/pipelines_full/gpu_pipelineFBP_denoising_directive.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
module_path: httomolibgpu.prep.normalize
99
- method: remove_all_stripe
1010
module_path: httomolibgpu.prep.stripe
11-
- method: FBP
11+
- method: FBP3d_tomobar
1212
module_path: httomolibgpu.recon.algorithm
1313
- method: total_variation_PD
1414
module_path: httomolibgpu.misc.denoise

httomo_backends/pipelines_full/gpu_pipelineFBP_directive.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
module_path: httomolibgpu.prep.normalize
99
- method: remove_all_stripe
1010
module_path: httomolibgpu.prep.stripe
11-
- method: FBP
11+
- method: FBP3d_tomobar
1212
module_path: httomolibgpu.recon.algorithm
1313
- method: calculate_stats
1414
module_path: httomo.methods
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
- method: standard_tomo
2+
module_path: httomo.data.hdf.loaders
3+
- method: find_center_vo
4+
module_path: httomolibgpu.recon.rotation
5+
- method: normalize
6+
module_path: httomolibgpu.prep.normalize
7+
- method: LPRec3d_tomobar
8+
module_path: httomolibgpu.recon.algorithm
9+

0 commit comments

Comments
 (0)