RTK  2.0.1
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  * 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 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>
41  public itk::InPlaceImageFilter<TInputImage, TOutputImage>
42 {
43 public:
44  ITK_DISALLOW_COPY_AND_ASSIGN(BoellaardScatterCorrectionImageFilter);
45 
51 
53  using InputImageType = TInputImage;
54  using OutputImageType = TOutputImage;
55  using OutputImageRegionType = typename OutputImageType::RegionType;
56 
58  itkNewMacro(Self);
59 
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 EnlargeOutputRequestedRegion(itk::DataObject *itkNotUsed(output)) override;
88  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId ) override;
90 
94  unsigned int SplitRequestedRegion(unsigned int i, unsigned int num, OutputImageRegionType& splitRegion) override;
95  virtual int SplitRequestedRegion(int i, int num, OutputImageRegionType& splitRegion);
97 
98 private:
100  double m_AirThreshold{32000};
101 
103  double m_ScatterToPrimaryRatio{0.};
104 
106  double m_NonNegativityConstraintThreshold{20};
107 }; // end of class
108 
109 } // end namespace rtk
110 
111 #ifndef ITK_MANUAL_INSTANTIATION
112 #include "rtkBoellaardScatterCorrectionImageFilter.hxx"
113 #endif
114 
115 #endif
unsigned int ThreadIdType
Scatter correction for cone-beam CT reconstruction.
#define itkSetMacro(name, type)