X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FimageUndoRedo%2FimageInfoUR.h;h=aa8000325af703aaec71877e013990a49a054ed9;hb=06b778a59d0c5109cf7626c76d2ee21e033f8c28;hp=9a41c82a0f0a9011d4517bfca64a9578b993e197;hpb=2725f81fc97c9faa92749159bdbaf9cedeef7af4;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.h index 9a41c82..aa80003 100755 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.h @@ -1,8 +1,34 @@ -/* - * ImageInfo.h - * - * Created on: Sep 22, 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 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 +36,7 @@ #include #include +#include #include #include #include @@ -17,46 +44,149 @@ #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 VTKImageDataPointerType; + * @brief Defines the pointer of vtkImageDate type. + */ typedef vtkSmartPointer VTKImageDataPointerType; + // ---------------------------------------------------------------------------------- + /*! @typedef vtkSmartPointer VTKMetaImageReaderPointerType; + * @brief Defines the pointer of vtkMetaImageReader type. + */ typedef vtkSmartPointer VTKMetaImageReaderPointerType; + // ---------------------------------------------------------------------------------- + /*! @typedef vtkSmartPointer VTKMetaImageWriterPointerType; + * @brief Defines the pointer of vtkMetaImageWriter type. + */ typedef vtkSmartPointer 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; //!