X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkImageToImageGenericFilterBase.h;h=03b4f4acfa030d91b52e0804b521e06e6f30ed25;hb=3c2462eafabcf428b4d2775c414a7b5f62511d3f;hp=4b27950d4f406b8e5652d173b679c18ac77d636b;hpb=38786c4da19b87319bbe3cecc145e3d1771d10da;p=clitk.git diff --git a/common/clitkImageToImageGenericFilterBase.h b/common/clitkImageToImageGenericFilterBase.h index 4b27950..03b4f4a 100644 --- a/common/clitkImageToImageGenericFilterBase.h +++ b/common/clitkImageToImageGenericFilterBase.h @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,13 +14,12 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #ifndef CLITKIMAGETOIMAGEGENERICFILTERBASE_H #define CLITKIMAGETOIMAGEGENERICFILTERBASE_H // clitk -#include "clitkCommon.h" #include "clitkImageCommon.h" #include "clitkCommonGenericFilter.h" #include "clitkFilterBase.h" @@ -53,11 +52,6 @@ namespace clitk { 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 void GetInputImageDimensionAndPixelType(unsigned int& dim, std::string& pixeltype, @@ -67,8 +61,10 @@ namespace clitk { void AddInputFilename(const std::string & filename); void SetInputFilenames(const std::vector & filenames); void EnableReadOnDisk(bool b); + void EnableWriteOnDisk(bool b); + void EnableWriteCompression(bool b); void SetOutputFilename(const std::string & filename); - void AddOutputFilename(const std::string & filename); + void AddOutputFilename(const std::string filename); void SetOutputFilenames(const std::vector & filenames); std::string GetOutputFilename(); void SetIOVerbose(bool b); @@ -92,9 +88,15 @@ namespace clitk { // Get the associated filter FilterBase * GetFilterBase() { return m_FilterBase; } + + // Indicate that the filter must stop as soon as possible (if threaded) + void DeleteLastOutputImage(); protected: bool m_ReadOnDisk; + bool m_WriteOnDisk; + bool m_WriteCompression; + /// Call this function to dispatch an output towards the correct sink template void SetNextOutput(typename ImageType::Pointer output); @@ -105,7 +107,7 @@ namespace clitk { std::vector m_InputFilenames; std::list m_OutputFilenames; - + bool m_IOVerbose; unsigned int m_Dim; std::string m_PixelTypeName; @@ -119,9 +121,10 @@ namespace clitk { void SetImageTypeError(); bool m_FailOnImageTypeError; - std::string m_LastError; + // std::string m_LastError; void SetFilterBase(FilterBase * f) { m_FilterBase = f; } FilterBase * m_FilterBase; + // bool m_StopOnError; }; // end class clitk::ImageToImageGenericFilter