Conversion of a complex structure from closed surface to binary labelmap


I import in Slicer a segmentation of bloodvessel in .stl format.
However I want to do operation on it in slicer (use the scisor tool for example) and to do that I need to change the master represenation from “Closed surface” to “Binary LabelMap”
It works for small segmentation but it doesn’t work for a big complex one.
Is there any tricks to make the conversion easier for 3Dslicer ?
Also I don’t really know why the conversion isn’t working. Slicer just stop responding as if it’s computing in the background but the calculation never finish.
When 3Dslicer is computing, my CPU usage is 35%, my RAM usage is 63% (13,9 Go of available RAM) and my GPU is at 2% usage so I don’t think the issue is that my PC is not powerfull enought.

If anybody has any advice, that would be very helpfull

Here is a link to the file that’s causing an issue translated_vessels.stl - Google Drive

Your file does load immediately on my system (5.5.0-2023-09-13 r32175, Linux). Looks like pulmonary vessels that need smoothing. It’s not a big file.

Are you perchance using Mac with M1/M2 CPU? There have been some many reports of simple tasks not performing well on that emulated OS.

The file loads easily is converting the file to a binary label time that isn’t working.
I’m on window 10.
I let 3DSlicer run for more than 2hours and when I got back the conversion was done.
I guess it just takes a lot of time but I don’t know why.
My CPU is a ryzen 7 3750H and my GPU is a RTX2060 if that can help.

I misread your post, sorry. The conversion is burning my CPU too. We’ll probably end up saying it’s big a workload.

1 Like

What’s weird is that my CPU isn’t burning or anything, it’s sitting at 35% use all the way throught the conversion.
Is there a setting that I could have activated by mistake that reduces the amount of CPU used for this operation?

Unfortunately the conversion algorithms (and many other algoritms) that Slicer uses from VTK are not all well optimized, and so the majority of the computations happen on a single thread. Since Slicer is mainly a research tool, and the underlying libraries are also developed from research grants, performance optimization has not been a priority.

There is a recently published algorithm for voxelization that might speed up this specific conversion considerably. Please see here:

1 Like

Thanks for the explanation.

It’s good to know that a faster algorithm exists, but I think that in the near future I’ll just find other ways or launch the conversion while I’m doing something else :slight_smile: