Surface Registration (original STL with cbct converted to STL )

Hi everyone!
I´m trying to make a surface registration with 2 STL files:
one STL obteined with an intraoral scanner , and the other STL is a numpy array(cbct) that I segmented and converted to STL with a code I made in python (not python in 3d slicer).

Both images cames from the same patient , but when I visualize them, they look in a different scale, so registration of surfaces failed. Here I leave some images of the result:
surface_registration
stl_surfaces

thanks all.
Operating system: windows 10
Slicer version:4.11
Expected behavior: optimal rgistration
Actual behavior: the registration of surface fail due to de different scale .

Which one has the correct scale: the surface scan or the CBCT? (you can measure distance using markups line)

I think that STL from intraoral has the correct scale (about 50 mm from the last molar of left side to the last molar of right side ) because stl from cbct is about 100 mm.

(Also i measure the distance in the original cbct volume (100mm) and in the intraoral stl converted to volume(400mm), that because i wanna try volume registration too)

CBCT manufacturers are known to be very bad in implementing the DICOM standard. Probably this is just yet another example. If this is a known issue then the DICOM Patcher module may fix it (see instructions).

the problem is not de cbct , bacause I´ve just measured the distance between the two last molar in the original dicom cbct file and is the same distance (50mm) as in STL file , so the problem appear when I go from dicom file to an array ( to make segmentation and preprocess image ) and then save the segmentation or make the surface . how can I solve this problem ?

Since you made this outside of Slicer, it is hard to get where the scale is loss (during the array conversion or your segmentation). Why don’t you import the CBCT directly into Slicer and do the segmentation in it?

1 Like

The exported numpy array does not contain information about the image geometry (origin, spacing, axis directions). See these examples about how to process images with preserving the image geometry:

  1. Convert segmentation to labelmap
  2. Running an ITK filter in Python
  3. Modify voxel of a volume using numpy
  4. Convert labelmap to segmentation