ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkBackscatterImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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#ifndef itkBackscatterImageFilter_h
19#define itkBackscatterImageFilter_h
20
21#include <vector>
22
23#include "itkImage.h"
25#include "itkMacro.h"
26#include "itkNumericTraits.h"
27
28namespace itk
29{
70template <typename TInputImage, typename TOutputImage = Image<float, TInputImage::ImageDimension>>
71class ITK_TEMPLATE_EXPORT BackscatterImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
72{
73public:
74 ITK_DISALLOW_COPY_AND_MOVE(BackscatterImageFilter);
75
81
83 itkNewMacro(Self);
84
86 itkOverrideGetNameOfClassMacro(BackscatterImageFilter);
87
89 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
90
91 using InputImageType = TInputImage;
92 using InputImagePointer = typename TInputImage::Pointer;
93
94 using OutputImageType = TOutputImage;
95 using OutputImagePointer = typename TOutputImage::Pointer;
96
97 using InputRegionType = typename TInputImage::RegionType;
98 using InputSizeType = typename TInputImage::SizeType;
99 using InputIndexType = typename TInputImage::IndexType;
100 using InputPixelType = typename TInputImage::PixelType;
101
102 using OutputRegionType = typename TOutputImage::RegionType;
103 using OutputPixelType = typename TOutputImage::PixelType;
104
106 itkSetMacro(SamplingFrequencyMHz, float);
107 itkGetConstMacro(SamplingFrequencyMHz, float);
108
111 itkSetMacro(FrequencyBandStartMHz, float);
112 itkGetConstMacro(FrequencyBandStartMHz, float);
113
114 /* High end of RF frequency band to use in backscatter analysis.
115 * Must be a positive value.*/
116 itkSetMacro(FrequencyBandEndMHz, float);
117 itkGetConstMacro(FrequencyBandEndMHz, float);
118
119 void
120 PrintSelf(std::ostream & os, Indent indent) const override;
121
122protected:
124 ~BackscatterImageFilter() override = default;
125
126 void
127 VerifyPreconditions() const override;
128
130 void
132
133 void
134 DynamicThreadedGenerateData(const OutputRegionType & regionForThread) override;
135
137 void
139 OutputPixelType & average,
140 OutputPixelType & slope,
141 OutputPixelType & intercept) const;
142
143private:
147 float m_FrequencyDelta = 0.0f;
148
149 // Frequency band to consider for backscatter
150 unsigned int m_StartComponent = 0;
151 unsigned int m_EndComponent = 0;
152 unsigned int m_ConsideredComponents = 1;
153};
154} // end namespace itk
155
156#ifndef ITK_MANUAL_INSTANTIATION
157# include "itkBackscatterImageFilter.hxx"
158#endif
159
160#endif
SmartPointer< const Self > ConstPointer
~BackscatterImageFilter() override=default
typename TOutputImage::RegionType OutputRegionType
typename TInputImage::Pointer InputImagePointer
void VerifyPreconditions() const override
Verifies that the process object has been configured correctly, that all required inputs are set,...
static constexpr unsigned int ImageDimension
typename TOutputImage::PixelType OutputPixelType
void DynamicThreadedGenerateData(const OutputRegionType &regionForThread) override
void ComputeBackscatter(const InputIndexType &index, OutputPixelType &average, OutputPixelType &slope, OutputPixelType &intercept) const
ImageToImageFilter< TInputImage, TOutputImage > Superclass
typename TInputImage::IndexType InputIndexType
void BeforeThreadedGenerateData() override
typename TInputImage::RegionType InputRegionType
typename TInputImage::PixelType InputPixelType
void PrintSelf(std::ostream &os, Indent indent) const override
typename TInputImage::SizeType InputSizeType
typename TOutputImage::Pointer OutputImagePointer
Control indentation during Print() invocation.
Definition itkIndent.h:53
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
#define itkSetMacro(name, type)