Skip to content

Cropping translated layer not working correctly #52

@perdigao1

Description

@perdigao1

I found this when trying to crop a 3D image/label that was previously cropped.

The current implementation, crops a rectangular region based on the rectangular shape but the result is a translated layer. When trying to crop this result, odd things can happen. In some instances it throws an error
ValueError: cannot convert float NaN to integer

and sometimes it simply gives a strange result.

I suspect that, when the program tries to calculate the region to crop on the actual data, that it assumes that is at default scale of one and located at origin. It would probably be more difficult to implement if the layer is also rotated. If this is true, it may not be an easy fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions