]> Creatis software - clitk.git/blob - registration/clitkLinearCombinationImageFilter.h
Debug RTStruct conversion with empty struc
[clitk.git] / registration / clitkLinearCombinationImageFilter.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 __itkLinearCombinationImageFilter_h
19 #define __itkLinearCombinationImageFilter_h
20 #include "itkImageToImageFilter.h"
21 #include "itkNumericTraits.h"
22
23
24 namespace clitk
25 {
26   
27
28   template <class TInputImage, class TOutputImage>
29   class ITK_EXPORT LinearCombinationImageFilter :
30     public    itk::ImageToImageFilter<TInputImage, TOutputImage >
31   {
32   public:
33     //-----------------------------------
34     /** Standard class typedefs. */
35     //-----------------------------------
36     typedef LinearCombinationImageFilter                      Self;
37     typedef itk::ImageToImageFilter<TInputImage,TOutputImage> Superclass;
38     typedef itk::SmartPointer<Self>                           Pointer;
39     typedef itk::SmartPointer<const Self>                     ConstPointer;
40
41     /** Method for creation through the object factory. */
42     itkNewMacro(Self);
43     
44     /** Runtime information support. */
45     itkTypeMacro(LinearCombinationImageFilter, ImageToImageFilter);
46     
47     //-----------------------------------
48     //Typedefs
49     //-----------------------------------
50     typedef typename TInputImage::Pointer InputPointer;
51     typedef typename TInputImage::ConstPointer InputConstPointer;
52     typedef typename TInputImage::PixelType InputPixelType;
53     
54     typedef typename TOutputImage::Pointer OutputPointer;
55     typedef typename TOutputImage::PixelType OutputPixelType;
56     typedef typename TOutputImage::RegionType OutputImageRegionType;
57     //-----------------------------------
58     //Set/Get
59     //----------------------------------
60     void SetFirstInput (const InputPointer i);
61     void SetFirstInput ( const InputConstPointer i);
62     void SetSecondInput (const InputPointer i);
63     void SetSecondInput (const InputConstPointer i);
64
65     itkSetMacro(A, double);
66     itkGetMacro(A, double);
67     itkSetMacro(B, double);
68     itkGetMacro(B, double);
69     itkSetMacro(C, double);
70     itkGetMacro(C, double);
71
72   protected:
73     LinearCombinationImageFilter();
74     virtual ~LinearCombinationImageFilter(){};
75
76     virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId);
77     
78   private:
79     LinearCombinationImageFilter(const Self&); //purposely not implemented
80     void operator=(const Self&); //purposely not implemented
81     
82     double m_A;
83     double m_B;
84     double m_C;
85     
86   };
87   
88 } // end namespace itk
89
90 #ifndef ITK_MANUAL_INSTANTIATION
91 #include "clitkLinearCombinationImageFilter.txx"
92 #endif
93
94 #endif