Hi.
I have a few stl files and want to create one multilabel for monai train. I write python-script and it works (gist:544be2f1ef2ad63a44fd38d43ab54760 · GitHub)
In general, it loads all stl in cycle and imports to segmentation:
def load_avalible_labels(labels_stl_path, segmentationNode):
for label in labels_stl_path:
modelNode = slicer.modules.models.logic().AddModel(label)
slicer.modules.segmentations.logic().ImportModelToSegmentationNode(modelNode, segmentationNode)
slicer.mrmlScene.RemoveNode(modelNode)
then fill, save and so on…
But! Some segments are “cubical”, some are normal:
stl-files are same, I mean, if open all files in a slicer as model they are smooth.
If I convert them manually (model>segmentation node), segments are smooth too.
So… could someone help?