Registration on subregions using DEMONS

Hi all,

Long-time reader, first-time poster here! I’m not sure if this is the right category, but as it’s my first question, I’ll post it here.

I am performing deformable image registration using DEMONS in a 3D domain between same-modality medical images. In the registration process, I encounter large variances in the sizes of the structures I need to register—some are large, while others are very small. Every structure is equally important for this task, and if some are registered well while others are less accurate, the overall result is suboptimal for my needs.

One advantage I have is a rough mask of where the movement is occurring. I’ve tried using itk::simple::ImageRegistrationMethod::SetMetricFixedMask to evaluate the registration only in those regions, but this yielded very little improvement.

I’ve also experimented with:

  • Various combinations of iteration numbers, smoothing sigmas, convergence values, etc.
  • All available optimizers for DEMONS,
  • Different pyramidal registration strategies,
  • Multiscale DEMONS using an initial affine registration followed by DEMONS.

Current Approach and Issue

Now, I’m exploring the idea of obtaining a localized motion vector field by subdividing the 3D volume into smaller, non-uniform 3D subvolumes based on prior knowledge of structure locations and movement ranges.

However, the main challenge I face is how to merge these localized motion vector fields of varying sizes into a single cohesive field. The worflow I was planning to implement is as follows:

  1. Original Image: Size (N, M, K) with spacing (s, s, s) (equal spacing).
  2. Subvolumes: Divide the image into multiple subvolumes with sizes (Ni, Mi, Ki) such that:
    • Sum(Ni) = N,
    • Sum(Mi) = M,
    • Sum(Ki) = K (for i = 0, ..., n).
  3. DEMONS Registration: Perform DEMONS registration on each subvolume.
  4. Merge Motion Fields: Combine the subvolume motion vector fields to apply them to the original image of size (N, M, K).

One workaround I’m considering is:

  • Converting the motion vector fields into NumPy arrays of size (Ni, Mi, Ki, 3) for each subvolume,
  • Merging these arrays into a single array of size (N, M, K, 3), and
  • Returning to the SimpleITK framework to apply the deformation field.

However, this approach feels very suboptimal, as I’ve never switched between NumPy and the ITK/SimpleITK framework for this type of task before.

Questions

  1. Is there a better way to perform step 3 (DEMONS registration on subvolumes)?
  2. Is there a more appropriate way to achieve my overall goal (e.g., using another type of weighting or mask maybe)?
  3. Has anyone faced a similar issue? Any leads on this would be greatly appreciated!

Thanks a lot for your help!

P.S.:

To add context, these are the images I am trying to register in a pyramidal fashion. Top row is the fixed image, middle row is the moving image, bottom row is the difference between movbing and fixed:

In 2D I can register all the structures very well (see image), but in 3D it has been almost impossible to get the right motion vector field for the small structure on the upper left structure of the fixed-moving image.

Hello @ignaciobartol,

Your idea sounds reasonable. It is reminiscent of the work described in Automatic elastic image registration by interpolation of 3D rotations and translations from discrete rigid-body transformations in terms of estimating an independent transformation for different spatial regions.

For combining the 3D images into one image you can use the PasteImageFilter. As transformations in neighboring regions are estimated independently you need to consider how to deal with discontinuities along those boundaries. In some cases abrupt changes make sense, boundary between soft tissue and bone. In other cases, the boundary between two soft tissues should probably not have abrupt changes in the deformation field.

2 Likes

Thanks Ziv @zivy ! Very much appreciated. That paper is indeed interesting and related to what I am doing, thanks for pointing it out.

Oh that filter is very useful, I never thought on a “Paste” operation on my keywords while searching for an answer. I was limiting my search using “join”, “concatenate”, “group” keywords :sweat_smile:. I will take a look into this later today/tomorrow and be mindful about the boundaries. I am expecting to have little deformation/motion closer to the boundaries if the regions are well selected based on the previous masking process. I will take a look at the paper to see how they handled the boundaries.

Thanks again!

Best,
Ignacio

1 Like