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

ENH: Add itk_image_to_multiscale method #46

Merged
merged 1 commit into from
May 19, 2022

Conversation

tbirdso
Copy link
Collaborator

@tbirdso tbirdso commented May 18, 2022

Adds helper method for directly converting an itk.Image object to a
MultiscaleSpatialImage. Includes 2D and 3D tests and updates ITK
conversion example.

Includes workaround for itk.xarray_from_image reference counting issue
resolved in
InsightSoftwareConsortium/ITK#3438 to be included in itk>v5.3rc04 packages.

Resolves #44.

@tbirdso tbirdso requested a review from thewtex May 18, 2022 13:54
@tbirdso tbirdso marked this pull request as ready for review May 18, 2022 14:13
thewtex
thewtex previously approved these changes May 18, 2022
Copy link
Contributor

@thewtex thewtex left a comment

Choose a reason for hiding this comment

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

@tbirdso absolutely awesome!! 💯 🥇

One item -- can we please continue to use the xarray/matplotlib methods in the notebook example to demonstrate best practices and the value of MultiscaleSpatialImage. This display:

  • Accounts for anisotropic spacing correctly in the spatial metadata
  • Displays the correct values along the axis in physical space
  • Displays the anatomical orientation

For an interactive, 3D view of the data, we will soon have itkwidgets, which will also display this information :-)

@thewtex thewtex dismissed their stale review May 18, 2022 15:09

Note changes requested

Copy link
Contributor

@thewtex thewtex left a comment

Choose a reason for hiding this comment

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

Please see notes about the notebook

@thewtex
Copy link
Contributor

thewtex commented May 18, 2022

CC @PaulHax @bnmajor @lydiang

Adds helper method for directly converting an `itk.Image` object to a
`MultiscaleSpatialImage`. Includes 2D and 3D tests and updates ITK
conversion example.

Includes workaround for `itk.xarray_from_image` reference counting issue
resolved in
[https://github.com/InsightSoftwareConsortium/ITK/pull/3438](https://github.com/InsightSoftwareConsortium/ITK/pull/3438) to be included in itk>v5.3rc04 packages.
@tbirdso
Copy link
Collaborator Author

tbirdso commented May 19, 2022

@thewtex Sure thing, I have reverted the notebook to rely on xarray/matplotlib visuals

@thewtex
Copy link
Contributor

thewtex commented May 19, 2022

@tbirdso thanks!

@thewtex thewtex merged commit 1a7fc5f into spatial-image:main May 19, 2022
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.

Add itk_image_to_multiscale
2 participants