]> Creatis software - clitk.git/blob - registration/clitkDifferenceImageFilter.h
Debug RTStruct conversion with empty struc
[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 "clitkImageCommon.h"
21
22 //itk include
23 #include "itkImageToImageFilter.h"
24 #include "itkImage.h"
25 #include "itkImageRegionConstIterator.h"
26 #include "itkNumericTraits.h"
27
28 namespace clitk
29 {
30   
31   template <  class InputImageType , class OutputImageType>  
32   class DifferenceImageFilter : public itk::ImageToImageFilter<InputImageType, OutputImageType>
33   
34   {
35   public:
36     typedef DifferenceImageFilter     Self;
37     typedef itk::ImageToImageFilter<InputImageType,OutputImageType>     Superclass;
38     typedef itk::SmartPointer<Self>            Pointer;
39     typedef itk::SmartPointer<const Self>      ConstPointer;
40
41    
42     /** Method for creation through the object factory. */
43     itkNewMacro(Self);  
44   
45     /** Determine the image dimension. */
46     itkStaticConstMacro(ImageDimension, unsigned int,
47                         InputImageType::ImageDimension );
48   
49     /** Inherit some types from the superclass. */
50     typedef typename OutputImageType::RegionType OutputImageRegionType;
51         
52     //Set
53     void SetValidInput(const typename InputImageType::Pointer input);
54     void SetTestInput( const typename InputImageType::Pointer input);
55   
56   protected:
57     DifferenceImageFilter();
58     ~DifferenceImageFilter() {};
59     void ThreadedGenerateData(const OutputImageRegionType& threadRegion, int threadId);
60     
61        
62   };
63
64
65
66
67
68 } // end namespace clitk
69 #ifndef ITK_MANUAL_INSTANTIATION
70 #include "clitkDifferenceImageFilter.txx"
71 #endif
72
73 #endif // #define __clitkDifferenceImageFilter_h