No module named 'SegmentEditorMaskVolumeLib'

Until recently, my extension SegmentGeometry imported the SegmentEditorMaskVolumeLib from the SegmentEditor with no problem. However, I recently updated Slicer on my computer along with the extensions and now it no longer works. When I try to execute the SegmentGeometry module, I get an error that says ‘No module named ‘SegmentEditorMaskVolumeLib’’. Was this module deprecated recently? Any help would be appreciated.

Thanks

Is your SegmentGeometry extension still expecting that the MaskVolume effect is in the experimental set of effects of the SegmentEditorExtraEffects extension? As of January 30th, 2021 the MaskVolume effect was moved into Slicer core code after it was determined to be mature enough. That specific import you mentioned is a type of import for the SegmentEditorExtraEffects extension which is outdated since MaskVolume is in Slicer core.

Ah yes, looks like it had to do with that but the problem didn’t become apparent until Slicer 5.0.2. Anyhow, I managed to make the quick fix by importing “SegmentEditorEffects” instead of “SegmentEditorMaskVolumeLib”. Thanks for your help!

The SegmentEditorExtraEffects extension still included MaskVolume up until recently in Remove Slicer4 support · lassoan/SlicerSegmentEditorExtraEffects@afb7e22 · GitHub for backwards compatibility of older versions that did not have it in Slicer core. This is why it had still worked for you.

1 Like