Clipping volume

i wish to have a scissor/eraser tool for volume.

that will allow free hand clipping of volume.

I’m aware of other methods like splitting volume but those are more involved.

i rather have a simple scissor / eraser of volume

This feature is available in Segment Editor in two steps: use Scissors effect to specify a region to remove and then use Mask volume effect to blank out that part of the volume.

eraser would be a fantastic addition, scissor is not applicable in all situations where surrounding structures nearby.

I used this with many viewers and I love it

You can already erase with the paint or draw effects on the slices, and you can already use the scissors tool to erase in 3D. Practice a bit with the Mask Volume effect - it’s very powerful for this operation. If you have a specific tool in another software package that you think has useful features please point to it.

other viewers have a 3d volume eraser, without the need to segment a part and then mask it.

masking is very useful when I want to create a new volume for a specific part, but for me as a user id rather be able to delete/erase part of the volume directly.

another disadvantage with masking is that some volumes are noisy, like if I have a CBCT and I was to remove some of the artifacts. then creating a mask for that part is not easy and time-consuming

Indeed, it takes about 6 extra clicks to set up masking:

  1. Go to Segment Editor
  2. Click Scissors effect
  3. Click “Fill inside” mode
  4. Draw in the view
  5. Click Mask volume effect
  6. Click Apply

After this, it just requires 3 clicks to update after drawing with scissors:

  1. Hit space key to switch to Mask volume
  2. Click Apply
  3. Hit space key to switch back to Scissors

For an experienced Slicer user these take about 10 seconds extra one-time setup time and 2 seconds extra for each additional cut, which should be tolerable.

For new users I agree that this can be hard to figure this out. They don’t even realize that the feature exist and cannot easily discover that it just takes a few clicks. So, why don’t we make it simpler?

Anyone could add a a small scripted module that would automate those 6+3 clicks. However, newcomers would still need to discover that module and switch to that module, select input volume, activate the scissor, etc. so overall this would be not be a game changer for most use cases.

To achieve more substantial improvements, we usually need to go beyond the immediate request and look at the final user need. Often the user does not really need a manual clipping tool but wants to solve a more complex task and there may be better solutions for that.

  • For example, if the user wants to use volume clipping to remove the patient table then instead of improving usability of a manual clipping tool, it can be much better to use a single-click solution, such as the Remove CT table module (in Sandbox extension).
  • If users really need manual volume clipping then usually it is just one step of a longer workflow. Then much more automation and user convenience can be achieved by implementing a scripted module that guides the user through the entire workflow, which eliminates the need to switch between modules and set inputs/outputs of modules - not just for the volume clipping but for all workflow steps.

So, we don’t have a simpler, dedicated manual volume clipping tool because advanced users do not really need it, and most new users and clinical users need something better, so it has not been a high priority.

If this is high priority for you then you can implement that small Python scripted module that automates those 6+3 clicks. We would be happy to help you getting started. You can even bring it as a project to the upcoming Slicer Project Week, starting next Monday.

Image noise should not be a concern if you use “Fill inside” mode, but if you run into issues then describe in a bit more detail what causes the issue.

thank you for the thorough response,

I was not aware of the " removing CT table effect",I have to try it soon.

creating a mask with scissors is tricky and would be too much when the part you want to erase has multiple contacts think of ( teeth, neck collar, face mask, etc). you just end up including too much of what you want to keep.

a 3d sphere eraser that I can alter in size would be sufficient for most medical users like me. and it is already there in softwares like Romexis and Nemofab.

the advantage of 3d editing/ erasing the volume is incredible for complex cases. it is already the with the scissor, I just wish to have a sphere eraser in addition to the scissor. exactly like the eraser effect in segmentation being possible to use it in 3D.

the issue with noisy volumes is that it is quite challenging to distinguish the artifacts in individual slices ( the beginning of the artifact and the true image ), on contrary, erasing those artifacts in 3D is much simpler. at least you can do most of the work in 3d then shift to individual slices for fine-tuning.

This is already available, just check the “Edit in 3D views” checkbox in the Paint or Erase effect. You can adjust the size using Shift+MouseWheel.

But that’s not all. You can also do local smoothing in 3D, which can also removes small bridges and noise.

I meant for volume clipping , not for segmentation.

Editing the segmentation is the same as blanking clipping the volume (you just need to set it up with a few clicks; and then do two clicks to make the segmentation clip the volume). If the couple of clicks to set up the clipping by segmentation and the two clicks after segments are modified is a problem then you can automate them using Python scripting, but it is only worth the time if you need to clip hundreds of cases.

I’m totally aware about the how of clipping volume based on segmentation or masks . And actually, that’s my work flow .

Believe me it is quite time consuming and not always easy for reasons I mentioned before .

I’m not sure I’m getting my idea through , it’s just a spherical volume eraser .

I’m aware about others ways to do it , but they all time consuming and difficult to apply in many situation for my cases .

And yes , I’m using volume clipping for almost all my cases nowadays since I need to look at some structure isolated

And I can’t script :face_holding_back_tears: at all

@lassoan @pieper

this video illustrate the idea I’m talking about

Thank you for taking the time to explain @mohammed_alshakhas. Yes, there are more clicks involved in Slicer to accomplish that. I agree with @lassoan that something very similar to the video could be accomplished with some programming. Maybe you can enlist someone to help you implement a custom module for your workflow.