Project-MONAI / Project-MONAI/MONAI

Compose deformation vector fields (DVFs)

Open
#4,604 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature request
Dominant language
Python
Stars
8.7k
Forks
1.6k
Avg merge
5d 1h
Merged PRs (30d)
20

Description

Is your feature request related to a problem? Please describe.
Does MONAI have code to compose 2 DVFs together? In image registration, we often encounter multi-stage registration. A series of DVF will be generated to warp the moving image sequentially. However, each warping will blur the image a bit due to interpolation. The best approach is to compose the DVF first and warp the image only once.

Describe the solution you'd like
The TensorFlow version of voxelmorph already has this feature implemented. But not in PyTorch. It would be great if it is available in MONAI in PyTorch.
The following 3 functions in voxelmorph and neurite are related to the task:
https://github.com/voxelmorph/voxelmorph/blob/dev/voxelmorph/tf/utils/utils.py: def compose(transforms, interp_method='linear', shift_center=True, indexing='ij')
https://github.com/voxelmorph/voxelmorph/blob/dev/voxelmorph/tf/utils/utils.py: def transform(vol, loc_shift, interp_method='linear', indexing='ij', fill_value=None)
https://github.com/adalca/neurite/blob/dev/neurite/tf/utils/utils.py: def interpn(vol, loc, interp_method='linear', fill_value=None)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the referenced voxelmorph functions compose and transform in voxelmorph/tf/utils/utils.py with neurite's interpn in neurite/tf/utils/utils.py. Determine how their DVF composition behavior maps to MONAI's PyTorch API, then add focused coverage for sequential deformation composition and a single resulting warp; done means the requested PyTorch functionality is available and tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch, tensorflow
Domain
computer-vision, machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.