X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=common%2FclitkImageToImageGenericFilterBase.h;h=2d624baecef67ecb87d25124528c9c4f5940f09f;hb=ef9b02c88f132a17f2292e84b4167c22e1b87f8d;hp=601a752fc55f56021e2803e6dfcf8987a727ba4a;hpb=1d93f10f32528c9ef0002c051c2140f8485b39fb;p=clitk.git diff --git a/common/clitkImageToImageGenericFilterBase.h b/common/clitkImageToImageGenericFilterBase.h index 601a752..2d624ba 100644 --- a/common/clitkImageToImageGenericFilterBase.h +++ b/common/clitkImageToImageGenericFilterBase.h @@ -17,14 +17,16 @@ ======================================================================-====*/ #ifndef CLITKIMAGETOIMAGEGENERICFILTERBASE_H #define CLITKIMAGETOIMAGEGENERICFILTERBASE_H + +// clitk #include "clitkCommon.h" #include "clitkImageCommon.h" #include "clitkCommonGenericFilter.h" -// itk include +// itk #include -// vv include +// vv #include "vvImage.h" #include "vvFromITK.h" #include "vvToITK.h" @@ -48,6 +50,11 @@ namespace clitk { // Filters information const std::string & GetFilterName(); void SetFilterName(std::string & n); + + // Error management + itkSetMacro(LastError, std::string); + itkGetConstMacro(LastError, std::string); + bool HasError() { return (GetLastError() != ""); } // Generic IO /// Returns the dimension and pixel type of the *first* input @@ -83,7 +90,7 @@ namespace clitk { virtual bool Update() = 0; protected: - bool mReadOnDisk; + bool m_ReadOnDisk; /// Call this function to dispatch an output towards the correct sink template void SetNextOutput(typename ImageType::Pointer output); @@ -92,21 +99,23 @@ namespace clitk { template typename ImageType::Pointer GetInput(unsigned int n); - std::vector mInputFilenames; - std::list mOutputFilenames; + std::vector m_InputFilenames; + std::list m_OutputFilenames; - bool mIOVerbose; - unsigned int mDim; - std::string mPixelTypeName; - unsigned int mNbOfComponents; - std::string mFilterName; + bool m_IOVerbose; + unsigned int m_Dim; + std::string m_PixelTypeName; + unsigned int m_NbOfComponents; + std::string m_FilterName; - std::vector mInputVVImages; - std::vector mOutputVVImages; + std::vector m_InputVVImages; + std::vector m_OutputVVImages; void ImageTypeError(); void SetImageTypeError(); - bool mFailOnImageTypeError; + bool m_FailOnImageTypeError; + + std::string m_LastError; }; // end class clitk::ImageToImageGenericFilter