]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.h
DFCH: imageUndoRedo + Manual Paint: It doesn't works :s :s
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / imageUndoRedo / imageInfoUR.h
1 /*
2  * ImageInfo.h
3  *
4  *  Created on: Sep 22, 2011
5  *      Author: caceres
6  */
7
8 #ifndef IMAGEINFO_H_
9 #define IMAGEINFO_H_
10
11 #include <iostream>
12 #include <string>
13 #include <vtkImageData.h>
14 #include <vtkMetaImageWriter.h>
15 #include <vtkMetaImageReader.h>
16 #include <vtkSmartPointer.h>
17 #include "regionStructUR.h"
18 #include "imageModificationManager.h"
19
20 /*
21  * Tenga cuidado que siempre se va a referir a dos imagenes (UNDO/REDO) entonces de las dos imagenes es el mismo solo que
22  * finalizan distinto.
23  */
24
25 class ImageInfoUR {
26
27 public:
28         typedef vtkSmartPointer<vtkImageData> VTKImageDataPointerType;
29         typedef vtkSmartPointer<vtkMetaImageReader> VTKMetaImageReaderPointerType;
30         typedef vtkSmartPointer<vtkMetaImageWriter> VTKMetaImageWriterPointerType;
31         typedef ImageMManager ImageMManagerType;
32         typedef std::string StringType;
33 public:
34         ImageInfoUR();
35         virtual ~ImageInfoUR();
36         void SetImageName(const StringType &imgName);
37         void SetImageMManager(ImageMManagerType *imMManager);
38         void SetStatus(const bool& onMemory);
39         void SetImages(VTKImageDataPointerType imgUndo,
40                         VTKImageDataPointerType imgRedo);
41         void LoadImagesToMemory(const StringType& gPath);
42         void RemoveImagesFromMemory(const StringType& gPath);
43         void SaveImagesOnDisk(const StringType& gPath);
44         void RemoveImagesFromDisk(const StringType& gPath);
45         VTKImageDataPointerType GetUndoImage();
46         VTKImageDataPointerType GetRedoImage();
47         StringType GetImageName();
48         ImageMManagerType* GetImageMManager();
49         void SaveImageAsMHD(const StringType& filename,
50                         VTKImageDataPointerType image);
51         bool GetStatus();
52
53 private:
54         VTKImageDataPointerType m_UndoImage;
55         VTKImageDataPointerType m_RedoImage;
56         StringType m_ImageName;
57         ImageMManagerType* m_ImageMManager;
58         bool m_OnMemory;
59         bool m_OnDisk;
60
61 };
62
63 #endif /* IMAGEINFO_H_ */