]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.h
DFCH: imageUndoRedo 100% =)
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / imageUndoRedo / imageInfoUR.h
index 9a41c82a0f0a9011d4517bfca64a9578b993e197..ede17abc75e359713558e8264046ca1482f9337b 100755 (executable)
@@ -1,8 +1,9 @@
-/*
- * ImageInfo.h
- *
- *  Created on: Sep 22, 2011
- *      Author: caceres
+/*!
+ * @file       imageInfoUR.h
+ * @brief      This file contains the ImageInfoUR class.
+ * @author     Info-Dev
+ * @author     Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
+ * @date       2011-11-15
  */
 
 #ifndef IMAGEINFO_H_
@@ -10,6 +11,7 @@
 
 #include <iostream>
 #include <string>
+#include <cstdio>
 #include <vtkImageData.h>
 #include <vtkMetaImageWriter.h>
 #include <vtkMetaImageReader.h>
 #include "regionStructUR.h"
 #include "imageModificationManager.h"
 
-/*
- * Tenga cuidado que siempre se va a referir a dos imagenes (UNDO/REDO) entonces de las dos imagenes es el mismo solo que
- * finalizan distinto.
+/*! @class ImageInfoUR imageInfoUR.h "imageInfoUR.cxx"
+ *     @brief This class contains the information of the undo/redo
+ *     @details This class contains the two images (undo and redo) and the ImageMManager.
  */
-
 class ImageInfoUR {
 
 public:
+       //typedef definition
+       // ----------------------------------------------------------------------------------
+       /*!     @typedef vtkSmartPointer<vtkImageData> VTKImageDataPointerType;
+        *      @brief Defines the pointer of vtkImageDate type.
+        */
        typedef vtkSmartPointer<vtkImageData> VTKImageDataPointerType;
+       // ----------------------------------------------------------------------------------
+       /*!     @typedef vtkSmartPointer<vtkMetaImageReader> VTKMetaImageReaderPointerType;
+        *      @brief Defines the pointer of vtkMetaImageReader type.
+        */
        typedef vtkSmartPointer<vtkMetaImageReader> VTKMetaImageReaderPointerType;
+       // ----------------------------------------------------------------------------------
+       /*!     @typedef vtkSmartPointer<vtkMetaImageWriter> VTKMetaImageWriterPointerType;
+        *      @brief Defines the pointer of vtkMetaImageWriter type.
+        */
        typedef vtkSmartPointer<vtkMetaImageWriter> VTKMetaImageWriterPointerType;
-       typedef ImageMManager ImageMManagerType;
+       // ----------------------------------------------------------------------------------
+       /*!     @typedef std::string StringType;
+        *      @brief Redefinition of the string type.
+        */
        typedef std::string StringType;
+       // ----------------------------------------------------------------------------------
+       /*!     @typedef ImageMManager ImageMManagerType;
+        *      @brief Definition of the ImageMManager type.
+        */
+       typedef ImageMManager ImageMManagerType;
+       // ----------------------------------------------------------------------------------
 public:
+       // ----------------------------------------------------------------------------------
+       /*! @fn ImageInfoUR();
+        * @brief This is the default constructor.
+        */
        ImageInfoUR();
+       // ----------------------------------------------------------------------------------
+       /*! @fn virtual ~ImageInfoUR();
+        * @brief This is the destructor.
+        */
        virtual ~ImageInfoUR();
+       // ----------------------------------------------------------------------------------
+       /*! @fn void SetImageName(const StringType &imgName);
+        * @brief This method sets the image name for the undo/redo.
+        * @param imgName The imageName.
+        */
        void SetImageName(const StringType &imgName);
+       // ----------------------------------------------------------------------------------
+       /*! @fn void SetImageMManager(ImageMManagerType *imMManager);
+        * @brief This method set the image modification manager.
+        * @param imMManager The pointer of the manager.
+        */
        void SetImageMManager(ImageMManagerType *imMManager);
+       // ----------------------------------------------------------------------------------
+       /*! @fn void SetStatus(const bool& onMemory);
+        * @brief This method sets the memory status of the images.
+        * @param onMemory This is true if the images are in the memory.
+        */
        void SetStatus(const bool& onMemory);
+       // ----------------------------------------------------------------------------------
+       /*! @fn void SetImages(VTKImageDataPointerType imgUndo,
+        VTKImageDataPointerType imgRedo);
+        * @brief This method sets the undo/redo Images.
+        * @param imgUndo The undo image.
+        * @param imgRedo The redo image.
+        */
        void SetImages(VTKImageDataPointerType imgUndo,
                        VTKImageDataPointerType imgRedo);
+       // ----------------------------------------------------------------------------------
+       /*! @fn void LoadImagesToMemory(const StringType& gPath);
+        * @brief This method takes the images from disk and load them to the principal memory.
+        * @param gPath The global path where the images are stored.
+        */
        void LoadImagesToMemory(const StringType& gPath);
+       // ----------------------------------------------------------------------------------
+       /*! @fn void RemoveImagesFromMemory(const StringType& gPath);
+        * @brief This method removes the images from the principal memory.
+        * @param gPath The global path where the images are stored.
+        */
        void RemoveImagesFromMemory(const StringType& gPath);
+       // ----------------------------------------------------------------------------------
+       /*! @fn void SaveImagesOnDisk(const StringType& gPath);
+        * @brief This method stores the images in the hard disk.
+        * @param  gPath The global path where the images are stored.
+        */
        void SaveImagesOnDisk(const StringType& gPath);
+       // ----------------------------------------------------------------------------------
+       /*! @fn void RemoveImagesFromDisk(const StringType& gPath);
+        * @brief This method removes the images from the hard disk (permanently)
+        * @param gPath The global path where the images are stored.
+        */
        void RemoveImagesFromDisk(const StringType& gPath);
+       // ----------------------------------------------------------------------------------
+       /*! @fn VTKImageDataPointerType GetUndoImage();
+        * @brief This method returns the undo image.
+        * @return
+        */
        VTKImageDataPointerType GetUndoImage();
+       // ----------------------------------------------------------------------------------
+       /*! @fn VTKImageDataPointerType GetRedoImage();
+        * @brief This method returns the redo image.
+        * @return
+        */
        VTKImageDataPointerType GetRedoImage();
+       // ----------------------------------------------------------------------------------
+       /*! @fn StringType GetImageName();
+        * @brief This method returns the ImagesName.
+        * @return
+        */
        StringType GetImageName();
+       // ----------------------------------------------------------------------------------
+       /*! @fn ImageMManagerType* GetImageMManager();
+        * @brief This method returns the Image Modification Manager.
+        * @return
+        */
        ImageMManagerType* GetImageMManager();
+       // ----------------------------------------------------------------------------------
+       /*! @fn void SaveImageAsMHD(const StringType& filename,
+        VTKImageDataPointerType image);
+        * @brief This method saves an image in a MHD format.
+        * @param filename The filename.
+        * @param VTKImageDataPointerType image.
+        */
        void SaveImageAsMHD(const StringType& filename,
                        VTKImageDataPointerType image);
+       // ----------------------------------------------------------------------------------
+       /*! @fn bool GetStatus();
+        * @brief This method returns true if the images are located in the principal memory.
+        * @return
+        */
        bool GetStatus();
-
+       // ----------------------------------------------------------------------------------
 private:
-       VTKImageDataPointerType m_UndoImage;
-       VTKImageDataPointerType m_RedoImage;
-       StringType m_ImageName;
-       ImageMManagerType* m_ImageMManager;
-       bool m_OnMemory;
-       bool m_OnDisk;
+       VTKImageDataPointerType m_UndoImage; //!<This is the undo image.
+       VTKImageDataPointerType m_RedoImage; //!<This is the redo image
+       StringType m_ImageName; //!<This is the base name of the images.
+       ImageMManagerType* m_ImageMManager; //!<This is the modification manager of the images.
+       bool m_OnMemory; //!<This is true if the images are in memory.
+       bool m_OnDisk; //!<This is true if the images are in disk.
 
 };