MRI/CT registration

Hi,

Do you have any suggestions for MRI/CT image registration?
Both images are in DICOM format and have been cropped to focus on the ROI. I have tried using the Brain and Elastix methods, but they didn’t work well (perhaps I made a mistake, as they finished with errors).

It’s a bit hard to tell from the screenshot, but they look like they should be able to be registered. Perhaps you can post the error messages (use the Help->report a bug dialog to get the full log file).

A registration issue could be the knee angle being different in which case you may need to do the bones independently or something.

I manually created the transformations for them and centralized both. All transformations have been saved as LinearTransform. I tried using Elastix with the LinearTransform and received the following error:

I also tried the general registration (Brains) with the same LinearTransform, but the result was not the clear registration I wanted:

They are human knees, and because they are changing, I used the MomentsAlign transform mode.

3DSlicer 5.6.2

You’ll need to look at the error messages (the full details are not visible in these screenshots). I suggest you practice with other datasets (e.g. sample data from the registration library) and then apply what you learn to these.

Thanks! I have done some registrations before, but all of them were from the same modality (MRI/MRI or CT/CT). Now, when I try CT/MRI registration, it doesn’t work.

Do you know if there is any SOP or document available for CT/MRI registration?

Well it should “just work” for many situations as you can see from the examples I sent you. Please be sure to study the documentation and try to see what’s different with your data.

I have tried all the registration modes based on the documentation page, but the problem persists, and I still couldn’t register my images.

I would appreciate it if anyone could help me with this issue.
Thanks!

If the examples work correctly, but your data doesn’t work then you’ll need to figure out what’s different about your data. Is it data you can share publicly?

You can get a more detailled error message by looking at the elastix log. To do this:

  • check “Keep temporary files” in the “Advanced” tab
  • Launch your registration
  • Once it failed, click on “show temp folder”
  • Open the elastix.txt file and scroll down to find the error

Okay, thanks for sharing the data - I can see now what’s going on and give you some suggestions.

First there’s a big difference in both resolution and field of view. So with the default settings BRAINSFit was giving this kind of message (you can see them in the python console).

[VTK] All samples map outside moving image buffer. The images do not sufficiently overlap. They need to be initialized to have more overlap before this metric will work. For instance, you can align the image centers by translation.
[VTK] General Registration (BRAINS) completed with errors

This is because the MR covers a lot of anatomy above and below the join space, while the microCT only covers the joint area. Also the microCT is about 10x smaller pixels than the MR. So I used the CropVolume module with an 8x spacing multiplier to get a low res version, than use the microCT’s ROI to crop the MR with a 1x multiplier.

Then in the BRAINSFit it completed but with a poor result, so I changed the percentage of sample from the default of 0.002 to 1. This uses more of the image to do the optimization and can really impact the result (although with big images it will take longer.

I also tried setting the Max Iterations in the Advanced Optimization Settings to 15000 from 1500 but I don’t think this had as much impact.

After that things look reasonable to me:

For reference here’s what the cropped volumes looked like before registration:

Thank you so much for your help!! Now I can see the registered images! :slight_smile:

Another question:
Is it now possible to see the Python code and functions behind the registration process?

You can perform all these operations in python, and there are lots of examples of how this works. Script repository — 3D Slicer documentation