# Automated registration in the Nightly Build

**URL:** <https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092>\
**Category:** Support\
**Tags:** registration\
**Created:** [September 20, 2017, 5:04pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092 "2017-09-20T17:04:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevenagl12](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stevenagl12/32/3391_2.png) [@stevenagl12](https://discourse.slicer.org/u/stevenagl12)\
**Post date:** [September 20, 2017, 5:04pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/1 "2017-09-20T17:04:10Z")

</div>

I am trying to automatically register some volumes together but when I looked at the modules listed for the nightly build online, none of them show an automated registration module, yet the FAQ on Registration site hints that there are automated methods out there. The modules I have all seem to be semi-automated and most of them say BRAINS on them, which I am trying to register kidney regions together. Any advice or ideas?

---

<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:** [September 20, 2017, 7:35pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/2 "2017-09-20T19:35:13Z")

</div>

A post was split to a new topic: [Get image slice/voxel plane from position](https://discourse.slicer.org/t/get-image-slice-voxel-plane-from-position/1093)

---

<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:** [September 20, 2017, 7:11pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/3 "2017-09-20T19:11:28Z")

</div>

All intensity-based registration methods in Slicer are fully automatic.

I like SlicerElastix (in SlicerElastix extension) the most, because it is very robust and usually does not require any parameter tuning.

BRAINS is just a brand name. It contains a number of general registration methods, basically all thin wrappers over standard ITK registration algorithms. It’s been successfully used on many organs and imaging modalities, but it usually requires parameter tuning. The [Registration case library](https://www.slicer.org/wiki/Documentation/Nightly/Registration/RegistrationLibrary) is a good starting point.

---

<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:** [September 20, 2017, 7:35pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/4 "2017-09-20T19:35:55Z")

</div>

A post was merged into an existing topic: [Get image slice/voxel plane from position](https://discourse.slicer.org/t/get-image-slice-voxel-plane-from-position/1093)

---

<div class="post-metadata">

**Author:** ![stevenagl12](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stevenagl12/32/3391_2.png) [@stevenagl12](https://discourse.slicer.org/u/stevenagl12)\
**Post date:** [September 25, 2017, 2:12pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/5 "2017-09-25T14:12:14Z")

</div>

I have volumes that I have segmented. I then registered them, is there a way to transfer the segmentations to the new registered volume matrices?

---

<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:** [September 25, 2017, 2:21pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/6 "2017-09-25T14:21:05Z")

</div>

Yes. Apply the same transform to the segmentation node that was used to transform the volume.

---

<div class="post-metadata">

**Author:** ![stevenagl12](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stevenagl12/32/3391_2.png) [@stevenagl12](https://discourse.slicer.org/u/stevenagl12)\
**Post date:** [September 26, 2017, 5:12pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/7 "2017-09-26T17:12:02Z")

</div>

Alright thank you very much.

---

<div class="post-metadata">

**Author:** ![stevenagl12](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stevenagl12/32/3391_2.png) [@stevenagl12](https://discourse.slicer.org/u/stevenagl12)\
**Post date:** [October 3, 2017, 6:47pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/8 "2017-10-03T18:47:08Z")

</div>

Is there a method by which to use the Elastix registration module to batch process multiple volume registrations? With regards to this, when registering 2 volumes, the fixed volume does not appear to be zero-padded if the registration transformation ends up pulling the volume image outside of the dimensions of the fixed volume so that all image dimensions can be equalized in the end. Is there a way to do this in Elastix or some other registration module?

---

<div class="post-metadata">

**Author:** ![stevenagl12](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stevenagl12/32/3391_2.png) [@stevenagl12](https://discourse.slicer.org/u/stevenagl12)\
**Post date:** [October 3, 2017, 7:00pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/9 "2017-10-03T19:00:28Z")

</div>

What I mean by this is that I am essentially trying to register multiple images to each other at the same time so that if image A is smaller than image C, but not B, then A is zero-padded and image B is re-registered after image C automatically so that in the end all images have the same dimensions?

---

<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:** [October 3, 2017, 7:22pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/10 "2017-10-03T19:22:29Z")

</div>

You can have a look at how [Sequence registration extension](https://github.com/moselhy/SlicerSequenceRegistration) is implemented. It registers a sequence of images to each other.

---

<div class="post-metadata">

**Author:** ![stevenagl12](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stevenagl12/32/3391_2.png) [@stevenagl12](https://discourse.slicer.org/u/stevenagl12)\
**Post date:** [October 4, 2017, 2:29pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/11 "2017-10-04T14:29:29Z")

</div>

How would I go about converting a series of cropped volumes into a sequence without exporting all the volumes to dicom files and reloading them in? Also, according to the documentation for this extension, you are still registering the sequence to a single volume. Is that going to allow that volume to be changed as well as the 4D sequence of dicoms? Finally, judging by the description, this method of registration uses 4D data where the 4th dimension is time, so intra-patient registration. Will this still work if it is inter-patient and the registration methods have to be robust enough to handle the vast variation?

---

<div class="post-metadata">

**Author:** ![stevenagl12](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stevenagl12/32/3391_2.png) [@stevenagl12](https://discourse.slicer.org/u/stevenagl12)\
**Post date:** [October 4, 2017, 3:50pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/12 "2017-10-04T15:50:25Z")

</div>

So I figured out how to create a sequence, but I don’t know how to visualize it to determine if the registration has worked or not, or how to split that sequence apart again as the sequences module only has add or delete options for the sequences. I’ve tried the sequence browser but it doesn’t visualize my sequence and it doesn’t give me the option of going through the slices like normal between each volume in the sequence. The sequences don’t show up in the data subject hierarchy either.

---

<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:** [October 4, 2017, 4:06pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/13 "2017-10-04T16:06:28Z")

</div>

> [@stevenagl12](#):
>
> Also, according to the documentation for this extension, you are still registering the sequence to a single volume. Is that going to allow that volume to be changed as well as the 4D sequence of dicoms?

Yes.

> [@stevenagl12](#):
>
> this method of registration uses 4D data where the 4th dimension is time, so intra-patient registration. Will this still work if it is inter-patient and the registration methods have to be robust enough to handle the vast variation?

The less variation between the images, the higher the success rate and accuracy is, but - thanks to the robustness of Elastix, it should not be a problem to register images of different patients, even if different imaging modality is used. If registration is not successful then you have to tune the registration parameters.

---

<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:** [October 4, 2017, 4:12pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/14 "2017-10-04T16:12:35Z")

</div>

> [@stevenagl12](#):
>
> I don’t know how to visualize it to determine if the registration has worked or not, or how to split that sequence apart again as the sequences module only has add or delete options for the sequences.

If you use Sequence registration, it puts the result in a volume sequence that you can review using the existing browser node. Just choose to show the registration result volume in the slice views. You can show original volume in the foreground and registered volume in the background and fade between them.

> [@stevenagl12](#):
>
> I’ve tried the sequence browser but it doesn’t visualize my sequence and it doesn’t give me the option of going through the slices like normal between each volume in the sequence. The sequences don’t show up in the data subject hierarchy either.

Volume sequence nodes don’t show up in the `Subject hierarchy` tab (they only show up in the `All nodes` tab). You need to add the volume sequence node to a browser node; it will create a proxy node (that makes the selected item of the sequence appear in the scene). Note that you can create multiple browser nodes, each exposing one item of the sequence in the scene.

---

<div class="post-metadata">

**Author:** ![stevenagl12](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stevenagl12/32/3391_2.png) [@stevenagl12](https://discourse.slicer.org/u/stevenagl12)\
**Post date:** [October 4, 2017, 4:22pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/15 "2017-10-04T16:22:29Z")

</div>

And how do you split up a sequence once it’s created?

---

<div class="post-metadata">

**Author:** ![stevenagl12](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stevenagl12/32/3391_2.png) [@stevenagl12](https://discourse.slicer.org/u/stevenagl12)\
**Post date:** [October 4, 2017, 4:25pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/16 "2017-10-04T16:25:54Z")

</div>

Also, this error keeps appearing every time I run the sequence registration: AttributeError: ‘NoneType’ object has no attribute ‘SetOverwriteProxyName’

---

<div class="post-metadata">

**Author:** ![stevenagl12](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/stevenagl12/32/3391_2.png) [@stevenagl12](https://discourse.slicer.org/u/stevenagl12)\
**Post date:** [October 4, 2017, 4:28pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/17 "2017-10-04T16:28:55Z")

</div>

This is what I meant by the sequence isn’t playing on the sequence browser:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/b/1b0ae52ad16d314ddcea868140686ba3eb1e47f5.png)

---

<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:** [October 4, 2017, 6:31pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/18 "2017-10-04T18:31:53Z")

</div>

> [@stevenagl12](#):
>
> And how do you split up a sequence once it’s created?

You can retrieve any item from the sequence node and create a clone of that in the scene. However, typically you don’t need to do this, as this is exactly what the browser node does. You just create as many browser nodes as many items of the sequence you want to see in the scene at the same time. Usually it is enough to add two sequence nodes, which allows you to compare any two items of the sequence.

---

<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:** [October 4, 2017, 6:33pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/19 "2017-10-04T18:33:36Z")

</div>

> [@stevenagl12](#):
>
> This is what I meant by the sequence isn’t playing on the sequence browser:

You need to choose “OutputVolumes” as background volume in your slice view (and click FOV reset to make sure the slice view is positioned over the volume).

---

<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:** [October 4, 2017, 6:34pm UTC](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092/20 "2017-10-04T18:34:18Z")

</div>

> [@stevenagl12](#):
>
> Also, this error keeps appearing every time I run the sequence registration: AttributeError: ‘NoneType’ object has no attribute ‘SetOverwriteProxyName’

If you would like us to investigate this then please provide the full application log (menu: Help / Report a bug).

[Next page](https://discourse.slicer.org/t/automated-registration-in-the-nightly-build/1092.md?page=2)
