You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I have been working on STL and DICOM images for a while. I select points on STL and DICOM with the 3Dslicer program. Then I create a set of v0 and v1 points for myself. Thanks to these points, I am trying to move the STL on DICOM using the function you wrote. I apply the affine_matrix_from_points function to the STL I have, but it does not create an STL where I want. Am I doing something wrong or do I need to change the method?
import numpy as np
from transforms3d import _gohlketransforms
from stl import mesh
v0 = [[-8.7,-13.8,-17.8,-18.5,-18.7,-16.3,-12.6,-7.4],
[6.2,4.5,2.9,2.4,2.4,3.1,3.5,5.3],
[17.4,11.9,6.8,1.1,-4.0,-8.8,-14.7,-19.6]]
v1 = [[-88.9,-93.7,-99.0,-104.6,-109.8,-115.9,-121.3,-126.4],
[-46.2,-40.8,-37.3,-35.5,-35.4,-38.4,-40.8,-45.6],
[64.3,62.8,62.5,62.5,62.4,63.0,63.7,65.0]]
stl_data = mesh.Mesh.from_file('test.stl')
R = _gohlketransforms.affine_matrix_from_points(v0, v1,shear=False, scale=False, usesvd=True)
stl_data.transform(R)
stl_data.save('affine_matrix_from_points.stl')
The text was updated successfully, but these errors were encountered:
I have examined this part of the code in detail, but there may be something I missed. In this image, the bottom left part is STL and the skull is DICOM. If I align the two, everything will be solved. Thanks for your help.
Hello. I have been working on STL and DICOM images for a while. I select points on STL and DICOM with the 3Dslicer program. Then I create a set of v0 and v1 points for myself. Thanks to these points, I am trying to move the STL on DICOM using the function you wrote. I apply the affine_matrix_from_points function to the STL I have, but it does not create an STL where I want. Am I doing something wrong or do I need to change the method?
The text was updated successfully, but these errors were encountered: