- void SetGlobalPath(const std::string& globalPath);
- std::string GetGlobalPath();
- std::string GetImageName();
- virtual void AddImageToUndoContainer(ImageType* img, const RegionS& region);
- virtual void AddImageToRedoContainer(ImageType* img, const RegionS& region);
- virtual void CleanUndoContainerFromIndex(const unsigned int& index);
- virtual void CleanRedoContainerFromIndex(const unsigned int& index);
- virtual void CleanContainers();
- virtual ImageInfoUR Undo();
- virtual ImageInfoUR Redo();
+ // ----------------------------------------------------------------------------------
+ /*! @fn virtual void AddImagesToURContainer(VTKImageDataPointerType imgUndo,
+ VTKImageDataPointerType imgRedo, ImageMManager* imMManager);
+ * @brief This method adds the images for undo and redo in a container
+ * @param imgUndo The undoImage cropped.
+ * @param imgRedo The redoImage cropped.
+ * @param imManager The image manager.
+ */
+ virtual void AddImagesToURContainer(VTKImageDataPointerType imgUndo,
+ VTKImageDataPointerType imgRedo, ImageMManager* imMManager);
+ // ----------------------------------------------------------------------------------
+ /*! @fn virtual void CleanURContainerFromIndex(const int& index);
+ * @brief This method allows to clean the container from a given index.
+ * @param index The index.
+ */
+ virtual void CleanURContainerFromIndex(const int& index);
+ // ----------------------------------------------------------------------------------
+ /*! @fn virtual void ManageMemory();
+ * @brief This method cleans the memory.
+ * @details This method cleans the principal memory when the images are not in use.
+ */
+ virtual void ManageMemory();
+ // ----------------------------------------------------------------------------------
+ /*! @fn virtual ImageInfoUR* Undo();
+ * @brief This method is the undo action.
+ * @return
+ */
+ virtual ImageInfoUR* Undo();
+ // ----------------------------------------------------------------------------------
+ /*! @fn virtual ImageInfoUR* Redo();
+ * @brief This method is the redo action.
+ * @return
+ */
+ virtual ImageInfoUR* Redo();
+ // ----------------------------------------------------------------------------------
+ /*! @fn void SetGlobalPath(const StringType& globalPath);
+ * @brief This method sets the global path where the temporary files will be stored.
+ * @param globalPath The String with the path.
+ */
+ void SetGlobalPath(const StringType& globalPath);
+ // ----------------------------------------------------------------------------------
+ /*! @fn StringType GetGlobalPath();
+ * @brief This method returns a String with the global path.
+ * @return
+ */
+ StringType GetGlobalPath();
+ // ----------------------------------------------------------------------------------
+ /*! @fn StringType GetImageName(const int & pos);
+ * @brief This method returns a String with an image name which won't be repeated.
+ * @param pos The position of the container to manage a sequence.
+ * @return
+ */
+ StringType GetImageName(const int & pos);
+ // ----------------------------------------------------------------------------------
+ /*! @fn void CleanHardDisk();
+ * @brief This method cleans the hard disk of the temporary files.
+ */
+ void CleanHardDisk();
+ // ----------------------------------------------------------------------------------
+protected:
+ ImageInfoDeque m_ImgURDeque; //!<This is the container of the images for undo and redo.
+ int m_CurrentURPos; //!<This is the index where is located the undo and redo state.
+ StringType m_GlobalPath; //!<This is the string with the global path.
+ StringType m_IDImages; //!<This is the string with the ID of the images (For the filenames).