Now, to the more substantial changes: incremental saving. The goal is to avoid re-packing the data objects that haven't changed to the MITK scene file.
I achieve this by storing the original time stamps for BaseData objects loaded from MITK scene and then checking if they changed upon saving. Only base data files that have not changed are left in the MITK zip file, then all the files for data node properties and modified data files are saved in the temporary folder and added to the zip file. Several things must be considered when using incremental saving. 1) BaseData subclasses must call Modified() when they are modified :) Otherwise the node will not be repacked into the scene. 2) Writers must report ALL files that are created during writing process (e.g. both mhd and raw files for images saved as mhd). I looked through all subclasses of BaseDataSerializer and all of them seem to ouput only one file, so no changes were necessary. However one must be aware when writing own serializers that might output multiple files. 3) A notion of "currently open scene" must be introduced (other MITK scenes can still be imported into a current scene) In addition, I have separated the packing into a different thread to allow resuming work ASAP. Furthermore, old scene files can be easily loaded even though the format has slighly changed (mostly to store the information about all the files used for one BaseData). Bug: http://bugs.mitk.org/show_bug.cgi?id=19226 Pull request: https://github.com/MITK/MITK/pull/112 Rostislav. ------------------------------------------------------------------------------ _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
