@@ -381,7 +381,7 @@ def _get_bins(path_bins: Path) -> list[str]:
381381 affine = Affine (affine_matrix , input_axes = ("x" , "y" ), output_axes = ("x" , "y" ))
382382
383383 # determine the size of the transformed image
384- bounding_box = get_extent (image )
384+ bounding_box = get_extent (image , coordinate_system = dataset_id )
385385 x0 , x1 = bounding_box ["x" ]
386386 y0 , y1 = bounding_box ["y" ]
387387 x1 -= 1
@@ -412,7 +412,7 @@ def _get_bins(path_bins: Path) -> list[str]:
412412 numpy_data , ProjectiveTransform (projective_shift ).inverse , output_shape = transformed_shape , order = 1
413413 )
414414 warped = np .round (warped * 255 ).astype (np .uint8 )
415- warped = Image2DModel .parse (warped , dims = ("y" , "x" , "c" ), transformations = {"global" : affine }, rgb = True )
415+ warped = Image2DModel .parse (warped , dims = ("y" , "x" , "c" ), transformations = {dataset_id : affine }, rgb = True )
416416
417417 # we replace the cytassist image with the warped image
418418 images [dataset_id + "_cytassist_image" ] = warped
@@ -466,7 +466,7 @@ def _load_image(
466466) -> None :
467467 if path .exists ():
468468 if path .suffix != ".btf" :
469- data = imread (path , ** imread_kwargs )
469+ data = imread (path )
470470 if len (data .shape ) == 4 :
471471 # this happens for the cytassist, hires and lowres images; the umi image doesn't need processing
472472 data = data .squeeze ()
@@ -486,7 +486,13 @@ def _load_image(
486486 )
487487
488488 image = DataArray (data , dims = ("c" , "y" , "x" ))
489- parsed = Image2DModel .parse (image , scale_factors = scale_factors , rgb = None , ** image_models_kwargs )
489+ parsed = Image2DModel .parse (
490+ image ,
491+ scale_factors = scale_factors ,
492+ rgb = None ,
493+ transformations = {dataset_id : Identity ()},
494+ ** image_models_kwargs ,
495+ )
490496 images [dataset_id + suffix ] = parsed
491497 else :
492498 warnings .warn (f"File { path } does not exist, skipping it." , UserWarning , stacklevel = 2 )
0 commit comments