ITK  6.0.0
Insight Toolkit
itkFrequencyBandImageFilter.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 itkFrequencyBandImageFilter_h
19#define itkFrequencyBandImageFilter_h
20
22
23namespace itk
24{
52template <typename TImageType, typename TFrequencyIterator = FrequencyFFTLayoutImageRegionIteratorWithIndex<TImageType>>
53class ITK_TEMPLATE_EXPORT FrequencyBandImageFilter : public UnaryFrequencyDomainFilter<TImageType, TFrequencyIterator>
54{
55public:
56 ITK_DISALLOW_COPY_AND_MOVE(FrequencyBandImageFilter);
57
63
65 itkNewMacro(Self);
66
68 itkOverrideGetNameOfClassMacro(FrequencyBandImageFilter);
69
71 using ImageType = TImageType;
75 using PixelType = typename TImageType::PixelType;
76
79
80 static constexpr unsigned int ImageDimension = TImageType::ImageDimension;
81
83 using FrequencyIteratorType = TFrequencyIterator;
84 using FrequencyValueType = typename FrequencyIteratorType::FrequencyValueType;
85
86 /****** Frequency Threshold Getters/Setters *****/
87
89 itkGetConstReferenceMacro(LowFrequencyThreshold, FrequencyValueType);
90 itkSetMacro(LowFrequencyThreshold, FrequencyValueType);
91
96 void
98
100 itkGetConstReferenceMacro(HighFrequencyThreshold, FrequencyValueType);
101 itkSetMacro(HighFrequencyThreshold, FrequencyValueType);
102 void
113 void
115
123 void
125 const FrequencyValueType & freqHighInRadians);
126
129 itkSetMacro(PassLowFrequencyThreshold, bool);
130 itkGetConstReferenceMacro(PassLowFrequencyThreshold, bool);
131 itkBooleanMacro(PassLowFrequencyThreshold);
136 itkSetMacro(PassHighFrequencyThreshold, bool);
137 itkGetConstReferenceMacro(PassHighFrequencyThreshold, bool);
138 itkBooleanMacro(PassHighFrequencyThreshold);
142 itkSetMacro(PassBand, bool);
143 itkGetConstReferenceMacro(PassBand, bool);
144 itkBooleanMacro(PassBand);
156 void
157 SetPassBand(const bool passLowThreshold, const bool passHighThreshold);
158
168 void
169 SetStopBand(const bool passLowThreshold, const bool passHighThreshold);
170
173 itkSetMacro(RadialBand, bool);
174 itkGetConstReferenceMacro(RadialBand, bool);
175 itkBooleanMacro(RadialBand);
180 itkSetMacro(PassNegativeLowFrequencyThreshold, bool);
181 itkGetConstReferenceMacro(PassNegativeLowFrequencyThreshold, bool);
182 itkBooleanMacro(PassNegativeLowFrequencyThreshold);
187 itkSetMacro(PassNegativeHighFrequencyThreshold, bool);
188 itkGetConstReferenceMacro(PassNegativeHighFrequencyThreshold, bool);
189 itkBooleanMacro(PassNegativeHighFrequencyThreshold);
193protected:
195 void
196 PrintSelf(std::ostream & os, Indent indent) const override;
197
198 /* Checks the logic of FrequencyThresholds. */
199 void
200 VerifyPreconditions() const override;
201
202 /* This is the box functor, which implements the filter's behavior. */
203 void
205
206private:
207 std::function<void(const ImageRegionType &)> m_DynamicThreadedGenerateDataFunction{};
208
209 FrequencyValueType m_LowFrequencyThreshold{};
210 FrequencyValueType m_HighFrequencyThreshold{};
211
212 bool m_PassBand{ true };
213 bool m_PassLowFrequencyThreshold{ true };
214 bool m_PassHighFrequencyThreshold{ true };
215 bool m_RadialBand{ true };
216 bool m_PassNegativeLowFrequencyThreshold{ true };
217 bool m_PassNegativeHighFrequencyThreshold{ true };
218};
219} // end namespace itk
220
221#ifndef ITK_MANUAL_INSTANTIATION
222# include "itkFrequencyBandImageFilter.hxx"
223#endif
224
225#endif
Performs a frequency band filtering on a frequency domain image.
void SetFrequencyThresholds(const FrequencyValueType &freqLow, const FrequencyValueType &freqHigh)
typename ImageType::Pointer ImagePointer
typename TImageType::RegionType ImageRegionType
void SetPassBand(const bool passLowThreshold, const bool passHighThreshold)
void BandPass(FrequencyIteratorType &freqIt)
void PrintSelf(std::ostream &os, Indent indent) const override
typename FrequencyIteratorType::FrequencyValueType FrequencyValueType
typename ImageType::ConstPointer ImageConstPointer
void SetFrequencyThresholdsInRadians(const FrequencyValueType &freqLowInRadians, const FrequencyValueType &freqHighInRadians)
typename TImageType::PixelType PixelType
void SetHighFrequencyThresholdInRadians(const FrequencyValueType &freqHighInRadians)
void SetLowFrequencyThresholdInRadians(const FrequencyValueType &freqLowInRadians)
typename TImageType::IndexType IndexType
void SetStopBand(const bool passLowThreshold, const bool passHighThreshold)
void VerifyPreconditions() const override
Verifies that the process object has been configured correctly, that all required inputs are set,...
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Performs a unary operation on a frequency domain image.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....