#include <cpPlugins/Interface/Mesh.h>
#include <vtkMetaImageReader.h>
-
-// -------------------------------------------------------------------------
-
-
+#include <vtkCommand.h>
namespace cpExtensions
{
namespace IO
{
- //==========================================================================
-// Plugins types
-//typedef cpPlugins::Interface::Interface TPluginsInterface;
-//typedef cpPlugins::Interface::Object TPluginObject;
-//typedef cpPlugins::Interface::DataObject TPluginData;
-//typedef cpPlugins::Interface::Image TPluginImage;
-//typedef cpPlugins::Interface::ImplicitFunction TPluginImplicitFunction;
-//typedef cpPlugins::Interface::Mesh TPluginMesh;
-//typedef cpPlugins::Interface::ProcessObject TPluginFilter;
-//typedef cpPlugins::Interface::Parameters TParameters;
-//
-//typedef cpExtensions::Visualization::MPRObjects TMPRObjects;
-
class cpExtensions_EXPORT MementoState
{
private:
long m_Id;
-
+ long m_maxId;
+ std::vector<bool> m_stateReady;
+ std::vector<bool>::iterator m_stateIt;
public:
MementoState();
-// MementoState(long id, cpPlugins::Interface::Image * _img);
-
bool SetToMemento(cpPlugins::Interface::Image* _img);
-// bool SetToMemento(itk::ProcessObject po);
-
-// vtkSmartPointer<vtkMetaImageReader> getMemento(long id);
+ vtkSmartPointer<vtkImageData> MementoUndo();
+ vtkSmartPointer<vtkImageData> MementoRedo();
+ vtkSmartPointer<vtkImageData> GetFromMemento(long id);
private:
- void save(const std::string& filename, const std::string& filenameRaw, cpPlugins::Interface::Image* img);
- vtkSmartPointer<vtkMetaImageReader> load(const std::string& filename);
+ void Save(const std::string& filename, const std::string& filenameRaw, cpPlugins::Interface::Image* img);
+ vtkSmartPointer<vtkImageData> Load(const std::string& filename);
};
}