X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FimageUndoRedo%2Fimage3DDequeUR.h;h=ddebb564e07a0f7a0ba5502f1be6ce22f8d6de6d;hb=05c4abbebf824bbbbaaab135acf6c888662dff69;hp=63aaad24975bd6beed6f93cbc165bfc78b6f5a27;hpb=b37bd791f88bd4c1a6146fadcb88864d7cd1a5c3;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/image3DDequeUR.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/image3DDequeUR.h index 63aaad2..ddebb56 100755 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/image3DDequeUR.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/image3DDequeUR.h @@ -1,8 +1,34 @@ -/* - * image3DDequeUR.h - * - * Created on: Sep 26, 2011 - * Author: caceres +/*# --------------------------------------------------------------------- +# +# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image +# pour la Sant�) +# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# Previous Authors : Laurent Guigues, Jean-Pierre Roux +# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil +# +# This software is governed by the CeCILL-B license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and/ or redistribute the software under the terms of the CeCILL-B +# license as circulated by CEA, CNRS and INRIA at the following URL +# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +# or in the file LICENSE.txt. +# +# As a counterpart to the access to the source code and rights to copy, +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights, and the successive licensors have only limited +# liability. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL-B license and that you accept its terms. +# ------------------------------------------------------------------------ */ + +/*! + * @file image3DDequeUR.h + * @brief This file contains the Image3DDequeUR class. + * @author Info-Dev + * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr) + * @date 2011-11-15 */ #ifndef IMAGE3DDEQUEUR_H_ @@ -11,29 +37,94 @@ #include "imageDequeUR.h" #include +/*! @class Image3DDequeUR image3DDequeUR.h "image3DDequeUR.cxx" + * @brief This class contains the management of the undo/redo deque - Concrete Class + * @details This class derives from ImageDequeUR. + */ class Image3DDequeUR: public ImageDequeUR { -private: - ImageInfoDeque m_ImgUndoDeque; - ImageInfoDeque m_ImgRedoDeque; - int m_CurrentUndoPos; - int m_CurrentRedoPos; - StringType m_GlobalPath; - StringType m_IDImages; public: + //typedef definition + // ---------------------------------------------------------------------------------- + /*! @typedef std::deque ImageInfoDeque; + * @brief Defines the deque of ImageInfoUR for the undo/redo. + */ + typedef std::deque ImageInfoDeque; + // ---------------------------------------------------------------------------------- +public: + // ---------------------------------------------------------------------------------- + /*! @fn Image3DDequeUR(); + * @brief This is the default constructor. + */ Image3DDequeUR(); + // ---------------------------------------------------------------------------------- + /*! @fn virtual ~Image3DDequeUR(); + * @brief This is the destructor. + */ virtual ~Image3DDequeUR(); - void SetGlobalPath(const StringType& globalPath); - StringType GetGlobalPath(); - StringType GetImageName(const int & pos, const bool& undo); - virtual void AddImageToUndoContainer(VTKImageDataPointerType img, - const RegionS& region); - virtual void AddImageToRedoContainer(VTKImageDataPointerType img, - const RegionS& region); - virtual void CleanUndoContainerFromIndex(const int& index); - virtual void CleanRedoContainerFromIndex(const int& index); - virtual void CleanContainers(); + // ---------------------------------------------------------------------------------- + /*! @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; //!