@@ -178,6 +178,8 @@ def run(fpets, fmris, Cnt, tracer='pib', flip_pet=None, bias_corr=True, cmass_co
178178 and CL ,`csv_metrics`='long'
179179 """
180180
181+ if not voxsz in [1 , 2 ]:
182+ raise ValueError ('Voxel size can only be integer and 1 or 2 mm' )
181183
182184 # > the processing stage must be one of registration 'r',
183185 # > normalisation 'n', CL scaling 'c' or full 'f':
@@ -593,7 +595,8 @@ def run(fpets, fmris, Cnt, tracer='pib', flip_pet=None, bias_corr=True, cmass_co
593595 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
594596 # transaxial tiling for QC
595597 # choose the shape of the mosaic/tiled image
596- izs = np .array ([[30 , 40 , 50 ], [60 , 70 , 80 ]])
598+ #izs = np.array([[30, 40, 50], [60, 70, 80]])
599+ izs = np .array ([[60 , 80 , 100 ], [120 , 140 , 160 ]]) // voxsz
597600
598601 # get the shape of the mosaic
599602 shp = izs .shape
@@ -618,7 +621,8 @@ def run(fpets, fmris, Cnt, tracer='pib', flip_pet=None, bias_corr=True, cmass_co
618621 # Sagittal tiling for QC
619622
620623 # choose the shape of the mosaic/tiled image
621- ixs = np .array ([[20 , 30 , 40 ], [50 , 60 , 70 ]])
624+ # ixs = np.array([[20, 30, 40], [50, 60, 70]])
625+ ixs = np .array ([[40 , 60 , 80 ], [100 , 120 , 140 ]]) // voxsz
622626
623627 # get the shape of the mosaic
624628 shp = ixs .shape
@@ -657,13 +661,13 @@ def run(fpets, fmris, Cnt, tracer='pib', flip_pet=None, bias_corr=True, cmass_co
657661 urstr = ", " .join ([
658662 f"PiB transformed: $UR_{{WC}}=${ ur ['wc' ]:.3f} " , f"$UR_{{GMC}}=${ ur ['cg' ]:.3f} " ,
659663 f"$UR_{{CBS}}=${ ur ['wcb' ]:.3f} " , f"$UR_{{PNS}}=${ ur ['pns' ]:.3f} " ])
660- ax [1 ].text (0 , 190 , urstr , fontsize = 12 )
664+ ax [1 ].text (0 , 380 / voxsz , urstr , fontsize = 12 )
661665
662666 if tracer != 'new' :
663667 clstr = ", " .join ([
664668 f"$CL_{{WC}}=${ cl ['wc' ]:.1f} " , f"$CL_{{GMC}}=${ cl ['cg' ]:.1f} " ,
665669 f"$CL_{{CBS}}=${ cl ['wcb' ]:.1f} " , f"$CL_{{PNS}}=${ cl ['pns' ]:.1f} " ])
666- ax [1 ].text (0 , 205 , clstr , fontsize = 12 )
670+ ax [1 ].text (0 , 410 / voxsz , clstr , fontsize = 12 )
667671
668672 plt .tight_layout ()
669673 fig .subplots_adjust (left = 0.05 , right = 0.95 , bottom = 0.05 , top = 0.95 , hspace = 0.1 , wspace = 0.1 )
0 commit comments