]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageUndoRedo.cxx
DFCH: ManualPaint + imageUndoRedo: Undo/Redo functionality its now working =) =)
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / imageUndoRedo / imageUndoRedo.cxx
index 7cc28e581fffdbc62336b41e51f9e950192b1ec5..7672f4efe942636d4d60b7d65a5c459b32ed7926 100755 (executable)
@@ -1,19 +1,23 @@
-/*
- * imageUndoRedo.cxx
- *
- *  Created on: Sep 26, 2011
- *      Author: caceres
+/*!
+ * @file       imageUndoRedo.cxx
+ * @brief      This file contains the implementation of the ImageUndoRedo class.
+ * @author     Info-Dev
+ * @author     Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
+ * @date       2011-11-15
  */
 
 #include "imageUndoRedo.h"
 
+// ----------------------------------------------------------------------------------
 ImageUndoRedo::ImageUndoRedo() {
        this->m_ImagesDeque = new IDequeType();
 }
+// ----------------------------------------------------------------------------------
 //virtual
 ImageUndoRedo::~ImageUndoRedo() {
 
 }
+// ----------------------------------------------------------------------------------
 //virtual
 void ImageUndoRedo::Undo() {
        ImageInfoUR* imageInfo = this->m_ImagesDeque->Undo();
@@ -22,6 +26,7 @@ void ImageUndoRedo::Undo() {
                this->UpdateUndoImage();
        }
 }
+// ----------------------------------------------------------------------------------
 //virtual
 void ImageUndoRedo::Redo() {
        ImageInfoUR* imageInfo = this->m_ImagesDeque->Redo();
@@ -30,11 +35,13 @@ void ImageUndoRedo::Redo() {
                this->UpdateUndoImage();
        }
 }
+// ----------------------------------------------------------------------------------
 void ImageUndoRedo::SetImage(VTKImageDataPointerType image) {
        this->m_CurrentImage = image;
        this->m_CurrentImage->Update();
        this->UpdateUndoImage();
 }
+// ----------------------------------------------------------------------------------
 //virtual
 void ImageUndoRedo::SetURImages(ImageMManagerType* imMManager) {
        ImageMManagerType* newImageManager = new ImageMManagerType(imMManager);
@@ -51,14 +58,14 @@ void ImageUndoRedo::SetURImages(ImageMManagerType* imMManager) {
                std::cerr << "INVALID REGION" << std::endl;
        }
 }
-
+// ----------------------------------------------------------------------------------
 void ImageUndoRedo::UpdateUndoImage() {
        this->m_CurrentImage->Update();
        this->m_UndoImage = VTKImageDataPointerType::New();
        this->m_UndoImage->DeepCopy(m_CurrentImage);
        this->m_UndoImage->Update();
 }
-
+// ----------------------------------------------------------------------------------
 ImageUndoRedo::VTKImageDataPointerType ImageUndoRedo::GetImageRegion(
                const RegionSType& region, VTKImageDataPointerType img) {
        VTKExtractVOIPointerType extract = VTKExtractVOIPointerType::New();
@@ -70,10 +77,11 @@ ImageUndoRedo::VTKImageDataPointerType ImageUndoRedo::GetImageRegion(
        imgResult->Update();
        return (imgResult);
 }
-
+// ----------------------------------------------------------------------------------
 void ImageUndoRedo::SetCurrentImage(VTKImageDataPointerType img) {
        this->m_CurrentImage = img;
 }
+// ----------------------------------------------------------------------------------
 //virtual
 void ImageUndoRedo::DrawUR(ImageInfoUR* imageInfo, const bool& undo) {
        VTKImageDataPointerType img;
@@ -98,4 +106,4 @@ void ImageUndoRedo::DrawUR(ImageInfoUR* imageInfo, const bool& undo) {
        }
        this->m_ImagesDeque->ManageMemory();
 }
-
+// ----------------------------------------------------------------------------------