1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef CLITKIMAGEARITHMGENERICFILTER_H
19 #define CLITKIMAGEARITHMGENERICFILTER_H
21 -------------------------------------------------------------------
22 * @file clitkImageArithmGenericFilter.h
23 * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
24 * @date 23 Feb 2008 08:37:53
27 -------------------------------------------------------------------*/
30 #include "clitkCommon.h"
31 #include "clitkImageToImageGenericFilter.h"
35 #include "itkImageIOBase.h"
36 #include "itkImageRegionIterator.h"
37 #include "itkImageRegionConstIterator.h"
39 //--------------------------------------------------------------------
42 template<class args_info_type>
43 class ITK_EXPORT ImageArithmGenericFilter:
44 public clitk::ImageToImageGenericFilter<ImageArithmGenericFilter<args_info_type> > {
49 ImageArithmGenericFilter ();
52 typedef ImageArithmGenericFilter Self;
53 typedef ImageToImageGenericFilterBase Superclass;
54 typedef itk::SmartPointer<Self> Pointer;
55 typedef itk::SmartPointer<const Self> ConstPointer;
60 //--------------------------------------------------------------------
61 void SetArgsInfo(const args_info_type & a);
64 void SetDefaultPixelValue (double value) { mDefaultPixelValue = value ;}
65 void SetTypeOfOperation (int value) { mTypeOfOperation = value ;}
66 void SetScalar (double value) { mScalar = value ;}
67 void EnableOverwriteInputImage(bool b);
70 double GetDefaultPixelValue () { return mDefaultPixelValue ;}
71 int GetTypeOfOperation () { return mTypeOfOperation ;}
72 double GetScalar () { return mScalar ;}
74 //--------------------------------------------------------------------
75 // Main function called each time the filter is updated
76 template<class InputImageType>
77 void UpdateWithInputImageType();
80 template<unsigned int Dim> void InitializeImageType();
81 bool mIsOperationUseASecondImage;
83 double mDefaultPixelValue;
85 args_info_type mArgsInfo;
86 bool mOverwriteInputImage;
89 template<class Iter1, class Iter2>
90 void ComputeImage(Iter1 it, Iter2 ito);
92 template<class Iter1, class Iter2, class Iter3>
93 void ComputeImage(Iter1 it1, Iter2 it2, Iter3 ito);
95 //--------------------------------------------------------------------
97 }; // end class ImageArithmGenericFilter
99 //--------------------------------------------------------------------
101 #ifndef ITK_MANUAL_INSTANTIATION
102 #include "clitkImageArithmGenericFilter.txx"
105 #endif //#define CLITKIMAGEARITHMGENERICFILTER_H