Registering diffrent sized scans

(Omer Bar) #1

Hello All,

I have been using ITK image registration to register a CT scan to an MRI. The CT scan is from top of the head to the chest, while the MRI (my fixed image) only includes the head.

Although my wrapper of ITK gives great results in most cases, in this case the results are not anywhere close to the true values.
registrationFixedImage

I was able to make the algorithm give good results, by deleting some of the .dcm slices in the CT, the algorithm than gave perfect results. I was wondering if there’s a way to set parameters or alter the scan so that I would get those desirable results without deleting .dcm files.

It’s probably important to mention that I am using MattesMutualInformationImageToImageMetricv4 with RegularStepGradientDescentOptimizerv4

Omer

Edit:
I know that the images are not of the same size, I just wanted to be able to share the difference in the length of the scans. I am taking spacing into account when registering images.

(Bradley Lowekamp) #2

What are you initializing the two images?

My guess is that your initial starting location is not close enough for the iterative optimization to work at the same scale. Consider and evaluate using an improved initialization algorithm or adding courser scale to the multi-resolution registration.

(Ziv Yaniv) #3

Hello @OmerB,

I guessed the same as Brad (Brad you type faster than I do :slight_smile:). Removing the slices is simply having the side effect of changing your initialization. Unfortunately, there is no generic initialization approach that guarantees convergence to the desired optimum.

There are some common heuristics which we illustrated in this SimpleITK Jupyter notebook. Possibly one of these approaches will help.

1 Like
(Omer Bar) #4

Thanks so much to you both.
My understanding is that I need to initialize where to start comparing the images. Is it also necessary to set the region of the image in order to “ignore” the irrelevant parts of the CT scan?

Omer

(Ziv Yaniv) #5

Your understanding is correct. Even when you don’t initialize explicitly, you are implicitly initializing with the identity transformation. I would start by modifying the way you compute/guesstimate your initial transformation without adding masks into the code. Just visually compare your previous approach to the new initialization approach (resample the moving onto the fixed and see if it looks closer to where you need it to go).

If that doesn’t work you can then explore the more complicated approach with masks. Finally, as we are positive people, the masks in ITK/SimpleITK indicate which regions are relevant :), not the regions to ignore (the glass is half full, not half empty).

1 Like
(Andras Lasso) #6

In addition to have a good initial alignment, I often find that registration works much more robustly if I crop fixed and moving images so that they contain approximately the same anatomical region.