Registration 2 images visualisation error?

Good evening,

On the Elastix General Registration Module (on MacOS), I am doing a generic rigid preset.
However, when I superimpose the 2 images (the one “fixed” and the one “resampled, after the registration”, I have this result visually :
11

Can you tell me why have I this visualisation ?
Is it wrong or right ?
I have checked on Data module and these two images have the same dimensions and spacing.

Maybe do I have to find a way to do a ICP registration instead ?
I don’t know what to do…

Thanks a lot in advance
Have a good weekend
Laura

Fixed image should be aligned well with the computed output image, so the result that you show does not look right.

Do you try to register 2D (single-slice 3D) images?
Are they binary (black-and-white only) images?

The images (fixed and moving) are both nifti files that I have saved before after doing segmentations so they are in 3D. Do you think that this is the problem ?
The moving one is binary and the fixed one has been created from volume clip with model so I don’t really know if it is binary volume…how can I check that ?

These are binary volumes. Intensity-based registration methods cannot be effectively applied to binary images.

One option is to apply distance transform to them and then use intensity-based registration. This approach is implemented in Segment Registration extension. I would recommend to import your images into segmentation node (convert to labelmap node in Volumes module, if you forgot to click “labelmap” option when loaded the binary volumes) and use Segment Registration module to register them.

I am so sorry but I think that I have misunderstood something…

I have done this :

  • Load file1(fixed) and file2 (moving)

  • On Volumes, create label map of these 2 files

  • on Segment registration,
    Fixed image = file1
    Moving image = file2
    Perform registration

  • Then, I have a new file called “file1_Resampled_1x1x1mm”

  • On General Registration Elastix,
    fixed volume = file1_Resampled_1x1x1mm
    moving volume = file2
    Preset = generic rigid
    Output volume : Create new volume
    Apply

  • The result of the superimpose is :
    Foreground = new volume created
    Background = file1_Resampled_1x1x1mm
    Result =
    22

I can’t understand…
Thanks a lot for your help !
Laura

In Segment Registration you cannot select labelmaps as inputs, only segmentations, and you’re not mentioning that you imported file1 and 2 to segmentation nodes. Are you sure you’re using the module called “Segment Registration”?

OH ! I have forgotten to convert label map to segment nodes !!!

Unfortunately…
I am so sorry but I think that I have again misunderstood something…

I have done this :

  • Load file1(fixed) and file2 (moving)

  • On Volumes, create label map of these 2 files (file1_label and file2_label)

  • on Segmentations :
    Segmentation : segmentation
    Export label map : file1_label
    Segmentation : segmentation_1
    Export label map : file2_label

  • on Segment registration,
    Fixed image = file1
    Fixed segmentation = segmentation
    Fixed segment : file1_label

Moving image = file2
Moving segmentation = segmentation_1
Moving segment : file2_label
Perform registration

  • Then, I have a new file called “file2 cropped”

  • On General Registration Elastix,
    fixed volume = file1
    moving volume = file2 cropped
    Preset = generic rigid
    Output volume : Create new volume
    Apply

  • The result of the superimpose is :
    Foreground = new volume created
    Background = file1
    Result = 03

I can’t understand…
Thanks a lot for your help !
Laura

What is the “On General Registration Elastix” part? If you use Segment Registration then what it does is registration.

Are there any errors after the Segment Registration step in the log? See About / Report an error

Oh so I don’t need to go on Elastix general registration !!!
Just stop after my “file2 cropped” and superimpose this one with my file1 !!!
So many thanks ! and so sorry for not having understood before !!!

1 Like