]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/IO/MementoState.h
Merge branch 'master' of ssh://git.creatis.insa-lyon.fr/cpPlugins
[cpPlugins.git] / lib / cpExtensions / IO / MementoState.h
1 #ifndef __CPEXTENSIONS__IO__MEMENTOSTATE__H__
2 #define __CPEXTENSIONS__IO__MEMENTOSTATE__H__
3
4 #include <cpExtensions/cpExtensions_Export.h>
5
6
7 #include <vector>
8
9
10 // vtk stuff
11 #include <vtkSmartPointer.h>
12 #include <cpExtensions/Visualization/MPRObjects.h>
13
14 // Plugins interface
15 #include <cpPlugins/Interface/Interface.h>
16 #include <cpPlugins/Interface/ProcessObject.h>
17 #include <cpPlugins/Interface/Image.h>
18 #include <cpPlugins/Interface/ImplicitFunction.h>
19 #include <cpPlugins/Interface/Mesh.h>
20
21 #include <vtkMetaImageReader.h>
22
23 // -------------------------------------------------------------------------
24
25
26
27 namespace cpExtensions
28 {
29   namespace IO
30   {
31     //==========================================================================
32 // Plugins types
33 //typedef cpPlugins::Interface::Interface        TPluginsInterface;
34 //typedef cpPlugins::Interface::Object           TPluginObject;
35 //typedef cpPlugins::Interface::DataObject       TPluginData;
36 //typedef cpPlugins::Interface::Image            TPluginImage;
37 //typedef cpPlugins::Interface::ImplicitFunction TPluginImplicitFunction;
38 //typedef cpPlugins::Interface::Mesh             TPluginMesh;
39 //typedef cpPlugins::Interface::ProcessObject    TPluginFilter;
40 //typedef cpPlugins::Interface::Parameters       TParameters;
41 //
42 //typedef cpExtensions::Visualization::MPRObjects TMPRObjects;
43
44     class cpExtensions_EXPORT MementoState
45     {
46     private:
47       long m_Id;
48
49     public:
50
51       MementoState();
52 //      MementoState(long id, cpPlugins::Interface::Image * _img);
53
54       bool SetToMemento(cpPlugins::Interface::Image* _img);
55 //      bool SetToMemento(itk::ProcessObject po);
56
57 //      vtkSmartPointer<vtkMetaImageReader> getMemento(long id);
58     private:
59       void save(const std::string& filename, const std::string& filenameRaw, cpPlugins::Interface::Image* img);
60       vtkSmartPointer<vtkMetaImageReader> load(const std::string& filename);
61
62     };
63   }
64 }
65 //==========================================================================
66
67 // -------------------------------------------------------------------------
68 /**
69  */
70
71
72
73
74
75 #endif // __CPEXTENSIONS__IO__MEMENTOSTATE__H__
76
77 // eof - $RCSfile$