]> Creatis software - clitk.git/blob - registration/clitkDifferenceImageFilter.h
Merge branch 'master' of /home/dsarrut/clitk3.server
[clitk.git] / registration / clitkDifferenceImageFilter.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
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
8
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.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef __clitkDifferenceImageFilter_h
19 #define __clitkDifferenceImageFilter_h
20 #include "clitkCommon.h"
21 #include "clitkImageCommon.h"
22
23 //itk include
24 #include "itkImageToImageFilter.h"
25 #include "itkImage.h"
26 #include "itkImageRegionConstIterator.h"
27 #include "itkNumericTraits.h"
28
29 namespace clitk
30 {
31   
32   template <  class InputImageType , class OutputImageType>  
33   class DifferenceImageFilter : public itk::ImageToImageFilter<InputImageType, OutputImageType>
34   
35   {
36   public:
37     typedef DifferenceImageFilter     Self;
38     typedef itk::ImageToImageFilter<InputImageType,OutputImageType>     Superclass;
39     typedef itk::SmartPointer<Self>            Pointer;
40     typedef itk::SmartPointer<const Self>      ConstPointer;
41
42    
43     /** Method for creation through the object factory. */
44     itkNewMacro(Self);  
45   
46     /** Determine the image dimension. */
47     itkStaticConstMacro(ImageDimension, unsigned int,
48                         InputImageType::ImageDimension );
49   
50     /** Inherit some types from the superclass. */
51     typedef typename OutputImageType::RegionType OutputImageRegionType;
52         
53     //Set
54     void SetValidInput(const typename InputImageType::Pointer input);
55     void SetTestInput( const typename InputImageType::Pointer input);
56   
57   protected:
58     DifferenceImageFilter();
59     ~DifferenceImageFilter() {};
60     void ThreadedGenerateData(const OutputImageRegionType& threadRegion, itk::ThreadIdType threadId);
61     
62        
63   };
64
65
66
67
68
69 } // end namespace clitk
70 #ifndef ITK_MANUAL_INSTANTIATION
71 #include "clitkDifferenceImageFilter.txx"
72 #endif
73
74 #endif // #define __clitkDifferenceImageFilter_h