1 /*-------------------------------------------------------------------------
3 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
4 l'Image). All rights reserved. See Doc/License.txt or
5 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
7 This software is distributed WITHOUT ANY WARRANTY; without even
8 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9 PURPOSE. See the above copyright notices for more information.
11 -------------------------------------------------------------------------*/
13 #ifndef CLITKIMAGEARITHMGENERICFILTER_H
14 #define CLITKIMAGEARITHMGENERICFILTER_H
17 -------------------------------------------------------------------
18 * @file clitkImageArithmGenericFilter.h
19 * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
20 * @date 23 Feb 2008 08:37:53
23 -------------------------------------------------------------------*/
26 #include "clitkCommon.h"
27 #include "clitkImageToImageGenericFilter.h"
31 #include "itkImageIOBase.h"
32 #include "itkImageRegionIterator.h"
33 #include "itkImageRegionConstIterator.h"
35 //--------------------------------------------------------------------
38 template<class args_info_type>
39 class ITK_EXPORT ImageArithmGenericFilter:
40 public clitk::ImageToImageGenericFilter<ImageArithmGenericFilter<args_info_type> > {
45 ImageArithmGenericFilter ();
48 typedef ImageArithmGenericFilter Self;
49 typedef ImageToImageGenericFilterBase Superclass;
50 typedef itk::SmartPointer<Self> Pointer;
51 typedef itk::SmartPointer<const Self> ConstPointer;
56 //--------------------------------------------------------------------
57 void SetArgsInfo(const args_info_type & a);
60 void SetDefaultPixelValue (double value) { mDefaultPixelValue = value ;}
61 void SetTypeOfOperation (int value) { mTypeOfOperation = value ;}
62 void SetScalar (double value) { mScalar = value ;}
63 void EnableOverwriteInputImage(bool b);
66 double GetDefaultPixelValue () { return mDefaultPixelValue ;}
67 int GetTypeOfOperation () { return mTypeOfOperation ;}
68 double GetScalar () { return mScalar ;}
70 //--------------------------------------------------------------------
71 // Main function called each time the filter is updated
72 template<class InputImageType>
73 void UpdateWithInputImageType();
76 template<unsigned int Dim> void InitializeImageType();
77 bool mIsOperationUseASecondImage;
79 double mDefaultPixelValue;
81 args_info_type mArgsInfo;
82 bool mOverwriteInputImage;
85 template<class Iter1, class Iter2>
86 void ComputeImage(Iter1 it, Iter2 ito);
88 template<class Iter1, class Iter2, class Iter3>
89 void ComputeImage(Iter1 it1, Iter2 it2, Iter3 ito);
91 //--------------------------------------------------------------------
93 }; // end class ImageArithmGenericFilter
95 //--------------------------------------------------------------------
97 #ifndef ITK_MANUAL_INSTANTIATION
98 #include "clitkImageArithmGenericFilter.txx"
101 #endif //#define CLITKIMAGEARITHMGENERICFILTER_H