@@ -379,7 +379,7 @@ def _get_bins(path_bins: Path) -> list[str]:
379
379
affine = Affine (affine_matrix , input_axes = ("x" , "y" ), output_axes = ("x" , "y" ))
380
380
381
381
# determine the size of the transformed image
382
- bounding_box = get_extent (image )
382
+ bounding_box = get_extent (image , coordinate_system = dataset_id )
383
383
x0 , x1 = bounding_box ["x" ]
384
384
y0 , y1 = bounding_box ["y" ]
385
385
x1 -= 1
@@ -410,7 +410,7 @@ def _get_bins(path_bins: Path) -> list[str]:
410
410
numpy_data , ProjectiveTransform (projective_shift ).inverse , output_shape = transformed_shape , order = 1
411
411
)
412
412
warped = np .round (warped * 255 ).astype (np .uint8 )
413
- warped = Image2DModel .parse (warped , dims = ("y" , "x" , "c" ), transformations = {"global" : affine }, rgb = True )
413
+ warped = Image2DModel .parse (warped , dims = ("y" , "x" , "c" ), transformations = {dataset_id : affine }, rgb = True )
414
414
415
415
# we replace the cytassist image with the warped image
416
416
images [dataset_id + "_cytassist_image" ] = warped
@@ -484,7 +484,13 @@ def _load_image(
484
484
), "When the image is not in RGB, the first dimension should be the number of channels."
485
485
486
486
image = DataArray (data , dims = ("c" , "y" , "x" ))
487
- parsed = Image2DModel .parse (image , scale_factors = scale_factors , rgb = None , ** image_models_kwargs )
487
+ parsed = Image2DModel .parse (
488
+ image ,
489
+ scale_factors = scale_factors ,
490
+ rgb = None ,
491
+ transformations = {dataset_id : Identity ()},
492
+ ** image_models_kwargs ,
493
+ )
488
494
images [dataset_id + suffix ] = parsed
489
495
else :
490
496
warnings .warn (f"File { path } does not exist, skipping it." , UserWarning , stacklevel = 2 )
0 commit comments