Abdominal CT registration using Elastix

He! Currently I am trying to use Elastix during registration in 3D Slicer. However, I am hoping to gain some tips and tricks for the registration of abdominal CT scans. I would like to use a ROI, however I could only use a volumeclip to register with the other image instead of the registration with the original image. Could you help me out with this?


You can crop volume to the desired region rectangular region of interest using “Crop Volume” module, and you can specify arbitrarily shaped masks in “General registration (Elastix)” module. You can apply the registration result to the original (non-clipped, non-masked) volume.

Thank you. If I’m understanding right I could try two things:

  1. crop an ROI, register this with a fixed volume and then use the transform to register the non-cropped image in ‘Transform’.
  2. create or specify a mask by for example using ‘Foreground Masking (BRAINS)’ and apply this mask in Elastix as mask. Or are there any other options to create a mask for registration?

You can create a mask by using Segment Editor . You can use any effect, such as simple paint with a large brush, or scissors (fill in from one viewpoint then cut the two ends from another viewpoint), or using Surface Cut effect (provided by SegmentEditorExtraEffects extension). Then you can export the segment to a labelmap by right-clicking on the segmentation in Data module and choosing export to labelmap volume.

I’ve tried using scissors and surface cut as a mask (in fixed as well as moving volume mask), however I get these two errors:

‘Could not find enough image samples within reasonable time. Probably the mask is too small’
‘Too many samples map outside moving image buffer: 265 / 32768’

I’m not sure what I’m doing wrong considering I’ve done as what you suggested me to do.
If I’m right you tell me to do it in these steps: create mask --> save as labelmap --> use this mask in Elastix (fixed/moving volume mask) --> Save Transform --> Apply transform to non-clipped/masked volume. What I do not get is that Elastix seems not to accept my masks to apply for registration…

This happens if the mask is much smaller than the entire image. You can either to crop the volume to make it approximately same size as the masked area, or use a different sampler as suggested here.

I think I solved the problem by adding the suggested sampler. However I am still not sure if I’m doing it right compared to the ROI volume that I clip. So I’ll address it in the steps I’ve made:

  1. clipping volume ROI of moving volume (Second Volume)
  2. Elastix registration with ROI volume as moving volume over the original fixed volume (First Volume)
  3. Save Transform
  4. Go to Transform Module and apply the given Transform on the original Second Volume.
  5. Check registration between First and Second volume.

However if I do this the only registration that appears to happen is within the boundaries of the ROI in the Second Volume plus a small region around the ROI border. Maybe I’m not clear but it means only a volume within the Second Volume that is slightly greater compared to the ROI that I’ve used. Two questions:

  1. Are the steps I’m taking right?
  2. Does Slicer only apply the Transform around the ROI in the Second image?

Dear Andras Lasso,

Could you reply my question if you are able to?
In addition, is it possible to change the script and for example let Elastix do an easier threshold registration? Can we modify the parameter files to accomplish this?

And does Elastix always present the transform symbol as a deformable transform in the Data module? Because if an rigid registration is applied, the symbol of an deformed transform is visible if we apply this on the volume, is this correct although the transform is basically rigid?