Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DAR-2347][DAR-2768][Internal] Add option for isotropic transform on annotations #864

Conversation

shernshiou
Copy link
Contributor

@shernshiou shernshiou commented Jun 12, 2024

Problem

This PR is to facilitate the new import and export mask and polygon annotation for the future MED_2D_VIEWER release.
We are moving towards mm system at Darwin which means the import and export of mask and polygon have to be rescaled.

Solution

Legacy ON:

  • Mask annotations: Imported with isotropic transformation
  • Polygon annotations: Imported/exported using current calculations (no changes)

Legacy OFF:

  • Mask annotations: Imported raw (no isotropic transformation)
  • Polygon annotations: Imported by multiplying with x, y pixdims (polygon space to mm space)
  • Polygon annotations: Exported by dividing with x, y pixdims (mm space to pixel space)

Changelog

  • Introduce a new legacy flag that maintains the old import export nifty logic.
  • Mask and polygon annotation for nifty will be rescaled during import and export.

Copy link

linear bot commented Jun 12, 2024

@shernshiou shernshiou force-pushed the dar-2347-update-darwin-py-to-accomodate-the-removal-of-isotropic branch 2 times, most recently from bb8d82e to 1e05646 Compare June 12, 2024 12:47
@shernshiou shernshiou changed the title feat: Implement no isotropic annotation [DAR-2347][Internal] Add option for isotropic transform on annotations Jun 13, 2024
@shernshiou shernshiou force-pushed the dar-2347-update-darwin-py-to-accomodate-the-removal-of-isotropic branch from 1e05646 to 3daa22f Compare June 13, 2024 13:13
@shernshiou
Copy link
Contributor Author

Setting this aside awaiting further discussion with @JBWilkie

@shernshiou shernshiou force-pushed the dar-2347-update-darwin-py-to-accomodate-the-removal-of-isotropic branch 2 times, most recently from 6e11241 to 5a093c5 Compare June 21, 2024 14:07
@shernshiou shernshiou requested a review from JBWilkie June 21, 2024 14:35
@shernshiou shernshiou self-assigned this Jun 21, 2024
@shernshiou shernshiou force-pushed the dar-2347-update-darwin-py-to-accomodate-the-removal-of-isotropic branch 6 times, most recently from e77c801 to f502fe6 Compare July 1, 2024 13:10
@shernshiou shernshiou force-pushed the dar-2347-update-darwin-py-to-accomodate-the-removal-of-isotropic branch from f502fe6 to d247d55 Compare July 5, 2024 11:01
@JBWilkie
Copy link
Collaborator

Setting this aside awaiting further discussion with @JBWilkie

@shernshiou Since this piece of work is turning out to be a bit more complex than first anticipated, would you like me to review & test it now, or wait until we've progressed it a bit more?

@shernshiou shernshiou force-pushed the dar-2347-update-darwin-py-to-accomodate-the-removal-of-isotropic branch from 9741844 to d14d8a8 Compare July 12, 2024 11:27
@shernshiou shernshiou marked this pull request as ready for review July 12, 2024 11:34
@shernshiou shernshiou changed the title [DAR-2347][Internal] Add option for isotropic transform on annotations [DAR-2347][DAR-2768][Internal] Add option for isotropic transform on annotations Jul 12, 2024
Copy link

linear bot commented Jul 12, 2024

@shernshiou shernshiou force-pushed the dar-2347-update-darwin-py-to-accomodate-the-removal-of-isotropic branch from d14d8a8 to 95c6964 Compare July 17, 2024 11:35
Copy link
Collaborator

@JBWilkie JBWilkie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed approach with Shern in a call

@shernshiou shernshiou merged commit f1f5467 into master Jul 17, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants