Preset for masks in segmentation

i would like to suggest putting the option to save presets for MASKS in segmentation .

i struggle to fine tune a mask with threshold or other effects im using , but the frustrating part is that i need to go back and forth in my segmentation work flow and i guess many other do the same .

however when you go back its so effortful to guess the previous mask setting and i usually used free painting / drawing without mask just because its hard to fine tune again

i wish to to have and mask list or some sort of preset add . id love the preset add mostly cause my work is limited to certain indication so eventually id use presevious mask

simple example that i always waste time fine tuning is when i pain a hazy cortex , i need to adjust contrast then then use threshold to make a mask. repeatred this step 10s of times and i hope the comminty develop something for it

cheers

If you need to do a series of actions many times then you may consider defining a keyboard shortcut for it.

For example:

If you are not sure how to put this all together or how to automate a specific step then let us know.

First I’d love to find out how to make shortcuts for these actions , however my main issues isn’t just doing the action but mostly find the right value for it like find the correct threshold to use again is time consuming .

By having preset mask the values as well as the action is needed to be saved when I believe to be highly useful for users

İf you are having to do a lot of exploration for each dataset, i don’t think presets will be much of use to you. Presets by definition work for best for things that are similar in ranges/intensities. Sound like your datasets are very variable.

not quite ,
like for example when i segment . i routinely use three or more masks based on threshold .
i need to go back and forth to define those thresholds . anatomy is not always easy to judge so i require adjusting the contrast before i decide the correct threshold for some .

if i save it as a preset i can just flip back to previous mask and carry on painting segment rather than repeating the work to define the mask .

You can add a shortcut to save the current settings to your preset list and another shortcut to cycle between saved presets.

can you please explain hows that can be done ?
thanks

Can you tell about your progress so far? Have you tried code snippets in the script repository to set window/level of a volume? Have you tried the code snippet that registers keyboard shortcuts?

I’m a surgeon by trade, so I have no knowledge of coding, I only use UI.

Maybe you can hire a student or a contract software developer to help you with this. If you just want to have keyboard shortcuts for existing features then probably it is just a couple of hours work for a software developer who has some Python development experience. If you want a module with some nice and convenient graphical user interface then that will take more time and it may worth finding someone who has Slicer development experience.

If you don’t find anyone among people you know then you can ask one of the Slicer commercial partners or describe what you need in a topic in the Jobs category and see if someone contacts you.

It is not that essential for me .
However this feature is very useful and I found it in more than one software like itk-snap , mimic and proplan .

I hope to see it in slicer one day .

Maybe I misunderstood something. Where is it in ITK-Snap?

it is not explicit in ITK - snap but it is in mimics

in ITK snap, the mask specifications threshold and area of editing don’t change. they are independent.

however, the thing in slicer is that masks are not independent. for example, if I set threshold for segment A, the threshold change will stay when I work in segment B. which is not productive

that’s not the case in ITK snap. your mask is completely independent. whatever you do in a certain mask is saved

in my work for example, i need different thresholds and areas of editing for each
1 soft tissue
2 thick cortex
3 soft cortex
4 pathology

so it would be great if either I can do custom masks ( presets ) I can use with any segment

or each segment mask becomes independent of the reset, and won’t alter once I move to the next segment and start a new mask.

this will allow me to go back and modify a segment without repeating all the mask editing

i know for an expert those might not be necessary, BUT they can save tons of time for a regular user like myself.

This is available in Slicer, too. Each segment can be used as a mask. Enable overlapping segments and then create a segment.

You can create soft tissue, thick cortex, soft cortex, pathology segments using Thresholding. Then you can choose one of these segments as “Editable area”.

@lassoan I think what @mohammed_alshakhas is pointing out is that in Slicer we have a global editing threshold that is used for all painting operations no matter which segment is selected. Maybe there should be an option of setting per-segment thresholds.

1 Like

@pieper Yes , that’s exactly my point .