X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkAndGenericFilter.h;fp=segmentation%2FclitkAndGenericFilter.h;h=8783f6407e49ec196344e4e8695279a1680ab2f4;hb=2f5b335da5621bdfc86cb594cc667d0929f4d8e3;hp=0000000000000000000000000000000000000000;hpb=e61455caad373a138edde0716ce5a556f4d1a624;p=clitk.git diff --git a/segmentation/clitkAndGenericFilter.h b/segmentation/clitkAndGenericFilter.h new file mode 100755 index 0000000..8783f64 --- /dev/null +++ b/segmentation/clitkAndGenericFilter.h @@ -0,0 +1,117 @@ +/*========================================================================= + Program: vv http://www.creatis.insa-lyon.fr/rio/vv + + Authors belong to: + - University of LYON http://www.universite-lyon.fr/ + - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the copyright notices for more information. + + It is distributed under dual licence + + - BSD See included LICENSE.txt file + - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +======================================================================-====*/ +#ifndef clitkAndGenericFilter_h +#define clitkAndGenericFilter_h + +/* ================================================= + * @file clitkAndGenericFilter.h + * @author + * @date + * + * @brief + * + ===================================================*/ + + +// clitk include +#include "clitkIO.h" +#include "clitkCommon.h" +#include "clitkImageCommon.h" +#include "clitkAnd_ggo.h" + +//itk include +#include "itkLightObject.h" +#include "itkAndImageFilter.h" +#include "itkCastImageFilter.h" + +namespace clitk +{ + + + class ITK_EXPORT AndGenericFilter : public itk::LightObject + { + public: + //---------------------------------------- + // ITK + //---------------------------------------- + typedef AndGenericFilter Self; + typedef itk::LightObject Superclass; + typedef itk::SmartPointer Pointer; + typedef itk::SmartPointer ConstPointer; + + // Method for creation through the object factory + itkNewMacro(Self); + + // Run-time type information (and related methods) + itkTypeMacro( AndGenericFilter, LightObject ); + + + //---------------------------------------- + // Typedefs + //---------------------------------------- + + + //---------------------------------------- + // Set & Get + //---------------------------------------- + void SetArgsInfo(const args_info_clitkAnd & a) + { + m_ArgsInfo=a; + m_Verbose=m_ArgsInfo.verbose_flag; + m_InputFileName=m_ArgsInfo.input_arg; + } + + + //---------------------------------------- + // Update + //---------------------------------------- + void Update(); + + protected: + + //---------------------------------------- + // Constructor & Destructor + //---------------------------------------- + AndGenericFilter(); + ~AndGenericFilter() {}; + + + //---------------------------------------- + // Templated members + //---------------------------------------- + template void UpdateWithDim(std::string PixelType); + template void UpdateWithDimAndPixelType(); + + + //---------------------------------------- + // Data members + //---------------------------------------- + args_info_clitkAnd m_ArgsInfo; + bool m_Verbose; + std::string m_InputFileName; + + }; + + +} // end namespace clitk + +#ifndef ITK_MANUAL_INSTANTIATION +#include "clitkAndGenericFilter.txx" +#endif + +#endif // #define clitkAndGenericFilter_h