RTK  1.4.0
Reconstruction Toolkit
rtkDisplacedDetectorImageFilter.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 rtkDisplacedDetectorImageFilter_h
20 #define rtkDisplacedDetectorImageFilter_h
21 
22 #include <itkInPlaceImageFilter.h>
24 #include "rtkConfiguration.h"
25 
26 namespace rtk
27 {
28 
59 template<class TInputImage, class TOutputImage=TInputImage>
60 class ITK_EXPORT DisplacedDetectorImageFilter :
61  public itk::InPlaceImageFilter<TInputImage, TOutputImage>
62 {
63 public:
66 
68 
71 
73  typedef TInputImage InputImageType;
74  typedef TOutputImage OutputImageType;
75  typedef typename OutputImageType::RegionType OutputImageRegionType;
77 
80 
82  itkNewMacro(Self);
83 
86 
88  itkGetConstObjectMacro(Geometry, GeometryType);
89  itkSetConstObjectMacro(Geometry, GeometryType);
91 
94  itkGetMacro(PadOnTruncatedSide, bool);
95  itkSetMacro(PadOnTruncatedSide, bool);
97 
102  void SetOffsets(double minOffset, double maxOffset);
103  itkGetMacro(MinimumOffset, double);
104  itkGetMacro(MaximumOffset, double);
106 
109  itkGetMacro(Disable, bool);
110  itkSetMacro(Disable, bool);
112 
113 protected:
115 
116  virtual ~DisplacedDetectorImageFilter() ITK_OVERRIDE {}
117 
119  itkGetMacro(InferiorCorner, double);
120  itkGetMacro(SuperiorCorner, double);
122 
123  void GenerateInputRequestedRegion() ITK_OVERRIDE;
124 
125  void GenerateOutputInformation() ITK_OVERRIDE;
126 
127 #if ITK_VERSION_MAJOR<5
128  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) ITK_OVERRIDE;
129 #else
130  void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) ITK_OVERRIDE;
131 #endif
132 
133  // Iterative filters do not need padding
135 
136 private:
137  DisplacedDetectorImageFilter(const Self&); //purposely not implemented
138  void operator=(const Self&); //purposely not implemented
139 
141  GeometryConstPointer m_Geometry;
142 
150 
155 
161 
165  bool m_Disable;
166 
167 }; // end of class
168 
169 } // end namespace rtk
170 
171 #ifndef ITK_MANUAL_INSTANTIATION
172 #include "rtkDisplacedDetectorImageFilter.hxx"
173 #endif
174 
175 #endif
itk::SmartPointer< const Self > ConstPointer
Weigting for displaced detectors.
itk::Image< typename TOutputImage::InternalPixelType, 1 > WeightImageType
ThreeDCircularProjectionGeometry GeometryType
Projection geometry for a source and a 2-D flat panel.
unsigned int ThreadIdType
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
#define itkSetMacro(name, type)