3D model -> DICOM/nii conversion

Good day,
I have raw patient images as well as their segmentations as 3D models. I need to convert segmentations to 3D images so that these converted images are aligned with the patient’s images.
Could you please tell me, is it possible to convert 3D mesh(.ply) to the DICOM or any other format for 3D images? And is it possible to align it with the other DICOM image?

If I understand correctly, you don’t have a segmentation file, but rather mesh that was a result of the segmentation? If you can convert the .ply to .stl, then you could simply drag and drop the model to Slicer and open it as e.g. Segmentation node, as described here.

There are many ways to do registration in Slicer, too. You can even perform registration directly on the model and loaded volume through fiducial registration (relevant thread).

You have also received some useful comments on the ITK forum.
.

1 Like

You can do this in Slicer, but it is not commonly needed. What is your end goal? Are you sure you need to convert the surface mesh to DICOM format? What software will visualize/analyze it? What DICOM representation that software recognizes (DICOM Segmentation object RT structure set, fake CT, overlays,…)?

Thank you for your reply. I need to convert a mesh to DICOM or any other 3D images format. I need these images to work with them in python, so no presets for visualizations should be applied.

The thing is, I have segmentations made by a physician in one program. The problem is, this physician makes segmentations on the 3d model which is rendered according to a specific visualization preset. As a result, in his viewer he sees a clean model generated from segmentations but in a real situation, without any visualization presets, images of these segmentations have some noise, he just doesn’t see it because he segments 3d model when a visualization preset is applied.

What I want is to get clean images of segmentations without any garbage. We’ve managed to export a ply model from this tool that is not as ideal as the model the physician sees but is very close to it.

Now our goal is to convert this ply back to dicom because for my purposes I need the image, not a mesh.

Actually I have also 3D images of my segmentations, but they have some noise (you can find an explanation of this in my reply to Andras Lasso, so I can’t use them. Thank you for your replay, I will take a look at this solutions.

Could you explain what do you mean by “visualization preset”? Usually we talk about presets when we are using volume rendering (directly from volume), not surface rendering (from segmentation), as we discussed in the other thread. Have you tried converting your .ply file to .stl and opening it in Slicer? Can you provide screenshots of the “noise” or files so we can try to replicate the issue?

Sorry I hand’t access to my laptop and couldn’t reply you earlier. By visualization preset I mean the “scalar opacity mapping” option on the volumes rendering tab. When I upload 3D images of my segmentations there, run volume rendering for them, and then change the opacity mapping, the visualization changes and some noise disappears, but it doesn’t impact the real 3D images and in the real situation the noise is still there. When the physician does segmentations in another viewer, he applies some visualization presets (some presets for opacity mapping) and that’s why he doesn’t see the real noise which exists. The example of the noise attached image_2020-10-21_121511.