eidelen / DicomToMesh

A command line tool to transform a DICOM volume into a 3d surface mesh (obj, stl or ply). Several mesh processing routines can be enabled, such as mesh reduction, smoothing or cleaning. Works on Linux, OSX and Windows.
MIT License
451 stars 93 forks source link

Mesh Axes Orientation #23

Closed fedecere94 closed 1 year ago

fedecere94 commented 4 years ago

In a dicom exam Patient Position (0018, 5100) indicates how the patient is positioned with respect to the machine, HFS (Head First Supine), FFS (Feet First Supine), ecc... while the Patient Axes (supposing Anatomical Orientation Type (0010,2210) is absent or has a value of BIPED ) are always X (from right side to left side), Y (from top, anterior, to bottom, posterior), Z (from feet to head). I reconstruct a mesh (and I centered it with -c command) saving it like .obj file and then I imported it into a Unity scene and I noticed that the mesh is oriented with all axes in opposite direction respect to the ones mentioned before (the figure represents the axes orientation of the constructed mesh imported in the unity scene). meshAxes2

It is not a problem (in my app I'll take into account that the axes are oriented like those), but what I want to know is: Does the constructed mesh always have the axes oriented like the above figure, no matter the Patient Position tag (HFS, HFP, FFS, FFP, ecc...)?

eidelen commented 4 years ago

Hi, I am sorry for the late response. First of all, dicom2mesh does not manipulate the orientation of coordinate systems (CS). The command -c does only a translation of the origin to the mesh center. Even though I am not a Dicom expert, I know that there is quite a diversity in formats. But generally the orientation and scaling is part of the Dicom header. I am pretty convinced that the constructed CS is not always as on your drawing. By the way, this is a left-hand CS. In computer-vision, we usually apply right-hand CS.

eidelen commented 1 year ago

@fedecere94 I am closing this issue. Feel free to reopen it. Thx, Adrian