Skip to content

Wrong spatialplot of Affine Transformation #103

@jefferyUstc

Description

@jefferyUstc

With this issue (#101 ) addressed, I run the tutorial Transformations and coordinate systems, https://spatialdata.scverse.org/en/latest/tutorials/notebooks/notebooks/examples/transformations.html

totally following the tutorial, when it comes to the affine transformation, it got wrong spatialplot.

theta = math.pi / 6
rotation = Affine(
    [
        [math.cos(theta), -math.sin(theta), 0],
        [math.sin(theta), math.cos(theta), 0],
        [0, 0, 1],
    ],
    input_axes=("x", "y"),
    output_axes=("x", "y"),
)

set_transformation(sdata.images["raccoon"], rotation, to_coordinate_system="global")

sdata.pl.render_images().pl.render_labels().pl.render_shapes().pl.show()
image

FYI:

(spatialdata) $ pip list | grep spatialdata

napari-spatialdata            0.2.4
spatialdata                   0.0.10
spatialdata-io                0.0.4
spatialdata-plot              0.0.0  ## pip install the version from spatialdata-plot@bugfix/issue100-get_extent-produces-wrong-output-after-spatial-query

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions