Threshold bug in slicer preview release

Hello,

The threshold preview and apply operations do not work after following the steps below:

  1. Open the DICOM module, import, and load a DICOM directory.
  2. Go to the Segment Editor and add a segment.
  3. Open the threshold effect (do not apply the threshold yet) and press Ctrl + S to save the scene as an MRB file.
  4. Close and reopen Slicer.
  5. Load the saved MRB file.
  6. Go to the Segment Editor. You should see the threshold effect open, but no preview is visible in 2D.
  7. Nonetheless, try applying the threshold. However, the threshold does not apply.

Can anyone confirm if this is a bug and suggest how to resolve it?

Slicer version 5.7 preview.

@pieper @lassoan @cpinter @muratmaga @jcfr Any idea?

Please share a log file where you reproduce this.

I can reproduce this, you don;t need dicom. It definitely reproduces with sample MRHead data as you described.

I suspect this has something to do with saving an empty segmentation object. Because I delete the segmentaiton, and recreate it, threshold tool starts working again.

I think it does qualify as a bug. And I am not seeing any errors in the log file.

This is probably the issue, because a transient ‘preview’ of the threshold is not intended to be saved and restored. It’s sort of like a popup menu that you wouldn’t expect to be back when you reload the scene.

This probably is a problem, in that the state of the scene becomes inconsistent. I guess that save operations should trigger an even that the segment editor (and other modules) can respond to and put the scene into a consistent state.

Should we open an issue or do you consider this a corner care?

Yes, I think it’s a corner case, but it should be tracked anyway so thanks if you can file an issue. @lassoan showed us an in-progress fix that he thinks would address this.

1 Like

OK create a brief report to track this:

The issue is fixed now. It is available in Slicer Preview Releases that you download tomorrow or later.

1 Like