Skip to content

ENH: Add ngff-zarr multi-resolution registration example#375

Open
thewtex wants to merge 1 commit intomainfrom
9566-example-demonstr
Open

ENH: Add ngff-zarr multi-resolution registration example#375
thewtex wants to merge 1 commit intomainfrom
9566-example-demonstr

Conversation

@thewtex
Copy link
Member

@thewtex thewtex commented Mar 9, 2026

Add Example 23 demonstrating a workflow that combines ngff-zarr multi-resolution image pyramids with ITKElastix registration:

  • Convert ITK images to ngff-zarr Multiscales via to_multiscales
  • Register at a coarse resolution (rigid + affine + bspline)
  • Convert Elastix results to itk.CompositeTransform
  • Apply the transform at full resolution in parallel using dask.array.map_blocks with itk.resample_image_filter

Uses itk_image_to_ngff_image and ngff_image_to_itk_image to bridge between ITK and ngff-zarr data representations.

Add Example 23 demonstrating a workflow that combines ngff-zarr
multi-resolution image pyramids with ITKElastix registration:

- Convert ITK images to ngff-zarr Multiscales via to_multiscales
- Register at a coarse resolution (rigid + affine + bspline)
- Convert Elastix results to itk.CompositeTransform
- Apply the transform at full resolution in parallel using
  dask.array.map_blocks with itk.resample_image_filter

Uses itk_image_to_ngff_image and ngff_image_to_itk_image to bridge
between ITK and ngff-zarr data representations.
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@thewtex thewtex requested a review from N-Dekker March 9, 2026 12:18
@N-Dekker
Copy link
Collaborator

N-Dekker commented Mar 9, 2026

@thewtex Please do git rebase main on this PR! It appears 14 commits behind!

By the way, what does "9566-example-demonstr" mean?

"source": [
"import itk\n",
"import numpy as np\n",
"import dask.array as da\n",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should dask be added to "requirements.txt"? Or maybe just dask-core?

"source": [
"## Load Images\n",
"\n",
"We load the fixed and moving 2D CT head images as ITK float images, which are required by Elastix."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it still required to use float images?

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