Segments imported as stl files failing to mask properly

Hello Slicer Community.

I imported an stl file and converted it to a segment as described in this forum: Difficulty with editing new segments imported as stl files

However when I try to mask a transform using this segment it does not work as expected.

Green segment (sharp edges) to use as mask:
one

Masking result (pixelated and blocky and not desired):
two

Help would be appreciated and thank you for your support.

Hi @miniBin - The pictures help, but it’s still hard to diagnose what’s going on. Could you post data and a short script that would allow people to reproduce the issue you are facing? I suspect that the underlying cause is related to interpolation of transforms.

What is the best way to transfer the data? Also I apologize but I do not know how to create the script?

You can use google drive / dropbox / onedrive etc to share the data.

By script I meant a python script, but if you aren’t using one, then a step-by-step description of what you are doing, what you expect to happen, and what happens instead. (Speaking from experience, the process of creating such a script often leads to the solution, but if not then it will help us help you).

The issue is probably still the resolution. If you do masking, then it’s not just the mask that determines the result but also the original image, which stays the same resolution regardless what you do with the segmentation.

I’d suggest using Crop Volumes module to resample the image as well. If you turn off interpolation for the volume in the slice view (an icon next to the volume selector in the drop-down menu of the slice view), then you will see the actual resolution.

@pieper: Thank you for your response.

Here is the google drive link: https://drive.google.com/drive/folders/1ZM_7Nf89sZSo_d9_NHUrV0OGbwfdmlzk?usp=sharing

I have provided all stls and transforms. Also there are two videos where I document step by step.

Thank you all for your continued effort and support.

@cpinter: I tried using crop volumes earlier and the problem still occurred. I can try to turn off interpolation. Is there no way to mask out this object then?

Hi @miniBin - when I go to that link I get an empty folder that says “drop files here”. Are you sure it’s the right link?

Best,
Steve

My apologies, see if the link works now.