Image Registration microCT image to STL file

I have an STL file that I used to 3D print bone samples. I then scanned those 3D printed bone samples and converted those files to nii files. I am trying to run image registration in Slicer to evaluate the quality of the 3D printing, but I am not sure how to register a surface mesh and a 3D image. I would like to run a simple rigid transformation using BRAINS and a linear transform.

I was able to get a linear transform to work using the original image file that I used to make the STL file but that is not quite what was 3D printed. As there is mesh operations that would slightly change this. Is there an easy way to convert the STL file to a nii or nrrd for example?

You lose some accuracy if you rasterize the surface mesh into a binary labelmap, so probably you can get more accurate results if you segment the CT scans and compare them to the original surface meshes (STL files) using ModelToModelDistance extension. You can align the meshes before the comparison using model registration.

I have segmentations of the CT scans, but I was thinking segmentation could introduce other errors into the image. Noise or loss of connectivity in the structures of the sample.

Could you provide some documentation about rasterizing the surface mesh into a binary labelmap? Additonally, I am confused on how to resample an image in Slicer. I would like for the CT image and the STL file to be of the same image size.

I mean importing a model (surface mesh) into binary labelmap representation in a segmentation: Segmentations — 3D Slicer documentation

CT imaging, segmentation, all import/export operations, etc. all maintain the correct physical size. All processing and comparison methods in Slicer operate in physical space (image resolution does not matter). Therefore, there should be ne need for resizing or resampling for any comparison.

If you want to resample images anyway then you can use resampling modules, such as “Resample Scalar/Vector/DWI Volume” module.

1 Like

I am still having some issues with resampling and the image sizes. Can I provide you with the images so you can understand what the issue is?

Yes, sure, you can upload the images anywhere (dropbox, onedrive, google drive, etc.) and post the download link here. Make sure the image do not contain patient health information (anonymize or use public or non-human data).