FILE(GLOB ${LIBRARY_NAME}_HEADERS_MANUAL_PAINT "src/interface/wxWindows/widgets/manualPaint/*.h")
FILE(GLOB ${LIBRARY_NAME}_SOURCES_MANUAL_PAINT src/interface/wxWindows/widgets/manualPaint/*.cpp )
+ FILE(GLOB ${LIBRARY_NAME}_SOURCES_MANUAL_PAINT src/interface/wxWindows/widgets/manualPaint/*.cxx )
FILE(GLOB ${LIBRARY_NAME}_HEADERS_KERNEL "src/kernel/*.h")
FILE(GLOB ${LIBRARY_NAME}_SOURCES_KERNEL src/kernel/*.cxx src/kernel/*.cpp src/kernel/*.cc)
--- /dev/null
+#include "image3DDequeUR.h"
+
+Image3DDequeUR::Image3DDequeUR() {
+ this->m_currentPos = 0;
+}
+//virtual
+Image3DDequeUR::~Image3DDequeUR() {
+
+}
+//virtual
+void Image3DDequeUR::addImageToContainer(ImageType* img,
+ const RegionS& region) {
+}
+//virtual
+void Image3DDequeUR::loadImageToPMemory() {
+}
+//virtual
+void Image3DDequeUR::removeImageFromPMemory() {
+
+}
+ImageType* Image3DDequeUR::undo() {
+ return NULL;
+}
+ImageType* Image3DDequeUR::redo() {
+ return NULL;
+}
+void Image3DDequeUR::removeFirstImageFromContainer() {
+ this->m_ImgDeque.pop_front();
+}
+void Image3DDequeUR::removeLastImageFromContainer() {
+ this->m_ImgDeque.pop_back();
+}
+void Image3DDequeUR::cleanContainer() {
+ this->m_ImgDeque.clear();
+}
+void Image3DDequeUR::cleanContainerFromIndex(const unsigned int& index) {
+ for (int i = this->m_ImgDeque.size(); i >= index; i--) {
+ this->m_ImgDeque.pop_back();
+ }
+}
--- /dev/null
+/*
+ * image3DDequeUR.h
+ *
+ * Created on: Sep 26, 2011
+ * Author: caceres
+ */
+
+#ifndef IMAGE3DDEQUEUR_H_
+#define IMAGE3DDEQUEUR_H_
+
+#include "imageDequeUR.h"
+
+class Image3DDequeUR : public ImageDequeUR
+{
+private:
+ ImageInfoDeque m_ImgDeque;
+ unsigned int m_currentPos;
+public:
+ Image3DDequeUR();
+ virtual ~ImageDequeUR();
+ virtual void addImageToContainer(ImageType* img, const RegionS& region);
+ virtual void loadImageToPMemory();
+ virtual void removeImageFromPMemory();
+ virtual ImageType* undo();
+ virtual ImageType* redo();
+ void removeFirstImageFromContainer();
+ void removeLastImageFromContainer();
+ void cleanContainer();
+private:
+ void cleanContainerFromIndex(const unsigned int& index);
+};
+
+
+#endif /* IMAGE3DDEQUEUR_H_ */
--- /dev/null
+/*
+#include "imageDequeUR.h"
+
+ImageDequeUR::ImageDequeUR() {
+ this->m_currentPos = 0;
+}
+//virtual
+ImageDequeUR::~ImageDequeUR() {
+
+}
+//virtual
+void ImageDequeUR::addImageToContainer(ImageType* img, const RegionS& region) {
+}
+//virtual
+void ImageDequeUR::loadImageToPMemory() {
+}
+//virtual
+void ImageDequeUR::removeImageFromPMemory() {
+
+}
+ImageType* ImageDequeUR::undo() {
+ return NULL;
+}
+ImageType* ImageDequeUR::redo() {
+ return NULL;
+}
+void ImageDequeUR::removeFirstImageFromContainer() {
+ this->m_ImgDeque.pop_front();
+}
+void ImageDequeUR::removeLastImageFromContainer() {
+ this->m_ImgDeque.pop_back();
+}
+void ImageDequeUR::cleanContainer() {
+ this->m_ImgDeque.clear();
+}
+void ImageDequeUR::cleanContainerFromIndex(const unsigned int& index) {
+ for (int i = this->m_ImgDeque.size(); i >= index; i--) {
+ this->m_ImgDeque.pop_back();
+ }
+}
+*/
--- /dev/null
+/*
+ * ImageDeque.h
+ *
+ * Created on: Sep 22, 2011
+ * Author: caceres
+ */
+
+#ifndef IMAGEDEQUE_H_
+#define IMAGEDEQUE_H_
+
+#include <iostream>
+#include <string>
+#include <deque>
+#include <vtkImageData.h>
+#include "imageInfoUR.h"
+#include "regionStructUR.h"
+
+typedef std::deque<ImageInfoUR> ImageInfoDeque;
+typedef vtkImageData ImageType;
+typedef RegionStructUR RegionS;
+
+class ImageDequeUR {
+public:
+ ImageDequeUR();
+ virtual ~ImageDequeUR();
+ virtual void addImageToContainer(ImageType* img, const RegionS& region);
+ virtual void loadImageToPMemory();
+ virtual void removeImageFromPMemory();
+ virtual ImageType* undo();
+ virtual ImageType* redo();
+private:
+ void cleanContainerFromIndex(const unsigned int& index);
+};
+
+#endif /* IMAGEDEQUE_H_ */
--- /dev/null
+/*
+ * ImageInfo.cxx
+ *
+ * Created on: Sep 22, 2011
+ * Author: caceres
+ */
+#include "imageInfoUR.h"
+
+ImageInfoUR::ImageInfoUR()
+{
+ this->m_Image = NULL;
+}
+
+ImageInfoUR::~ImageInfoUR()
+{
+ this->deleteImage();
+}
+
+void ImageInfoUR::setImageName(const std::string &imgName)
+{
+ this->m_ImageName = imgName;
+}
+void ImageInfoUR::setRegion(const RegionStructUR ®ion)
+{
+ this->m_Region = region;
+}
+void ImageInfoUR::setStatus(bool onDisk)
+{
+ this->m_OnDisk = onDisk;
+}
+void ImageInfoUR::setImage(vtkImageData* img)
+{
+ this->m_Image = img;
+}
+std::string ImageInfoUR::getImageName()
+{
+ return( this->m_ImageName );
+}
+RegionStructUR ImageInfoUR::getRegion()
+{
+ return( this->m_Region );
+}
+bool ImageInfoUR::getStatus()
+{
+ return( this->m_OnDisk );
+}
+void ImageInfoUR::deleteImage()
+{
+ this->m_Image->Delete();
+}
--- /dev/null
+/*
+ * ImageInfo.h
+ *
+ * Created on: Sep 22, 2011
+ * Author: caceres
+ */
+
+#ifndef IMAGEINFO_H_
+#define IMAGEINFO_H_
+
+#include <iostream>
+#include <string>
+#include <vtkImageData.h>
+#include "regionStructUR.h"
+
+class ImageInfoUR{
+private:
+ vtkImageData* m_Image;
+ std::string m_ImageName;
+ RegionStructUR m_Region;
+ bool m_OnDisk;
+public:
+ ImageInfoUR();
+ virtual ~ImageInfoUR();
+ void setImageName( const std::string &imgName );
+ void setRegion( const RegionStructUR ®ion );
+ void setStatus( bool onDisk );
+ void setImage( vtkImageData* img );
+ std::string getImageName( );
+ RegionStructUR getRegion( );
+ bool getStatus( );
+ void deleteImage();
+};
+
+
+#endif /* IMAGEINFO_H_ */
--- /dev/null
+/*
+ * imageUndoRedo.cxx
+ *
+ * Created on: Sep 26, 2011
+ * Author: caceres
+ */
+
+
+#include "imageUndoRedo.h"
+
+ImageUndoRedo::ImageUndoRedo(ImageType* current) {
+
+ this->m_CurrentImage = current;
+ this->m_CurrentImage->Update();
+ this->m_OriginalImage = ImageType::New();
+ this->m_OriginalImage->ShallowCopy(m_CurrentImage);
+}
+//virtual
+ImageUndoRedo::~ImageUndoRedo() {
+
+}
+//virtual
+void ImageUndoRedo::undo() {
+
+}
+//virtual
+void ImageUndoRedo::redo() {
+
+}
+//virtual
+void ImageUndoRedo::setUndoImage(const RegionSType& region) {
+
+}
+//virtual
+void ImageUndoRedo::setRedoImage( ) {
+
+}
+void ImageUndoRedo::setOriginalImage(ImageType* img) {
+ this->m_OriginalImage = img;
+}
+void ImageUndoRedo::setCurrentImage(ImageType* img) {
+ this->m_CurrentImage = img;
+}
+//virtual
+void ImageUndoRedo::drawUR(ImageType* urImage, const RegionSType& region){
+
+}
+
--- /dev/null
+/*
+ * imageUndoRedo.h
+ *
+ * Created on: Sep 26, 2011
+ * Author: caceres
+ */
+
+#ifndef IMAGEUNDOREDO_H_
+#define IMAGEUNDOREDO_H_
+
+#include "managerUR.h"
+
+class ImageUndoRedo: public ManagerUR {
+
+private:
+
+ IDequeType* m_ImagesDeque;
+ ImageType* m_OriginalImage;
+ ImageType* m_CurrentImage;
+
+public:
+ ImageUndoRedo(ImageType* current);
+ virtual ~ImageUndoRedo();
+ virtual void undo();
+ virtual void redo();
+ virtual void setUndoImage(const RegionSType& region);
+ virtual void setRedoImage();
+ void setOriginalImage(ImageType* img);
+ void setCurrentImage(ImageType* img);
+private:
+ virtual void drawUR(ImageType* urImage, const RegionSType& region);
+
+};
+
+#endif /* IMAGEUNDOREDO_H_ */
--- /dev/null
+/*
+ * managerUR.cxx
+ *
+ * Created on: Sep 26, 2011
+ * Author: caceres
+ */
+
+/*#include "managerUR.h"
+
+ManagerUR::ManagerUR(ImageType* current) {
+
+ this->m_CurrentImage = current;
+ this->m_CurrentImage->Update();
+ this->m_OriginalImage = ImageType::New();
+ this->m_OriginalImage->ShallowCopy(m_CurrentImage);
+}
+//virtual
+ManagerUR::~ManagerUR() {
+
+}
+//virtual
+void ManagerUR::undo() {
+
+}
+//virtual
+void ManagerUR::redo() {
+
+}
+//virtual
+void ManagerUR::setUndoImage(const RegionSType& region) {
+
+}
+//virtual
+void ManagerUR::setRedoImage( ) {
+
+}
+void ManagerUR::setOriginalImage(ImageType* img) {
+ this->m_OriginalImage = img;
+}
+void ManagerUR::setCurrentImage(ImageType* img) {
+ this->m_CurrentImage = img;
+}
+//virtual
+void ManagerUR::drawUR(ImageType* urImage, const RegionSType& region){
+
+}*/
--- /dev/null
+/*
+ * managerUR.h
+ *
+ * Created on: Sep 26, 2011
+ * Author: caceres
+ */
+
+#ifndef MANAGERUR_H_
+#define MANAGERUR_H_
+
+#include <iostream>
+#include <string>
+#include <vtkImageData.h>
+
+#include "imageDequeUR.h"
+
+typedef ImageDequeUR IDequeType;
+typedef RegionStructUR RegionSType;
+typedef vtkImageData ImageType;
+
+class ManagerUR {
+public:
+ ManagerUR();
+ virtual ~ManagerUR();
+ virtual void undo();
+ virtual void redo();
+ virtual void setUndoImage( const RegionSType& region );
+ virtual void setRedoImage( );
+private:
+ virtual void drawUR(ImageType* urImage, const RegionSType& region);
+
+};
+
+#endif /* MANAGERUR_H_ */
--- /dev/null
+/*
+ * RegionStruct.h
+ *
+ * Created on: Sep 22, 2011
+ * Author: caceres
+ */
+
+#ifndef REGIONSTRUCT_H_
+#define REGIONSTRUCT_H_
+
+#include <iostream>
+
+struct RegionStructUR{
+ int minX;
+ int maxX;
+ int minY;
+ int maxY;
+ int minZ;
+ int maxZ;
+};
+
+
+#endif /* REGIONSTRUCT_H_ */