Code Monkey home page Code Monkey logo

Comments (7)

pieper avatar pieper commented on September 24, 2024

It may make the most sense to rework this entirely as a Segmentation Editor effect.

from pettumorsegmentation.

chribaue avatar chribaue commented on September 24, 2024

It may make the most sense to rework this entirely as a Segmentation Editor effect.

The good news: We have already reworked the tool entirely as a Segment Editor effect and it can already be use e.g. in the Quantiative Reporting module.

The bad news: This doesn't fix the issue when using the "classic" Editor Effect in the LongitudinalPETCT module.

Since the effect tool is passed in the Editor's instance of the UndoRedo class it should be possible to implement the save and restore state functionality without accessing the widget.

The Editor Lib's UndoRedo class has a stateChangedCallback which is used by the EditBox. But the class doesn't allow me registering additional callbacks. So I don't see any good way to monitor when an undo or redo occurs. If you have suggestions, please me know.

from pettumorsegmentation.

pieper avatar pieper commented on September 24, 2024

We could rework the undo/redo mechanism of the EditorLib code, but is it still needed? Are we ready to switch completely to the SegmentEditor?

from pettumorsegmentation.

chribaue avatar chribaue commented on September 24, 2024

I think most people from now on will use the SegmentEditor based Effect and the new Segmentation framework in general, instead of the older Labelmap based Editor. I just don't want to remove the old EditorLib EditorEffect yet, since it's also in use in our PET IndiC module (with working undo/redo), but we're transitioning to using QuantitativeReporting.

Ideally, the Longitudinal Analysis would switch to using the new SegmentEditor framework. But that would require considerably more work than reworking the EditorLib's undo/redo mechanism to allow registering additional callbacks.

from pettumorsegmentation.

fedorov avatar fedorov commented on September 24, 2024

@chribaue what is missing in SegmentEditor that is preventing you from implementing "working undo/redo"?

from pettumorsegmentation.

chribaue avatar chribaue commented on September 24, 2024

@fedorov As mentioned above, the SegmentEditorEffect has working undo/redo and the EditorEffect has undo/redo that works properly when used in the Editor-Module and in the PET-IndiC module.
But, the EditorEffect's undo/redo does not work properly when used in the LongitudinalPETCT module. The reason is because the Editor's undo/redo functionality in Slicer was not designed in a way that allows developers to extend the undo/redo functionality. Fixing this issue would require changes to Slicer's EditorLib, which is going to be replaced by the newer SegmentEditor.

from pettumorsegmentation.

chribaue avatar chribaue commented on September 24, 2024

issue fixed in 82b33b5

from pettumorsegmentation.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.