Skip to content

Wrong spatialplot of Affine Transformation #103

Closed

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

Activity

  1. timtreis commented on Jun 14, 2023

    @timtreis
    Member

    Hey @jefferyUstc, thanks for reporting this! We also noticed this yesterday, I'm working with @LucaMarconato on a fix for this (scverse/spatialdata#296). I'll ping you when it's fixed 💪

  2. self-assigned this
    on Jun 14, 2023
  3. added this to the v0.1.0 release milestone on Aug 29, 2023
  4. linked a pull request that will close this issueRefactored transformations implementation #162on Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions