@@ -1202,8 +1202,7 @@ def resample_from_to(self, to_vox_map:Image_Reference|Has_Grid|tuple[SHAPE,AFFIN
12021202 pad = tuple ((int (b ), int (a )) for b , a in zip (pad_before , pad_after ))
12031203 ret = s .apply_pad (pad , mode = mode ,inplace = inplace ,verbose = verbose )
12041204
1205- #TODO SET raise_error=False before committing
1206- valid = ret .assert_affine (mapping ,raise_error = True ,origin_tolerance = 0.0001 ,error_tolerance = 0.0001 ,shape_tolerance = 0 )
1205+ valid = ret .assert_affine (mapping ,raise_error = False ,origin_tolerance = 0.0001 ,error_tolerance = 0.0001 ,shape_tolerance = 0 )
12071206 if valid :
12081207 log .print (f"resample_from_to only needs padding/cropping { pad } " ,verbose = verbose )
12091208 ret .affine = mapping .affine #remove floating point error
@@ -2446,7 +2445,7 @@ def to_stls(
24462445
24472446 def to_stl (
24482447 self : NII ,
2449- label : int ,
2448+ label : int | Enum | Sequence [ int ] | Sequence [ Enum ] ,
24502449 out_path : Path | dict [int , Path ] | None = None ,
24512450 bb : tuple | None = None ,
24522451 to_world : bool = True ,
@@ -2499,7 +2498,6 @@ def to_stl(
24992498 not support per-vertex attributes such as scalar values from marching cubes.
25002499 """
25012500 from stl import mesh
2502-
25032501 seg = self .extract_label (label )
25042502 # Prepare binary mask
25052503 seg_arr = np .pad (seg .clamp (0 , 1 ).get_array (), 1 )
0 commit comments