I’m a new user of 3D Slicer.
For my purpose, I have an image sequence of png (uint8 - one example hereafter) image representing a bone. These image are black for the background (0) and white (255) for the bone I’m working with. Therefore I only have 2 colour in each slice (this image sequence represent a thersholding of the complete image sequence).
I want to extract the bone in an .stl format. However, even after following many tutorial, I still have some issue.
The first one, and I think the biggest one, is that when I activate the volume rendering, all the black of the image sequence is shown. Therefore I have a solid black box around my bone (see attached image).
The second issue is that, using the thersholding tool in the editor menu, I’m not able to extract a readable stl file of the bone…
This is a labelmap volume (voxels are labels are not continuous scalars) and you need to indicate this to Slicer, as presets and operations for scalar volumes are different for scalar and labelmap volumes.
You can convert the image to model by following these steps:
load the image as labelmap volume (in Add data dialog, click “Show options” and check Labelmap) - by the way, this will also make Volume rendering work immediately, without the need to tune any settings
Go to Data module
Right-click on the volume and choose to convert to segmentation
Right-click on the segmentation and choose to convert to model
However, when I import my data I deselect “single Image” and I activate “Labelmap”. But now nothing at all is happening…
It seems that the option “Labelmap” is killing the loading of the images.
“Single image” force loading a single file. If you have the volume in a list of PNGs then you must keep “Single image” option unchecked.
By the way, where these PNGs come from? It would be much better to save the volume properly, as a 3D nrrd or mha file, instead of storing as a list of 2D files (which has many problems, for example there is no standard way of storing 3D position, orientation, and spacing of slices).
That image above is PNG of type “indexed color” (2 colors). In another app it loads as RGB, in Slicer as vector volume. May be converting to grey-scale image could help.
Where do the images come from? Developers of that software should be made aware that saving a 3D volume as a PNG series is very bad practice (see this note) and they should implement proper saving into a 3D file format instead.