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 "clitkImageCommon.h"
28 #include "clitkImageToImageGenericFilter.h"
32 #include "itkImageIOBase.h"
33 #include "itkImageRegionIterator.h"
34 #include "itkImageRegionConstIterator.h"
38 //--------------------------------------------------------------------
39 // Main class for an Image Resample Generic Filter
40 // (multiple dimensions, multiple pixel types)
41 class ImageArithmGenericFilter:
42 public clitk::ImageToImageGenericFilter<ImageArithmGenericFilter> {
47 ImageArithmGenericFilter ();
50 typedef ImageArithmGenericFilter Self;
51 typedef ImageToImageGenericFilterBase Superclass;
52 typedef itk::SmartPointer<Self> Pointer;
53 typedef itk::SmartPointer<const Self> ConstPointer;
59 void SetDefaultPixelValue (double value) { mDefaultPixelValue = value ;}
60 void SetTypeOfOperation (int value) { mTypeOfOperation = value ;}
61 void SetScalar (double value) { mScalar = value ;}
64 double GetDefaultPixelValue () { return mDefaultPixelValue ;}
65 int GetTypeOfOperation () { return mTypeOfOperation ;}
66 double GetScalar () { return mScalar ;}
68 //--------------------------------------------------------------------
69 // Main function called each time the filter is updated
70 template<class InputImageType>
71 void UpdateWithInputImageType();
74 template<unsigned int Dim> void InitializeImageType();
75 bool mIsOperationUseASecondImage;
77 double mDefaultPixelValue;
80 template<class ImageType>
81 typename ImageType::Pointer ComputeImage(typename ImageType::Pointer inputImage);
83 template<class ImageType1, class ImageType2>
84 typename ImageType1::Pointer
85 ComputeImage(typename ImageType1::Pointer inputImage1,
86 typename ImageType2::Pointer inputImage2);
87 //--------------------------------------------------------------------
89 }; // end class ImageArithmGenericFilter
90 //--------------------------------------------------------------------
92 //#include "clitkImageArithmGenericFilter.txx"
95 //--------------------------------------------------------------------
97 #endif //#define CLITKIMAGEARITHMGENERICFILTER_H