Mask volume- segment editor

Hi all

I have tried masking a volume with segment editor. Can I completely erase the masked volume , so that unmasked bit remains. I want to use elastic registration on the unmasked volume. But as it remains masked, it’s not visible but gets registered as total volume. Thanks

Mask volume effect does not change the extent of the volume. You can use Crop volume module to make the volume smaller.

Thanks.

Is there an option to delete / erase part of the volume. I tried surface cut/ scissors but erase outside option doesn’t work. Thanks

It does, both in stable and in nightly. Can you please explain how you try to do it and why do you think it doesn’t work?

Thanks @cpinter

It works within a segment. But what I tried was to create a segment of the area that I m not interested, then cut it out to leave my interested area as a volume, not making it a STL.

All I m trying to do is create a custom shaped region of interest , and keep it as a volume , not a segment, so I can use elastix on that.
Cropping creates rectangular ROI , I m looking for an option where I can cut and delete a custom area of a CT volume and keep my interested area as a ct volume.

Thanks

Mask volume effect (provided by SegmentEditorExtraEffects extension) can blank out a volume inside or outside a selected segment.

I just tried and works fine with both nightly and stable. However, Slicer doesnt automatically change the volume displayed to the newly created volume. Make sure you are looking at the right volume.

1 Like

Thanks ever so much all of you.

Apologies, I m not getting this right.

In segment editor , I add a segment, then with scissors I mark my area of interest and select the option fill outside. Then I add s mask to mask the filled segment. Then I try to register the unmasked bit of the volume with elastix. But this registers the whole volume that’s been masked too, not only the unmasked bit.

Second option I tried was again, went to segment editor, Add segment button then use scissors with the erase outside option. Nothing happened. But if I use the fill outside option it fills.

If I do this to an already created segment/ stl scissors can delete part of the segment.

Thanks

To keep things simple, make the segment cover the region you are interested in. Then, you can us Mask volume effect to blank out the parts outside your region of interest.

Yes, this is correct. All effects (Scissors, Surface cut, Paint, etc.) only modify segments. They will not modify any volume nodes.

If you blank out a region of a volume, Elastix will still take those voxels into account. This is probably not what you want.

To make Elastix ignore certain regions then you can specify masks in “Masking” section in “General registration (Elastix)” module. You can create a mask volume by using “Fill inside and outside” option in Mask volume effect.

2 Likes

Thanks all. This is helpful. I will try it out and see

I am afraid I did try this, but an error message occurs.

Says- command elastix returned to non zero exit status.

I ve selected my fixed volume, my. moving volume, same mask for both volumes and instructed to create new output volume and new transform. This was the error message came up.

Also Prof Andras @lassoan- I tried clip volume with models extension. In the youtube video it shows the volume can be clipped. Following the exact same steps, my volume disappears once I command apply.

I am not sure whether I am doing something wrong. I ve followed the same steps in the documentation/you tube video. Thanks

Apologies, Incorrect reply