Gen Registration (Brains) fails despite overlap of series

Dear Slicer community,

My apologies for posting this again as new Topic. I had initially added that to a discussion from July 2017 initiated by Rewati K but then realized that this discussion was marked as solved… by no means is my intention to spam this forum.

I am following tutorial: https://www.slicer.org/w/images/b/ba/NRR-CTgLiverAblation.pdf
to register T1 and T2 liver MRI images. I created mask for both sequences, and the sequences definitively overlap in the 3D space! however, I am getting the same error message as Rewati K posted on July 2017

General Registration (BRAINS) standard error:

ExceptionObject caught !

itk::ExceptionObject (0xfb3160)
Location: “unknown”
File: /home/kitware/Dashboards/Nightly/Slicer-0-build/ITKv4/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx
Line: 205
Description: itk::ERROR: MattesMutualInformationImageToImageMetricv4(0xb3c290): Joint PDF summed to zero
General Registration (BRAINS) standard error:

ExceptionObject caught !

I tried multiple initial splines and I am truly getting desperate. I’m using Slicer 4.8 on Ubuntu 16.04. Any help/suggestion is much appreciated. I uploaded the NRRD files and a screenshot from the GUI interface to the following folder: https://www.dropbox.com/sh/ly2rbeyoxe3ja07/AAC1UKMLWrZm_vOEUXAK0dDsa?dl=0

Thank you very much!
Alex

Dear Slicer community,

I am following tutorial: https://www.slicer.org/w/images/b/ba/NRR-CTgLiverAblation.pdf
to register T1 and T2 liver MRI images. I created mask for both sequences, and the sequences definitively overlap in the 3D space! however, I am getting the same error message as Rewati

General Registration (BRAINS) standard error:

ExceptionObject caught !

itk::ExceptionObject (0xfb3160)
Location: “unknown”
File: /home/kitware/Dashboards/Nightly/Slicer-0-build/ITKv4/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx
Line: 205
Description: itk::ERROR: MattesMutualInformationImageToImageMetricv4(0xb3c290): Joint PDF summed to zero
General Registration (BRAINS) standard error:

ExceptionObject caught !

I tried multiple initial splines and I am truly getting desperate. I’m using Slicer 4.8 on Ubuntu 16.04. Any help/suggestion is much appreciated. I uploaded the NRRD files and a screenshot from the GUI interface to the following folder: https://www.dropbox.com/sh/ly2rbeyoxe3ja07/AAC1UKMLWrZm_vOEUXAK0dDsa?dl=0

Thank you very much!
Alex

You may need to initialize with a manual transform. You could also try the Slicer Elastix extension.

1 Like

@alex looking at the screenshot you shared, it is quite difficult to troubleshoot a failure when you have multiple registration phases selected. If your initial transform is not good, all subsequent phases will fold.

I suggest you give it a try as follows:

  1. uncheck all registration phases, keep center of ROI initializer, and see if you get any meaningful result
  2. if result in 1 is reasonable, try selecting Rigid phase
  3. if result in 2 is not reasonable, try manual initial alignment using Transforms module, and use manual initialization transform instead of the automatic initializer, as suggested by Isaiah.

I’ve tried with both BRAINS and Elastix registrations and due to some reasons, neither of them worked very well.

I could only make BRAINS give meaningful output by rescaling the voxels values. In the attached files, they voxels were floating-point numbers in a range of about [-1, 10]; multiplying the values by 100 and converting to short type allowed the registration to complete, but the result was not great. When I enabled masking, I always got the dreaded Joint PDF summed to zero error. I thought it could be do to the low number of samples, but even increasing that did not help.

Elastix gave some result, but it did not aligned the liver well either and masks did not make a difference.

Maybe with further parameter tuning you could make one of these image-based registration modules work, but the images may not be similar enough so that you could register them properly.

If you can afford manual segmentation of the organ of interest (using Segment Editor), then you can register them using Segment Registration extension. Or, if you can identify enough corresponding anatomical landmarks in the images then you can use SlicerIGT extension’s Fiducial registration wizard module to perform landmark-based registration.

1 Like

Thank you all for helpful responses.
Please allow a few follow-up questions – my apologies upfront if they are grounded on my lack of experience.

@fedorov:

  • Step 1 worked. Subsequently rigid failed but it worked with affine and b-spline. Why is that? Granted the masks overlap, so probably should be close to Eigenmatrix or is the failure b/c there is overlap of mask #1 over #2 on several sides?
  • Re transform initialization settings: if I chose initial transform matrix (created in transform module), I notice difference between mode set to "none’ versus “useCenterOfRoOIAlign”. I assume in “none” it is applied to the entire volume and in “use…” only to mask regions?? I don’t find clear documentation on it and wanted to clarify.

@lassoan.

  • These are MRI images that were NTK4Bias corrected followed by normalization. I thought that this would be the appropriate order prior to registering? Why did rescaling help for BRAINS to work?
  • I like really like your Elastix module. I tried different settings and got it to work but - however the results were not so good. On the Elastix wiki I found some example for liver MRI. Do these dataset examples correspond to “Inputs/Present” settings in the Slicer interface? http://elastix.bigr.nl/wiki/index.php/Par0047

Yes. Note that you can edit these presets to better suite your needs. Par0047 is for 4D data sets, so I don’t think it is applicable as is to a simple 3D volume.

@lassoan
Thanks for your quick response. Yes, I understand that Par0047 is for 4D data. I actually have a lot of these 4D series (dynamic pre and post contrast images) and would really like to try it. I don’t see Par0047 prepopulated in the default Elastix module. Is there a way to load it in?

You can add presets by editing the text and xml files in the presets folder. You can find the location in advanced section.

“None” means you need to provide initial transform. “useCenterOfRoOIAlign” will derive the initial transform automatically by first aligning the centroids of the masks you provide, and next doing some sparse search of the optimal similarity measure by rotating one of the images.

I’ve checked the scene that @alex attached and the initial alignment looked good. The images seem to be just too different, so registration is difficult and it requires careful parameter tuning.

All, thank you very much! Your input has been tremendously helpful. I refined the masks and now it is actually working well. Thanks again!

2 Likes