New user segmentation help

Hi,

I’m a new user, trying to transition to using Slicer from Avizo. I have micro-CT scans of spiders, and I’m interested in segmenting the dense, sclerotized parts from the soft tissue as well as segmenting muscles. I have watched several tutorial videos and followed along from written tutorials, but I’m still struggling to get functionality akin of Avizo, but I suspect it is my inexperience. Any aid you can give, or videos you can point me to, would be great. Also, I’m using a Windows 10 machine with an Intel Xeon 3.3GHz processor, 128 GB RAM, and Invidia Quadro P4000 GPU.

  1. Are these specs sufficient? I find the program struggles and crashes frequently.

  2. I am working primarily with the paint tool, but there are two tools from Avizo that I think should be here but I’m not finding yet and don’t see in a tutorial. The first is moving large areas, highlighted through all layers, between segments. For instance, I want to grab all the layers with legs and move them from a thresholded layers to another layer. How do I do that?

I see the Scissors tool, but I do not understand how it works. If I have two layers (seg1 and seg2), and I circle an area with Editable Area: Everywhere and Modify Other Segments: Modify All, nothing happens. Paint seems to work more as expected (in seg2, if I highlight an area of seg2, with Editable Area: Inside seg1 and Modify Other Segments: Overwrite visible, it does move to seg2. But surely there is a way to move structures in many layers between segments?

  1. Interpolation / Fill Between Slice. I have a feeling this is me not understanding the details of how Slicer is doing this process. In Avizo, I would highlight two or three areas of, for instance, a leg or duct or stretch of carapace, and interpolation would follow between those structures to highlight them without going through and segmenting each layer. Here, if I highlight two regions of a leg in seg2 (where seg1 is ‘the rest’ of the material), and Apply, nothing happens. I fear I am missing something obvious here as lacking this function will make this program difficult to continue to use.

Thank you for your advice,
Bob

Hey @bobkallal,
Regarding specs it comes up pretty often and I’m sure you can find some threads on Discourse. There is official recommended hardware list. Take a look at this thread about handling micro CT / high res data:

For instance, I want to grab all the layers with legs and move them from a thresholded layers to another layer.

I’m not sure if I understood you correctly, but you can copy the mask/layer contents to another layer with Logical operators effect. There you can add & perform other logical operations on layers.

If I have two layers (seg1 and seg2), and I circle an area with Editable Area: Everywhere and Modify Other Segments: Modify All, nothing happens.

What kind of operation are you trying to perform with scissors? (Erase, Fill)

If you have your segmentation on one layer (seg1) and want to copy part of seg1 to another layer (seg2), you can use either Scissors or Paint brush. Simple approach would be to: activate second layer seg2, choose Paint tool, select Editable area: Inside seg1. You can keep “Allow overlap” in Modify other segments option.

Similarly with Scissors: if you have segmentation on layer seg1 and want to copy a selected part of it: create new layer seg2 and activate it, select Scissors tool, use Fill inside operation, select Editable area: Inside seg1.

Here, if I highlight two regions of a leg in seg2 (where seg1 is ‘the rest’ of the material), and Apply, nothing happens.

Fill between slices works so that it will interpolate your segmentation between slices. Eg. if you have segmentation on seg1 slice #1 and seg1 slice #10, it should fill in the between (seg1).

You might find instructions details important too:

Instructions:

  • Create complete segmentation on selected slices using any editor effect. Segmentation will only expanded if a slice is segmented but none of the direct neighbors are segmented, therefore do not use sphere brush with Paint effect and always leave at least one empty slice between segmented slices.
  • All visible segments will be interpolated, not just the selected segment.
  • The complete segmentation will be created by interpolating segmentations in empty slices.

Masking settings are ignored. If segments overlap, segment higher in the segments table will have priority. The effect uses morphological contour interpolation method.

2 Likes

Dear Jan,

Thank you for your reply. I’m happy someone replied as I’m struggling a bit here myself.

When I bring a stacked image tif file into Slicer, it appears to be 50-200 MB. Is this considered a lot? They have been downsampled by 50% and cropped. If I have 128 GB RAM, surely that should be enough to handle it? As I am painting layer by layer into the segments, it takes about 30 seconds for the new color to appear, and eventually it crashes. If 10x RAM than data size is recommended, this seems to be satisfied. What am I missing?

The Logical Operators Effect was helpful - that was one of the things I needed.

I also think I understand scissors better.

I’m still struggling a bit with Fill Between Slices / interpolation. I have a segment1 and segment2, and segment2 has a mostly complete structure with a few holes in it. I make segment1 invisible, and initialize the interpolation on segment2 with Editable Area = segment1, and Modify Other Segments = Overwrite visible. My understanding that this should more or less connect areas of segment2 where they may be touching in invisible segment1 - does that seem coherent? Of course this takes a long time to calculate, but it doesn’t seem like it ends up doing very much interpolation. For instance, I have two slices about

Also, when something is “Erased,” does this mean its voxels are removed from all segments?

Thank you for your support. I am very interested in learning to use this program and I have many dozen segmentations to carry out!

What is the volume size (shown in Volumes module → Volume Information section)?
What Slicer version do you use?
How much memory does Slicer use (you can see it in Windows Task manager)?

If you import from TIFF, make sure you convert to single-component (scalar) volume using “Vector to scalar volume” module.

In general, if you want to interpolate segment2 then do not set segment1 as editable area, as it would restrict adding interpolated regions to segment2. Instead, you can leave editable area “Everywhere”.

The data is always what you see. If you erase from all segments (e.g., by enabling “Erase all segments” in “Erase” effect) then you will see that data is erased from all segments. If you just erase from one segment then only that single segment is changed. When you paint somewhere and “Modify other segments” is set to “Overwrite all” or “Overwrite visible” then the painted region will be erased from other segments.

Dear @bobkallal. Welcome to the Slicer world.

Please answer @lassoan’'s questions (about volume size and dimensions etc), and perhaps provide a few screenshots what you want to accomplish and what’s failing in Slicer. Also what version of Slicer are you using (stable or preview)?

Thank you for your replies. I apologize for the tardiness of this message.

@lassoan

  1. I am attaching an image of what I see under Volume Information. The dimensions are 327x350x705 - is that what you are asking for? The tiff file in this case is 77 MB.
    image
  2. I’m using verison 4.11.0
  3. Slicer is using 458.1 MB
  4. I was not aware of this module. When I bring it up, I cannot select anything under ‘Input Vector Volume,’ with 'Output Scalar Volume" being the input tiff. What do you recommend?

@muratmaga
I’m using preview release 4.11.0. What I would like to do is segment out sclerites and muscles from scans of spiders, akin to what you can see in this paper: https://onlinelibrary.wiley.com/doi/full/10.1002/jmor.20939

Your dataset is not big. You have plenty of RAM, so sluggishness and crashes should not come from lack of resources… Would it possible for you to share your dataset? I wonder if the issue is somehow the small voxel size?

As for segmentation lingo and terminology, perhaps you can take a look at our tutorial about how copying segments work, what it means to overwriting, or overlapping segments, segments to labelmap representation etc:

I find trying with the simple cases and toy data until I understand the specifics of the functions is the best route in learning a new software. Then I switch to my own dataset…

@muratmaga Thank you. I also suspected I wasn’t having an issue with memory but I didn’t know another issue to investigate. Many of my samples are small. My voxel size is 0.000144999 mm, but I downsample by 50% in FIJI so I multiply by two, resulting in 0.0028 mm, which I think is correct. I’ll try to go back to the tutorials. I’m happy to share the dataset all the same, if there is a preferred way to do so.

@lassoan I realized I forgot to reply about interpolation. Here’s my issue there - I have the green part of the spider, with blue rings which are the outside a roughly cylindrical structure. I want to interpolate the green area between them to segment out the blue cylinder.


I make the green invisible, then select “Editable Area: Everywhere” and “Modify Other Segments: Overwrite All,” and this works. But I’m confused why choosing “Editable Area: green” would not work. Changing to “overwrite visible” also works. I think I must experiment more.

I would suggest saving your tiff stack as a NRRD and posting somewhere on a cloud file share service and putting the link here…

By the way, with your computer specs, you shouldn’t encounter a problem with the full resolution dataset.

Thank you, I will try without reducing the data.

I have a new problem that I suspect is something simple. I want to open my project from last week (pictured above). Last time, saving the data produced the following files: a slicer scene file (mrml), a scene image file (png), an acsv file, and a vp file. I also produced an nrrd file from the stack in FIJI.

I’m attempting to follow the data loading tutorial by Csaba Pinter. If I drop the nrrd file into Slicer, only one of the views shows the stacked images; the other two are not shown correctly:

In part 2, you can drop an mrml scene file directly into Slicer. As I produced one last week, I try that - the segmented 3D visualization and one of three stacked images appears:

What am I missing here? I’m sorry if this should be obvious.

Your Z voxel spacing is incorrect. Go to volumes module and correct the value and make sure to save your NRRD. Also hit the little square icon in slice views to reset the field of view after correcting the spacing.

Do try the ImageStacks function that you get with installing the SlicerMorph extension with the latest preview. It can be a viable alternative to Fiji.