# Head CT MRI fusion/registration

**URL:** <https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333>\
**Category:** Support\
**Tags:** registration\
**Created:** [October 31, 2017, 3:13pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333 "2017-10-31T15:13:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![NaglisR](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/naglisr/32/16280_2.png) [@NaglisR](https://discourse.slicer.org/u/NaglisR)\
**Post date:** [October 31, 2017, 3:13pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/1 "2017-10-31T15:13:48Z")

</div>

Hi everyone, I have only recently started using 3D Slicer and have a rather specific question:  
I am trying to fuse the images of the same person head MRI and CT scans. I have tried the general registration (BRAINS) module, which works but the results are not yet satisfactory. Therefore I want to find out if this task is overall manageable and if so, what are the best ways/modules to do so?  
Thanks

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 31, 2017, 3:28pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/2 "2017-10-31T15:28:49Z")

</div>

I’d suggest starting with the material here:

[https://www.slicer.org/wiki/Documentation/4.8/Registration/RegistrationLibrary](https://www.slicer.org/wiki/Documentation/4.8/Registration/RegistrationLibrary)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [November 1, 2017, 12:54pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/3 "2017-11-01T12:54:27Z")

</div>

I find that **General Registration (Elastix)** module often works much better and usually it doesn’t require any parameter tuning. The module will show up in Registration category after you install **SlicerElastix extension**.

---

<div class="post-metadata">

**Author:** ![Amir\_Zolal](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/amir_zolal/32/9423_2.png) [@Amir\_Zolal](https://discourse.slicer.org/u/Amir_Zolal)\
**Post date:** [December 2, 2017, 6:07am UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/4 "2017-12-02T06:07:57Z")

</div>

Hello,

this is a very important registration step for instance in verifying the  
results of DBS lead implantation by superimposing the postop CT onto the  
preop T1 / T2 / SWI etc. However, none of the common registration method  
work well (with the exception of Brainlab - but then, export and further  
analysis with another tool is not possible). I tried flirt, ants, elastix  
(SlicerElastix extension, as you suggested Andras), I think that the strong  
contrast on the tissue-air-interface in CT causes the problem. I ended up  
using landmark registration in MIPAV, but thats far from optimal.

Did anyone find a way how to perform a fast rigid registration of CT to T1  
MRI with acceptable results?

And - St. P. the registration library doesn’t have an example for this case.

Thanks,

Amir

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 2, 2017, 6:16am UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/5 "2017-12-02T06:16:10Z")

</div>

Elastix worked really well for me for any reasonable registration problem that I threw at it. If you use a suitable metric (such as mutual information), then strong  
contrast on the tissue-air-interface in CT should just help the registration . What kind of registration error did you have? Can you share a data set where you have registration issues?

Note that there are great rigid/affine/deformable landmark registration modules in Slicer. For images that are already somewhat aligned you can use `Landmark registration` module. For general cases, you can use `Fiducial registration wizard` module in SlicerIGT extension.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 2, 2017, 6:28am UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/6 "2017-12-02T06:28:07Z")

</div>

> [@Amir\_Zolal](#):
>
> this is a very important registration step for instance in verifying the results of DBS lead implantation by superimposing the postop CT onto the preop T1 / T2 / SWI etc.

Registration of pre/post-op images of a same patient is a single-step intra-patient registration - should be quite easy.

Do I understand correctly that you register pre/post-op images to each other by registering each to an atlas? That would not be ideal, as you need to register twice (instead of just once), and inter-patient (patient-to-atlas) registration is a much more difficult problem than intra-patient registration.

---

<div class="post-metadata">

**Author:** ![Amir\_Zolal](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/amir_zolal/32/9423_2.png) [@Amir\_Zolal](https://discourse.slicer.org/u/Amir_Zolal)\
**Post date:** [December 2, 2017, 7:53am UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/7 "2017-12-02T07:53:41Z")

</div>

Yes, you understand correctly, I register pre and post op images to each  
other, the postop images have the electrodes in them (which might be a part  
of the problem). Is there a way to modify the parameters of elastix  
directly in SlicerElastix or load a different parameter set other than the  
presets?

I can also share the data (if you have the time to help), just tell me the  
preferred way and I will send the files.

A

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 2, 2017, 2:54pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/8 "2017-12-02T14:54:33Z")

</div>

To modify Elastix registration parameters, open `Advanced` section and click `Show database folder` button. It should show the registration preset database folder. You can edit ElastixParameterSetDatabase.xml to add new presets (name, description, etc. and a list of registration steps) and edit/add .txt files to edit registration steps.

If you upload a set of images to dropbox, onedrive, google drive, … and post the link here then I can have a quick look

---

<div class="post-metadata">

**Author:** ![Amir\_Zolal](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/amir_zolal/32/9423_2.png) [@Amir\_Zolal](https://discourse.slicer.org/u/Amir_Zolal)\
**Post date:** [December 2, 2017, 5:32pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/9 "2017-12-02T17:32:48Z")

</div>

These are the files,

preop T1 and postop CT

> **[CTMRIReg.tar.xz](https://www.dropbox.com/s/ypmhr7yjlnq6k10/CTMRIReg.tar.xz?dl=0)**
>
> Shared with Dropbox

Thanks for the help Andras!

Amir

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [December 3, 2017, 2:26am UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/10 "2017-12-03T02:26:16Z")

</div>

Thank you, I had a look at the images and indeed registration is not trivial. Probably the best would be to do a literature review to see how others have approached this task before, but here are a few ideas that you may try:

- If you want to make sure that the brain is registered correctly then skull stripping (removing the skull from images) may help. For MRI images, you can use SwissSkillStripper extension (or ROBES or SkullStripper). For CT images, you may use SwissSkullStripper extension, too, but use a CT instead of an MRI as atlas volume. You can use any head CT and corresponding brain labelmap image.
- You may improve initial registration by landmark registration (either using `Landmark registration` module; or `Fiducial registration wizard` module in SlicerIGT extension). Then, use a registration optimizer that can restrict maximum translation and rotation to make sure it finds solution around the initial guess.
- Check out Elastix parameter file database ([http://elastix.bigr.nl/wiki/index.php/Parameter\_file\_database](http://elastix.bigr.nl/wiki/index.php/Parameter_file_database))
- Check out Slicer [registration case library](https://www.slicer.org/wiki/Documentation/Nightly/Registration/RegistrationLibrary) and [Registration FAQ](https://www.slicer.org/wiki/Documentation/4.8/FAQ/Registration)

@pieper @ihnorton have you registered these kind of images in the past? Would you have any suggestions?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/0/70d28d45c4e0c293ce3598eaccf8b66037d11e1e.jpeg)

---

<div class="post-metadata">

**Author:** ![eeros](https://avatars.discourse-cdn.com/v4/letter/e/2bfe46/32.png) [@eeros](https://discourse.slicer.org/u/eeros)\
**Post date:** [December 3, 2017, 7:30am UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/11 "2017-12-03T07:30:15Z")

</div>

Hi,  
I have registered this kind of images and I tried the registration using  
your data. After I increased the percentage of samples from 0.002 to 0.02  
I got the results show in the attached screen capture. Is this registration  
good enough or what kind of problems did you mean? I used General  
Registration (BRAINS) modules of Slicer 4.8.

Most important parameters:  
Fixed Image: T1  
Moving Image Volume; CT  
Percentage of samples: 0.02  
Output settings: Slicer linear transform  
Initialization: None/off  
Registration phases: RIgid (6 DOF)  
Cost Metric: MMI

To still increase the registration accuracy (if needed) I would try to  
mask the registration to that part of the brain where the electrodes of  
interest are located.  
​

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/8/d85f09b6f885836aa1068e366b83de9bc573fa28.png)

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)\
**Post date:** [December 3, 2017, 3:33pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/13 "2017-12-03T15:33:42Z")

</div>

@eeros looks good!

@lassoan the volume of disturbed area is very small relative to the total head volume, so I have usually been able to register these kind of images in BRAINSFit with just manual initialization and some parameter fiddling like this (the commercial navigation system we use in AMIGO works out of box for these kind of images – my recollection is that they use some variation on AIR).

---

<div class="post-metadata">

**Author:** ![Amir\_Zolal](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/amir_zolal/32/9423_2.png) [@Amir\_Zolal](https://discourse.slicer.org/u/Amir_Zolal)\
**Post date:** [December 3, 2017, 6:50pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/14 "2017-12-03T18:50:06Z")

</div>

Hi,

I have tested increasing the samples percentage, which worked in that  
particular case, looks really like some “fiddling” is necessary. In some  
other cases, I didn’t succeed, even with masking of the electrodes. All  
very work intensive.

Interestingly, Brainlab has a very robust solution - in neurosurgery, CT-MR  
registrations are necessary on … weekly, not daily … but still regular  
basis. Does anybody have any knowledge of what algorithm they use?

Thanks in advance,

Amir

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [December 4, 2017, 1:15pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/15 "2017-12-04T13:15:07Z")

</div>

I’d also suggest trying DRAMMS - it has worked well on many different registration scenarios:

[http://www.med.upenn.edu/sbia/dramms.html](http://www.med.upenn.edu/sbia/dramms.html)

---

<div class="post-metadata">

**Author:** ![kopachini](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kopachini/32/65543_2.png) [@kopachini](https://discourse.slicer.org/u/kopachini)\
**Post date:** [January 15, 2019, 6:29pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/16 "2019-01-15T18:29:24Z")

</div>

Hello everyone,

is it possible to make fusion of 3 studies (arterial, venous and late excretion phase in CT urography)? And than after the fusion where I will have arteries, veins and calices and ureters in one place to make segmentation of each part as done normally without fusion?

And a practical question, if I want to make a fusion of the one part of the abdomen (kidneys) should I first crop every study separately or when studies are fused together?

---

<div class="post-metadata">

**Author:** ![kopachini](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kopachini/32/65543_2.png) [@kopachini](https://discourse.slicer.org/u/kopachini)\
**Post date:** [January 15, 2019, 7:35pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/17 "2019-01-15T19:35:24Z")

</div>

And I have issue with registration of the images.  
When I want to chose moving image volume, only one study appears (bone CT scan), there is no MR study that I have loaded together with bone study as seen on the pic.

 ![fusion1](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/8/e813e83ee54f85a8c7b07fc479a46520c6333f18.jpeg)

intel core i7 7700HQ 2.80 GHz  
16GB RAM  
64x operating system  
Windows 10 Home

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [January 15, 2019, 9:55pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/18 "2019-01-15T21:55:23Z")

</div>

Hi @kopachini -

Regarding the registration of multiple phases, yes it will probably work. You’ll just need to experiment.

Not sure exactly what you are asking regarding the cropping. You can crop the volumes either before or after transforming them. You might want to crop just the kidney to make registration more accurate and quicker.

Regarding the MR not showing in the selector, it’s probably not a scalar volume. Perhaps it loaded as a diffusion or multivolume.

---

<div class="post-metadata">

**Author:** ![kopachini](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kopachini/32/65543_2.png) [@kopachini](https://discourse.slicer.org/u/kopachini)\
**Post date:** [January 16, 2019, 6:57pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/19 "2019-01-16T18:57:00Z")

</div>

I solved that problem… issue was that I tried to load two studies at once and then the second study was loaded as multivolume. when I loaded one study at the time, I continued without a problem.

Only, I had the idea of fusion a bit different… I thought that when I make fusion before segmentation, when I start to segment I will have two phases or MR times on one stack combined, but there are still two separate phases that I need to change in between. But nevermind, that works, too 🙂

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [January 17, 2019, 5:44am UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/20 "2019-01-17T05:44:03Z")

</div>

You can display two frames at a time (one as background, another one as foreground volume) and fade between them. Basic Slicer visualization tutorials should cover this, but if not then let us know and we give step-by-step instructions.

---

<div class="post-metadata">

**Author:** ![kopachini](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kopachini/32/65543_2.png) [@kopachini](https://discourse.slicer.org/u/kopachini)\
**Post date:** [January 17, 2019, 7:14pm UTC](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333/21 "2019-01-17T19:14:47Z")

</div>

Thank you for reply. I manage that as well as segmentation of different anatomical structures on two fused studies. I wanted to say that in my head I thought that when I make fusion of two studies they will appear as merged into only one… but process of fading works just fine, too 🙂  
I didn’t tried to fuse 3 different studies (don’t have idea how to do it)

[Next page](https://discourse.slicer.org/t/head-ct-mri-fusion-registration/1333.md?page=2)
