RTK  1.4.0
Reconstruction Toolkit
rtkConjugateGradientGetX_kPlusOneImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright RTK Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 
19 #ifndef rtkConjugateGradientGetX_kPlusOneImageFilter_h
20 #define rtkConjugateGradientGetX_kPlusOneImageFilter_h
21 
22 #include <itkImageToImageFilter.h>
23 #include <itkAddImageFilter.h>
24 #include <itkMultiplyImageFilter.h>
25 
26 namespace rtk
27 {
34 template< typename TInputImage>
35 class ConjugateGradientGetX_kPlusOneImageFilter : public itk::ImageToImageFilter< TInputImage, TInputImage>
36 {
37 public:
38 
43  typedef typename TInputImage::RegionType OutputImageRegionType;
44  typedef itk::Image<typename TInputImage::InternalPixelType,
45  TInputImage::ImageDimension> AlphaImage;
46 
48  itkNewMacro(Self)
49 
50 
52 
54  void SetXk(const TInputImage* Xk);
55  void SetPk(const TInputImage* Pk);
57 
58  itkGetMacro(Alphak, double)
59  itkSetMacro(Alphak, double)
60 
62  typedef itk::AddImageFilter<TInputImage> AddFilterType;
63  typedef itk::MultiplyImageFilter<TInputImage, AlphaImage, TInputImage> MultiplyFilterType;
64 
65 protected:
66  ConjugateGradientGetX_kPlusOneImageFilter();
67  virtual ~ConjugateGradientGetX_kPlusOneImageFilter() ITK_OVERRIDE {}
68 
69  typename TInputImage::Pointer GetXk();
70  typename TInputImage::Pointer GetPk();
71 
73  void GenerateData() ITK_OVERRIDE;
74 
75  void GenerateOutputInformation() ITK_OVERRIDE;
76 
77 private:
78  ConjugateGradientGetX_kPlusOneImageFilter(const Self &); //purposely not implemented
79  void operator=(const Self &); //purposely not implemented
80  double m_Alphak;
81 
85 
86 };
87 } //namespace ITK
88 
89 
90 #ifndef ITK_MANUAL_INSTANTIATION
91 #include "rtkConjugateGradientGetX_kPlusOneImageFilter.hxx"
92 #endif
93 
94 #endif
itk::Image< typename TInputImage::InternalPixelType, TInputImage::ImageDimension > AlphaImage
itk::ImageToImageFilter< TInputImage, TInputImage > Superclass
#define itkSetMacro(name, type)