RTK  2.6.0
Reconstruction Toolkit
rtkBoellaardScatterCorrectionImageFilter.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 rtkBoellaardScatterCorrectionImageFilter_h
20 #define rtkBoellaardScatterCorrectionImageFilter_h
21 
22 #include <itkInPlaceImageFilter.h>
23 #include "rtkConfiguration.h"
24 
25 namespace rtk
26 {
27 
39 template <class TInputImage, class TOutputImage = TInputImage>
40 class ITK_TEMPLATE_EXPORT BoellaardScatterCorrectionImageFilter
41  : public itk::InPlaceImageFilter<TInputImage, TOutputImage>
42 {
43 public:
44  ITK_DISALLOW_COPY_AND_MOVE(BoellaardScatterCorrectionImageFilter);
45 
51 
53  using InputImageType = TInputImage;
54  using OutputImageType = TOutputImage;
55  using OutputImageRegionType = typename OutputImageType::RegionType;
56 
58  itkNewMacro(Self);
59 
61  itkOverrideGetNameOfClassMacro(BoellaardScatterCorrectionImageFilter);
62 
65  itkGetMacro(AirThreshold, double);
66  itkSetMacro(AirThreshold, double);
68 
72  itkGetMacro(ScatterToPrimaryRatio, double);
73  itkSetMacro(ScatterToPrimaryRatio, double);
75 
78  itkGetMacro(NonNegativityConstraintThreshold, double);
79  itkSetMacro(NonNegativityConstraintThreshold, double);
81 
82 protected:
84  ~BoellaardScatterCorrectionImageFilter() override = default;
85 
87  void
88  EnlargeOutputRequestedRegion(itk::DataObject * itkNotUsed(output)) override;
89  void
90  ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override;
92 
96  unsigned int
97  SplitRequestedRegion(unsigned int i, unsigned int num, OutputImageRegionType & splitRegion) override;
98  virtual int
99  SplitRequestedRegion(int i, int num, OutputImageRegionType & splitRegion);
101 
102 private:
104  double m_AirThreshold{ 32000 };
105 
107  double m_ScatterToPrimaryRatio{ 0. };
108 
110  double m_NonNegativityConstraintThreshold{ 20 };
111 }; // end of class
112 
113 } // end namespace rtk
114 
115 #ifndef ITK_MANUAL_INSTANTIATION
116 # include "rtkBoellaardScatterCorrectionImageFilter.hxx"
117 #endif
118 
119 #endif
TInputImage InputImageType
#define itkSetMacro(name, type)
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
Scatter correction for cone-beam CT reconstruction.
unsigned int ThreadIdType