Image registration nrrd files appear to be scaled differently despite adjusting scaling

I have been using 3D Slicer for rigid registration of two nrrd volumes. The first is an STL file that I have rasterized into an nrrd file within Slicer, this is the fixed image. The second nrrd file, moving image, has been resampled to match the fixed image file in Python. When I open the two files, the fixed image has image spacing units already encoded in Slicer. The moving image has the default of 1 which I set to match the spacing units of the fixed image. This has generally been fine for my registration workflow but for some files I have noticed the fixed image seems to still have features larger then the moving image even after adjusting the image spacing. Is there a way to fix this automatically in Slicer or Python?

Example included below. The overlay is the fixed image which seems to have image features much larger then what’s in the moving image.

image

Rigid image registration will not change the size of the objects. It will resample our volume to that reference volume (so spacing change change from 1,1,1 to 2,2,2 if that’s the spacing of the reference volume), but this will not result in size change.

If you need scaling you need to to use similarity transform (rigid + uniform scaling).

I have tried using the Rigid + Scale 7 DOF option but I find the result to look the same. The moving image did not appear to scale to have similar feature size to the fixed image.

Better to provide more context,

The fixed image is an STL file that I had submitted for 3D printing. The moving image is image that I had scanned in microCT. I have tried using landmark registration and used both the rigid registration and the similarity registration. This results in the plates you see in the top and bottom of the image having an incorrect contour and scaling. I am not sure why the STL file and the microCT images do not align as well as they should.

image

For any type of image registration to work well, image contents needs to similar in both moving and reference image. In your screenshot above, there is a circular object in one of the image, which I don’t think exists in the other? (it is a bit hard to tell).

Also, the initial alignment matters. Are both images, more or less similarly oriented initially? Most image registration methods will work fine if the images are rotated only a few degrees, but will have hard time matching extreme differences in rotation of the objects.

Yes that is a bore from the microCT that was not removed from the registration so that may be confounding the results a bit.

I have gotten a strong initial alignment with landmark registration, but this seems to change the plates at the top and bottom of the image. This issue is not apparent in all of my images however.

Rasterized STL file will have no intensity information to help the registration. You will be better of using masks for registration. And use a metric that’s more relevant to register binary images (such as this ITK: itk::MatchCardinalityImageToImageMetric< TFixedImage, TMovingImage > Class Template Reference)

A mask of the microCT image? I had decided against it as to not introduce errors from the segmentation process, such as noise that could alter the contour.