1 #ifndef CLITKIMAGEARITHMGENERICFILTER_H
2 #define CLITKIMAGEARITHMGENERICFILTER_H
4 -------------------------------------------------------------------
5 * @file clitkImageArithmGenericFilter.h
6 * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
7 * @date 23 Feb 2008 08:37:53
10 -------------------------------------------------------------------*/
13 #include "clitkCommon.h"
14 #include "clitkImageToImageGenericFilter.h"
18 #include "itkImageIOBase.h"
19 #include "itkImageRegionIterator.h"
20 #include "itkImageRegionConstIterator.h"
22 //--------------------------------------------------------------------
25 template<class args_info_type>
26 class ITK_EXPORT ImageArithmGenericFilter:
27 public clitk::ImageToImageGenericFilter<ImageArithmGenericFilter<args_info_type> > {
32 ImageArithmGenericFilter ();
35 typedef ImageArithmGenericFilter Self;
36 typedef ImageToImageGenericFilterBase Superclass;
37 typedef itk::SmartPointer<Self> Pointer;
38 typedef itk::SmartPointer<const Self> ConstPointer;
43 //--------------------------------------------------------------------
44 void SetArgsInfo(const args_info_type & a);
47 void SetDefaultPixelValue (double value) { mDefaultPixelValue = value ;}
48 void SetTypeOfOperation (int value) { mTypeOfOperation = value ;}
49 void SetScalar (double value) { mScalar = value ;}
50 void EnableOverwriteInputImage(bool b);
53 double GetDefaultPixelValue () { return mDefaultPixelValue ;}
54 int GetTypeOfOperation () { return mTypeOfOperation ;}
55 double GetScalar () { return mScalar ;}
57 //--------------------------------------------------------------------
58 // Main function called each time the filter is updated
59 template<class InputImageType>
60 void UpdateWithInputImageType();
63 template<unsigned int Dim> void InitializeImageType();
64 bool mIsOperationUseASecondImage;
66 double mDefaultPixelValue;
68 args_info_type mArgsInfo;
69 bool mOverwriteInputImage;
72 template<class Iter1, class Iter2>
73 void ComputeImage(Iter1 it, Iter2 ito);
75 template<class Iter1, class Iter2, class Iter3>
76 void ComputeImage(Iter1 it1, Iter2 it2, Iter3 ito);
78 //--------------------------------------------------------------------
80 }; // end class ImageArithmGenericFilter
82 //--------------------------------------------------------------------
84 #ifndef ITK_MANUAL_INSTANTIATION
85 #include "clitkImageArithmGenericFilter.txx"
88 #endif //#define CLITKIMAGEARITHMGENERICFILTER_H