ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkFieldOfViewImageFilter.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 * https://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 rtkFieldOfViewImageFilter_h
20#define rtkFieldOfViewImageFilter_h
21
23
24#include "rtkConfiguration.h"
26
27struct _lprec;
28
29namespace rtk
30{
31
47template <class TInputImage, class TOutputImage>
48class ITK_TEMPLATE_EXPORT FieldOfViewImageFilter : public itk::InPlaceImageFilter<TInputImage, TOutputImage>
49{
50public:
51 ITK_DISALLOW_COPY_AND_MOVE(FieldOfViewImageFilter);
52
58
59 using OutputImageRegionType = typename TOutputImage::RegionType;
60 using ProjectionsStackType = typename TInputImage::Superclass;
61 using ProjectionsStackPointer = typename ProjectionsStackType::Pointer;
64 using FOVRadiusType = enum { RADIUSINF, RADIUSSUP, RADIUSBOTH };
65
66
68 itkNewMacro(Self);
69
71 itkOverrideGetNameOfClassMacro(FieldOfViewImageFilter);
72
74 itkGetConstObjectMacro(Geometry, GeometryType);
75 itkSetConstObjectMacro(Geometry, GeometryType);
76
80 itkGetMacro(Mask, bool);
81 itkSetMacro(Mask, bool);
82
86 itkGetMacro(ProjectionsStack, ProjectionsStackPointer);
87 itkSetObjectMacro(ProjectionsStack, ProjectionsStackType);
88
91 itkGetMacro(DisplacedDetector, bool);
92 itkSetMacro(DisplacedDetector, bool);
93
95 itkGetMacro(InsideValue, double);
96 itkSetMacro(InsideValue, double);
97
99 itkGetMacro(OutsideValue, double);
100 itkSetMacro(OutsideValue, double);
101
112 virtual bool
113 ComputeFOVRadius(FOVRadiusType type, double & x, double & z, double & r);
114
118 void
120
121protected:
123 ~FieldOfViewImageFilter() override = default;
124
126 void
127 VerifyPreconditions() const override;
128
129 void
131
134 void
135 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
136
137private:
139 bool m_Mask{ false };
141 double m_Radius{ -1 };
142 double m_CenterX{ 0. };
143 double m_CenterZ{ 0. };
148 bool m_DisplacedDetector{ false };
149 double m_InsideValue{ 1. };
150 double m_OutsideValue{ 0. };
151};
152
153} // end namespace rtk
154
155#ifndef ITK_MANUAL_INSTANTIATION
156# include "rtkFieldOfViewImageFilter.hxx"
157#endif
158
159#endif
Base class for filters that take an image as input and produce an image as output.
Base class for filters that take an image as input and overwrite that image as the output.
Implements transparent reference counting.
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
~FieldOfViewImageFilter() override=default
void AddCollimationConstraints(FOVRadiusType type, _lprec *lp)
ProjectionsStackPointer m_ProjectionsStack
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
enum { RADIUSINF, RADIUSSUP, RADIUSBOTH } FOVRadiusType
typename TOutputImage::RegionType OutputImageRegionType
rtk::ThreeDCircularProjectionGeometry GeometryType
typename TInputImage::Superclass ProjectionsStackType
itk::SmartPointer< Self > Pointer
void BeforeThreadedGenerateData() override
virtual bool ComputeFOVRadius(FOVRadiusType type, double &x, double &z, double &r)
typename ProjectionsStackType::Pointer ProjectionsStackPointer
void VerifyPreconditions() const override
itk::SmartPointer< const Self > ConstPointer
typename GeometryType::ConstPointer GeometryConstPointer
Projection geometry for a source and a 2-D flat panel.
#define itkSetMacro(name, type)