@@ -53,7 +53,7 @@ def get_parameters(self):
5353 def setup (self ):
5454 super (BaseAstraRecon , self ).setup ()
5555 out_dataset = self .get_out_datasets ()
56- # is res_norm is required then setup another output dataset
56+ # if res_norm is required then setup another output dataset
5757 if len (out_dataset ) is 2 :
5858 self .res = True
5959 out_pData = self .get_plugin_out_datasets ()
@@ -71,8 +71,6 @@ def setup(self):
7171 self .get_max_frames (), fixed = True )
7272
7373 def pre_process (self ):
74- # *****check here if there are deviations in the cor and determine the algorithm***
75- # perhaps do the above in base pre-process
7674 self .alg , self .iters = self .get_parameters ()
7775 if '3D' in self .alg :
7876 self .setup_3D ()
@@ -189,9 +187,11 @@ def set_config(self, rec_id, sino_id, proj_geom, vol_geom):
189187 proj_id = astra .create_projector (
190188 self .parameters ['projector' ], proj_geom , vol_geom )
191189 cfg ['ProjectorId' ] = proj_id
192- # if self.mask_id:
193- # cfg['option'] = {}
194- # cfg['option']['ReconstructionMaskId'] = self.mask_id
190+ # mask not currently working correctly for SIRT or SART algorithms
191+ sirt_or_sart = [a for a in ['SIRT' , 'SART' ] if a in self .alg ]
192+ if self .mask_id and not sirt_or_sart :
193+ cfg ['option' ] = {}
194+ cfg ['option' ]['ReconstructionMaskId' ] = self .mask_id
195195 cfg = self .set_options (cfg )
196196 return cfg
197197
@@ -227,7 +227,6 @@ def array_pad(self, ctr, nPixels):
227227 return np .array ([int (p_low ), int (p_high )])
228228
229229 def get_max_frames (self ):
230- #return 8 if "3D" in self.get_parameters()[0] else 1
231230 return 8
232231
233232## Add this as citation information:
0 commit comments