@@ -299,6 +299,7 @@ def LPRec3d_tomobar(
299299 recon_size ,
300300 recon_mask_radius ,
301301 gpu_id = 0 ,
302+ mem_stack = DeviceMemStack ().instance (),
302303 )
303304 __check_variable_type (
304305 filter_type ,
@@ -1099,15 +1100,17 @@ def __common_data_parameters_check(
10991100 recon_size ,
11001101 recon_mask_radius ,
11011102 gpu_id ,
1103+ mem_stack = None ,
11021104):
11031105 ### Data and parameters checks ###
1104- __check_if_data_3D_array (data , methods_name )
1105- __check_if_data_correct_type (
1106- data , accepted_type = ["float32" , "uint16" ], methods_name = methods_name
1107- )
1108- if len (angles ) != data .shape [0 ]:
1109- err_str = f"The angles length { len (angles )} is not equal to the input data angles dimension { data .shape [0 ]} for method '{ methods_name } '."
1110- raise ValueError (err_str )
1106+ if mem_stack is None :
1107+ __check_if_data_3D_array (data , methods_name )
1108+ __check_if_data_correct_type (
1109+ data , accepted_type = ["float32" , "uint16" ], methods_name = methods_name
1110+ )
1111+ if len (angles ) != data .shape [0 ]:
1112+ err_str = f"The angles length { len (angles )} is not equal to the input data angles dimension { data .shape [0 ]} for method '{ methods_name } '."
1113+ raise ValueError (err_str )
11111114 __check_variable_type (center , [float , int , type (None )], "center" , [], methods_name )
11121115 __check_variable_type (detector_pad , [bool , int ], "detector_pad" , [], methods_name )
11131116 __check_variable_type (recon_size , [int , type (None )], "recon_size" , [], methods_name )
0 commit comments