# Problem with Elastix extension module

**URL:** <https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588>\
**Category:** Support\
**Tags:** registration, elastix\
**Created:** [July 15, 2019, 1:27pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588 "2019-07-15T13:27:13Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![kuba\_grepl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kuba_grepl/32/4161_2.png) [@kuba\_grepl](https://discourse.slicer.org/u/kuba_grepl)\
**Post date:** [July 15, 2019, 1:27pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/1 "2019-07-15T13:27:13Z")

</div>

Hello, I have a problem with Elastix extension. I tried repeat simple registration case of Free Sample Data according to the instructions in You Tube video:[https://www.youtube.com/watch?v=cU0pWhn0-3o](https://www.youtube.com/watch?v=cU0pWhn0-3o)  
But something is wrong (see PrtScrn). Can anybody help me?  
Thank you, Kuba.  
University Hospital Hradec Kralove, Czech Republic.

 ![ELASTIX](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/6/3671b556effff1483bae602fc85f9b11ac96348d.png)

---

<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:** [July 15, 2019, 2:06pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/2 "2019-07-15T14:06:37Z")

</div>

Probably you need to have your data in directories with only ascii characters in the paths - sorry, the program is limited in this regard. Some internationalization is a [work in progress](https://discourse.slicer.org/t/slicer-internationalization/579), but we use a lot of libraries and not all the code handles non-ascii characters.

---

<div class="post-metadata">

**Author:** ![kuba\_grepl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kuba_grepl/32/4161_2.png) [@kuba\_grepl](https://discourse.slicer.org/u/kuba_grepl)\
**Post date:** [July 16, 2019, 5:56am UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/3 "2019-07-16T05:56:52Z")

</div>

Hello Steve. I renamed the user´s account ([https://www.top-password.com/blog/rename-user-profile-directory-in-windows/](https://www.top-password.com/blog/rename-user-profile-directory-in-windows/)) and everything work now.  
Thank you, Kuba.  
University Hospital Hradec Kralove, Czech Republic.

---

<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:** [July 16, 2019, 12:16pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/4 "2019-07-16T12:16:32Z")

</div>

You can also try a recent Preview Release , as it uses Python3, which handles unicode strings somewhat differently (but at least upgrade to the latest Stable Release so that you can benefit from all the developments and fixes we implemented in the last 2 years).

---

<div class="post-metadata">

**Author:** ![kuba\_grepl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kuba_grepl/32/4161_2.png) [@kuba\_grepl](https://discourse.slicer.org/u/kuba_grepl)\
**Post date:** [July 17, 2019, 12:41pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/5 "2019-07-17T12:41:48Z")

</div>

Thank you Andras!  
I use version 4.8.1, because extension manager (install extension) does not work in recent Stable Release 4.10.2 . I had also a problem with viewing DICOM files in version 4.10.2. In older version 4.8.1 everything is working.  
I successfully repeated simple example in youtube video mentioned above. In the next step, I tried to use Elastix with my own data sets. I have MR T2W and CT (with radiotherapy structure set) of the head and neck of one patient. MR is my fixed volume and I need to deform and match my CT data. Both scans are shifted more than 20cm. So I decided to use Transform Module to pre-align and then I used Elastix. But I received a very bad result.  
Where I made a mistake? (

 ![Before](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/5/a5aeb0fb9510865958a567b40a45ea2f4b99a9b3.png) I am a novice with 3D slicer. Sorry for maybe stupid question…

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [July 17, 2019, 1:22pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/6 "2019-07-17T13:22:08Z")

</div>

Thanks for the feedback about 4.10, very useful! The new extension manager is under construction, so that issue will be solved soon, but can you please tell us what kind of problems you had with DICOMs in 4.10?

About the registration, I don’t think you need pre-alignment. Also not sure that Elastix considers transforms that are not hardened, but hardening comes with some data loss.

---

<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:** [July 17, 2019, 1:28pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/7 "2019-07-17T13:28:47Z")

</div>

> [@cpinter](#):
>
> not sure that Elastix considers transforms that are not hardened

I can confirm that Elastix module only considers hardened transforms. There may be a slight image quality degradation due to resampling _only in the case when warping transform was applied_ on the volume (no resampling is performed when linear transform is applied, so image quality is not impacted then).

---

<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:** [July 17, 2019, 1:32pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/8 "2019-07-17T13:32:45Z")

</div>

> [@kuba\_grepl](#):
>
> I use version 4.8.1, because extension manager (install extension) does not work in recent Stable

What operating system do you use? What do you mean by “does not work”? The extension manager does not appear? Does the application hang or crash? You can install extensions but they do not appear in the module list?

---

<div class="post-metadata">

**Author:** ![kuba\_grepl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kuba_grepl/32/4161_2.png) [@kuba\_grepl](https://discourse.slicer.org/u/kuba_grepl)\
**Post date:** [July 17, 2019, 2:33pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/9 "2019-07-17T14:33:45Z")

</div>

> [@cpinter](#):
>
> can you please tell us what kind of problems you had with DICOMs in 4.10?

When I try load Dicom data I obtain Error message (see PrtScrn) and after that, I can see image only in small zoom area but not in red, yellow and green windows (also PrtScrn).

 ![Dicom%20load](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/a/9ae6cd6deb8ba6228c72a19c236a53629eb1c4f8.png)

---

<div class="post-metadata">

**Author:** ![kuba\_grepl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kuba_grepl/32/4161_2.png) [@kuba\_grepl](https://discourse.slicer.org/u/kuba_grepl)\
**Post date:** [July 17, 2019, 2:40pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/10 "2019-07-17T14:40:02Z")

</div>

I use Win7 Professional. I mean that when I click on Install extension I can see only the empty black window.

 ![Extension%20manager](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/d/0d2fae0fb0e81fa28878fccc1b6109b965e3707e.png)

---

<div class="post-metadata">

**Author:** ![kuba\_grepl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kuba_grepl/32/4161_2.png) [@kuba\_grepl](https://discourse.slicer.org/u/kuba_grepl)\
**Post date:** [July 17, 2019, 2:48pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/11 "2019-07-17T14:48:35Z")

</div>

> [@lassoan](#):
>
> I can confirm that Elastix module only considers hardened transforms.

What exactly hardened transform means? Why my deformable registration mentioned above gives me bat results?

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [July 17, 2019, 2:52pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/12 "2019-07-17T14:52:50Z")

</div>

The error message about DICOM SRO should not prevent loading anything. Are your data loaded fine after this?

I developed the SRO import/export plugin, so I’d appreciate if you send me your data (anonymized if possible) that brings out this error. Thank you!

---

<div class="post-metadata">

**Author:** ![kuba\_grepl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kuba_grepl/32/4161_2.png) [@kuba\_grepl](https://discourse.slicer.org/u/kuba_grepl)\
**Post date:** [July 17, 2019, 6:13pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/13 "2019-07-17T18:13:36Z")

</div>

As I wrote above, after this error message data are probably loaded, but I can not see images in red, yellow and green window. I can see image only in small square (zoom) in the left bottom corner of the screen. (see in PrtScrn). It is not problem of my data I tried it with free sample included in slicer with the same result.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [July 17, 2019, 6:16pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/14 "2019-07-17T18:16:06Z")

</div>

If the data is loaded, then there should be no problem with displaying it. Check it out in the Volumes module. See the dimensions and scalar range of the volume and see if it’s reasonable.

> [@kuba\_grepl](#):
>
> As I wrote above

Thank you, but I’d like to fix this issue if you’re willing to help me reproduce it.

---

<div class="post-metadata">

**Author:** ![kuba\_grepl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kuba_grepl/32/4161_2.png) [@kuba\_grepl](https://discourse.slicer.org/u/kuba_grepl)\
**Post date:** [July 17, 2019, 6:49pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/15 "2019-07-17T18:49:19Z")

</div>

I will check it again in my office tomorow and I will let you know.

---

<div class="post-metadata">

**Author:** ![kuba\_grepl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kuba_grepl/32/4161_2.png) [@kuba\_grepl](https://discourse.slicer.org/u/kuba_grepl)\
**Post date:** [July 18, 2019, 10:26am UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/16 "2019-07-18T10:26:07Z")

</div>

I checked it again. I downloaded Sample Data (MRHead), opened Volume module and I can say that Dimensions are 256, 256, 112. The scalar range is 0 - 695. And again I can see image only in Data Probe (Show Zoomed Slice). How can I help you to identify where the problem is?

Thank you, Kuba.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [July 18, 2019, 12:15pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/17 "2019-07-18T12:15:05Z")

</div>

Based on your latest screenshot it shows that you are using Slicer 4.10.2 stable but it shows that you installed the SlicerRT extension that was built with Slicer 4.11 nightly revision 28371. This is a problem. Did you manually install a nightly extension for Slicer 4.10.2?

Uninstall this extension and reinstall using the extension manager within Slicer 4.10.2 stable. Or download the extension zip that is built specifically for Slicer 4.10.2 and install manually.

---

<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:** [July 18, 2019, 12:32pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/18 "2019-07-18T12:32:29Z")

</div>

> [@kuba\_grepl](#):
>
> And again I can see image only in Data Probe (Show Zoomed Slice). How can I help you to identify where the problem is?

I see what’s the problem now. Slicer-4.10 requires OpenGL version 3.2 to take advantage of new features in graphics cards. OpenGL 3.2 is supported on all computers that are manufactured in the last 5 years or so, but not on computers that are much older than that. I would recommend to upgrade your computer, not just because of Slicer but also because Windows 7 and 8 are very insecure to use.

---

<div class="post-metadata">

**Author:** ![kuba\_grepl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kuba_grepl/32/4161_2.png) [@kuba\_grepl](https://discourse.slicer.org/u/kuba_grepl)\
**Post date:** [July 18, 2019, 1:52pm UTC](https://discourse.slicer.org/t/problem-with-elastix-extension-module/7588/19 "2019-07-18T13:52:28Z")

</div>

Thank you Andras,  
you are right. I installed Slicer 4.10.2 on the newest computer in our department (Win 10, 8GB RAM, 2,8GHz) and the problem is solved.
