Autosave option

hi guys I’m wondering if slicer haves autosave?
its anyone that can guide me pleas or maybe use some python code for autosave

I’ve added autosave before to custom versions of Slicer and it’s not hard, just using QTimer to periodically call code to save the scene. The drawback is that scene saving can be an expensive operation and thus can interrupt the user. Also for some use cases large intermediate data is created would be wasteful to save in terms of time and disk space. So for now most people just manually save periodically when they reach a good spot in their work.

I guess people would need autosave most for segmentations and markup operations. Fast auto-save would be easy to implement on a per-node basis if we had global undo/redo working, which we do not. We do, however, have such history for segmentations. So I could imagine that after we initially save a scene (not MRB) manually, we could save the edited segmentation after each (nth) operation. The problem is that this would be a quite specific operation requiring a manual initialization step (saving the initial scene in a certain way).

@aldoSanchez What type of objects do you want autosave for? If segmentations, then you could consider implementing the above with a dozen or so lines of python code.

I want to save a label map of the files that I want to save are .mgz

There’s an AutoSave module in the Sandbox extension but I’ve never used it.

1 Like

thanks, I’m going to try it.