I have a 16bit raw image stack of a segmentation ‘so it doesn’t have a crazy amount of colors in the image itself’. Is there a way in slicer to generate a segment for every existing color in the image using the segment editor? Hopefully slicer can handle a fairly large number of segments. Sorry if it sounds confusing
It sounds like you have a labelmap volume (you have discrete values in the volume, each value corresponds to a certain structure). You can follow these instructions to load this image and import to segmentation:
After trying this method with about 1/8th of the dataset, which is a 700mb nrrd file. It did work but took a very long time to compute and with the labels it uses about 98percent of my 16gigs of ram. I will try some other software packages but I feel like they will also be too resource heavy
Currently, you can can probably edit up to about 30-50 segments at a time and move out other segments to another segmentation or labelmap. We are improving the segment editor to better support some neurosegmentation workflows which may involve a few hundred segments.
What kind of data do you work with? How many segments do you have? What is the volume size?
It is a micro-ct of a mammal and has I estimate it will have north of 200 segments if I was to load in the full dataset. Unfortunately I am interested in preserving as much detail as possible so reducing the quality isn’t really an option. Looking forward to future updates to the segment editor.
Sorry I am not sure how to check that. However today I did try to do the same with the 1/8th data set using both Itk-snap and Mimics. I wasn’t able to find where to import a labelmap for mimics ‘it probably doesn’t have this functionality’, but with itk-snap I just clicked open segmentation and opened the nrrd and it imported and created the hundred or so masks within a few seconds, and also had almost no effect on the memory usage (to compare, slicer took about 5 minutes to generate the segments and used 98percent ram once they were imported). Itk also had a really nice export all segments into single vtk scene which didn’t create a file size too large. However the downside with Itk-snap is the mesh it created was not as nice and had holes that were larger than the ones in slicer. Since I am interested in mesh quality, I am leaning more towards slicer, however memory usage and calculation speed is an issue with lots of labels
Yes, segment editor is much more capable than ITK-snap but currently it uses an separate labelmap for each segment, which may require significantly more memory, especially when you have many segments.
We’ll make editing of hundreds of segments more efficient within a couple of months (allow sharing memory between segments, add filtering/searching in the segment list, etc.). Until then, you can edit up to 30-50 segments at a time and merge them into a single labelmap at the end (or upgrade your computer, mainly by add a lot of RAM).
Sorry to revive this much later, but I hope someone can help: I am having a stack of png-images with 5 different colors in them. I’d like to segment this by color, mainly select the white background and remove it to 3D render the rest.
But when I try to load the image stack as a label map, I just get an error: “Error: Loading slices/slice_000.png - load failed.”
Any hints on how to do this? Sorry, but absolute newbie with Slicer3D here.
OK, it means that your data is actually a labelmap volume, not a color image. Therefore, it is better to save it as a scalar (single-channel) image. Use 0 for background and 1, 2, 3, 4, 5 for the segments. You can save it as png, but it would be much better to save the entire array as a single file, in nrrd format. You can find nrrd file writer for all programming languages, but if you are not sure which one to use then let us know.
You can load the nrrd file directly as segmentation, by choosing “Segmentation” in the “Description” column in the “Add data” window. You can make the file open as segmentation by default if you use .seg.nrrd as file extension.