According to this document (slide N° 5), you should be able to convert back and forward from labelmap representation to surface representation without any information loss
That’s what I thought, but wasn’t able to discover a way to do so. I tried creating a empty segment from the source volume I used to generate the model, and then use the import/export feature of the segmentations module to import the model into that blank segment use a labelmap.
Unfortunately, that’s not the same resolution at all, it ended up being fairly low res.
That’s the part I am confused about. By creating a blank segmentation from the source volume, I assumed that the imported segmentation will inherit that geometry, but that’s not what I am seeing in experience.
Also for 3D models import/export feature of the Segmentations does not have a setting where you can put a reference volume to get the geometry from.
@muratmaga can you share a concrete example (a volume and model) and describe the steps you take? At first I thought you were asking about registering the model to the volume, but I guess you are more concerned about the resolution of the rasterized model?
It boiled down from which stage the models were exported. If you kept the smoothing option on when you enabled the Show 3D button, and then export the model, you irrecoverably lost detail.
Download the CTChest sample data, and segment bones (threshold 165-Max, closing filter 5, island tool to keep the largest island). Save the segmentation as seg.nrrd
Turn off smoothing in Show 3D button, then right-click on the segment in SH and export this segmentation as a model, export the model as ply.
Repeat the #2 but smoothing enabled (with default 0.5)
Reset the scene, reload the model the and the CT volume into the scene and try to create a high-resolution segmentation out these models.
When import #3 it is lower resolution than the labelmap generated from #2. In fact for me the import step #2 is 3-4 times longer than the one with smoothing enabled. You will see the difference in the labelmaps, not much for this low resolution sample data, but enough for us to make a difference for landmarking certain faint structures on dry bones such cranial sutures or small protuberances.
Unfortunately for this data, I think they were all exported with smoothing enabled, so I can’t find a way to generate higher detailed labelmaps version from them.
The code below creates a new segmentation, updates its geometry sampling with the volume node and imports a model. There are more details with the test CT-chest volume, following the steps you described. The difference appears when the Show 3D button is deactivated/activated in the segment editor, whether the code is run or the model is imported in the Data module. The difference is even more important if the model has been saved without 3D smoothing.