Difficulty with editing new segments imported as stl files

Operating system: Mac High Sierra 10.13.6
Slicer version: 3D Slicer 4.11.0
Expected behavior: Import stl file, convert from model to segment, edit the segment normally
Actual behavior: Unable to edit imported segment

Hi, there! I have been working on an independent project with 3D slicer to better understand the pulmonary vascular anatomy, and so far it has been a huge success and very fun. However, I have run into a new problem and can’t seem to find the answer on the online forums (or at least I don’t seem to be asking the right questions). I would be so grateful if you could offer some help!

So far, I have created detailed segmentations of the airway, pulmonary artery, pulmonary vein, and fissures based of a de-identified CT scan. However, now that I am going to print these segmentations, they are far too complex and I am needing to go back and simplify them a bit. The issue is, whenever I take the stl file (ie airway.stl), drag and drop into a new scene in 3D slicer, create a new transform from that model, then create a new segment based on that transform, the segment editor buttons are all greyed out so I can’t click on them. When I drag and drop the stl file into my old scene that has all the saved airway, PA, PV, and fissure segments, I can get it to come up as a new segment and the buttons are clickable, but when I go to edit my new segment it changes that whole segment, not just the area I was working on.

I have attached some pics below if that helps at all.

!

This is my data showing that I imported the airway.stl model, made a transform, and then made a segmentation from that transform successfully.

As you can see here, when I go to edit this segment, all the edit buttons are greyed out.

In this example, I added PAsmoothed.stl to my existing scene with the other segments, and the segment editor buttons are still lit up, but chaos breaks loose when I try to edit it.

Do you see how the branches of the vessel are weirdly shrunken? All I tried to do was delete the left half of the image with the scissor tool just as an experiment, and this was the result.

Again, if you are able to get back to me with some guidance that would be greatly appreciated. Thanks so much!

In your second screenshot you cannot edit because there is no anatomical volume selected. That’s why Segment Editor is asking you to “Select master volume to enable editing”, as shown in your screenshot as well.

In the third case, I can see a master volume. If that “6: CHEST…” image occupies the same space in 3D as your imported STL, then you should be able to edit it. You can verify that by going to Volume Rendering and showing the CT in 3D.

If “chaos breaks loose” means what you described next that the vessels have shrunk, then it’s because of smoothing. When you import an STL into segmentation and edit it, then in the background the model is converted to a labelmap. Then when you show it in 3D again, then default smoothing is performed, hence the data loss.

You can oversample the labelmap:

  • Use 4.10.1 or latest nightly
  • Create new segmentation node in Segmentations module
  • In Representations section make Closed surface as master (because you want to have control over the geometry of the labelmap afterwards)
  • Import model in Import/Export section
  • In Representations section long-click Create and choose Advanced create
  • Click the only path in the top part
  • Click Specify geometry button in the bottom part
  • Select your CT volume
  • Specify an oversampling factor (2 should be fine, 3 even higher resolution, but 4 may occupy too much memory)
  • Click OK
  • Go to Segment Editor and do your thing

You can also disable smoothing to prevent any shrinking (but after oversampling it might not be necessary):

1 Like

Dear 3D slicer forum,

Thanks so much for the help! I was able to make changes once I imported my CT scans and selected them as the master volume. In terms of the smoothing issue, I tried the oversampling the label map instructions, and when I went to do segment editor, an error message appeared saying that I needed to have a binary label map, and that I had closed surface selected. It would not let me make edits unless I switched back to binary label map. Am I still missing something? Not a big deal at this point though, this was a lot of help!

Sincerely,

Caroline

That’s fine, as Segment Editor requires the segmentation to have Binary labelmap as master, and you had a closed surface because of the custom initialization you needed to do with the labelmap. Just click OK and edit away :slight_smile: If you want to avoid the message, then after binary labelmap conversion (with oversampling), click Make master for the labelmap.

2 Likes