ITK  5.2.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  * 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 #ifndef itkFrequencyBandImageFilter_h
19 #define itkFrequencyBandImageFilter_h
20 
22 
23 namespace itk
24 {
52 template <typename TImageType, typename TFrequencyIterator = FrequencyFFTLayoutImageRegionIteratorWithIndex<TImageType>>
53 class FrequencyBandImageFilter : public UnaryFrequencyDomainFilter<TImageType, TFrequencyIterator>
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_MOVE(FrequencyBandImageFilter);
57 
63 
65  itkNewMacro(Self);
66 
69 
71  using ImageType = TImageType;
72  using ImagePointer = typename ImageType::Pointer;
73  using ImageConstPointer = typename ImageType::ConstPointer;
74  using IndexType = typename TImageType::IndexType;
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
97  SetLowFrequencyThresholdInRadians(const FrequencyValueType & freqLowInRadians);
98 
100  itkGetConstReferenceMacro(HighFrequencyThreshold, FrequencyValueType);
101  itkSetMacro(HighFrequencyThreshold, FrequencyValueType);
102  void
103  SetHighFrequencyThresholdInRadians(const FrequencyValueType & freqHighInRadians);
105 
113  void
114  SetFrequencyThresholds(const FrequencyValueType & freqLow, const FrequencyValueType & freqHigh);
115 
123  void
124  SetFrequencyThresholdsInRadians(const FrequencyValueType & freqLowInRadians,
125  const FrequencyValueType & freqHighInRadians);
126 
129  itkSetMacro(PassLowFrequencyThreshold, bool);
130  itkGetConstReferenceMacro(PassLowFrequencyThreshold, bool);
131  itkBooleanMacro(PassLowFrequencyThreshold);
133 
136  itkSetMacro(PassHighFrequencyThreshold, bool);
137  itkGetConstReferenceMacro(PassHighFrequencyThreshold, bool);
138  itkBooleanMacro(PassHighFrequencyThreshold);
140 
142  itkSetMacro(PassBand, bool);
143  itkGetConstReferenceMacro(PassBand, bool);
144  itkBooleanMacro(PassBand);
146 
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);
177 
180  itkSetMacro(PassNegativeLowFrequencyThreshold, bool);
181  itkGetConstReferenceMacro(PassNegativeLowFrequencyThreshold, bool);
182  itkBooleanMacro(PassNegativeLowFrequencyThreshold);
184 
187  itkSetMacro(PassNegativeHighFrequencyThreshold, bool);
188  itkGetConstReferenceMacro(PassNegativeHighFrequencyThreshold, bool);
189  itkBooleanMacro(PassNegativeHighFrequencyThreshold);
191 
192 
193 protected:
195  void
196  PrintSelf(std::ostream & os, Indent indent) const override;
197 
198  /* Checks the logic of FrequencyThresholds. */
199  void
200  VerifyPreconditions() ITKv5_CONST override;
201 
202  /* This is the box functor, which implements the filter's behavior. */
203  void
205 
206 private:
208 
211 
212  bool m_PassBand{ true };
215  bool m_RadialBand{ true };
218 };
219 } // end namespace itk
220 
221 #ifndef ITK_MANUAL_INSTANTIATION
222 # include "itkFrequencyBandImageFilter.hxx"
223 #endif
224 
225 #endif
itk::FrequencyBandImageFilter::m_HighFrequencyThreshold
FrequencyValueType m_HighFrequencyThreshold
Definition: itkFrequencyBandImageFilter.h:210
itk::FrequencyBandImageFilter::m_RadialBand
bool m_RadialBand
Definition: itkFrequencyBandImageFilter.h:215
itk::FrequencyBandImageFilter::SetPassBand
virtual void SetPassBand(bool _arg)
itk::FrequencyBandImageFilter::SetFrequencyThresholds
void SetFrequencyThresholds(const FrequencyValueType &freqLow, const FrequencyValueType &freqHigh)
itk::FrequencyBandImageFilter
Performs a frequency band filtering on a frequency domain image.
Definition: itkFrequencyBandImageFilter.h:53
itk::FrequencyBandImageFilter::SetStopBand
void SetStopBand(const bool passLowThreshold, const bool passHighThreshold)
itk::FrequencyBandImageFilter::VerifyPreconditions
void VerifyPreconditions() ITKv5_CONST override
itk::FrequencyBandImageFilter::FrequencyBandImageFilter
FrequencyBandImageFilter()
itk::FrequencyBandImageFilter::m_PassNegativeHighFrequencyThreshold
bool m_PassNegativeHighFrequencyThreshold
Definition: itkFrequencyBandImageFilter.h:217
itk::FrequencyBandImageFilter::IndexType
typename TImageType::IndexType IndexType
Definition: itkFrequencyBandImageFilter.h:74
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FrequencyBandImageFilter::FrequencyValueType
typename FrequencyIteratorType::FrequencyValueType FrequencyValueType
Definition: itkFrequencyBandImageFilter.h:84
itk::FrequencyBandImageFilter::m_DynamicThreadedGenerateDataFunction
std::function< void(const ImageRegionType &)> m_DynamicThreadedGenerateDataFunction
Definition: itkFrequencyBandImageFilter.h:207
itk::FrequencyBandImageFilter::ImagePointer
typename ImageType::Pointer ImagePointer
Definition: itkFrequencyBandImageFilter.h:72
itk::FrequencyBandImageFilter::m_PassHighFrequencyThreshold
bool m_PassHighFrequencyThreshold
Definition: itkFrequencyBandImageFilter.h:214
itk::FrequencyBandImageFilter::ImageDimension
static constexpr unsigned int ImageDimension
Definition: itkFrequencyBandImageFilter.h:80
itk::FrequencyBandImageFilter::SetHighFrequencyThresholdInRadians
void SetHighFrequencyThresholdInRadians(const FrequencyValueType &freqHighInRadians)
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::FrequencyBandImageFilter::ImageType
TImageType ImageType
Definition: itkFrequencyBandImageFilter.h:71
itk::FrequencyBandImageFilter::FrequencyIteratorType
TFrequencyIterator FrequencyIteratorType
Definition: itkFrequencyBandImageFilter.h:83
itk::FrequencyBandImageFilter::m_PassNegativeLowFrequencyThreshold
bool m_PassNegativeLowFrequencyThreshold
Definition: itkFrequencyBandImageFilter.h:216
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::FrequencyBandImageFilter::SetLowFrequencyThresholdInRadians
void SetLowFrequencyThresholdInRadians(const FrequencyValueType &freqLowInRadians)
itk::FrequencyBandImageFilter::m_PassLowFrequencyThreshold
bool m_PassLowFrequencyThreshold
Definition: itkFrequencyBandImageFilter.h:213
itk::UnaryFrequencyDomainFilter
Performs a unary operation on a frequency domain image.
Definition: itkUnaryFrequencyDomainFilter.h:61
itk::FrequencyBandImageFilter::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::FrequencyBandImageFilter::ImageConstPointer
typename ImageType::ConstPointer ImageConstPointer
Definition: itkFrequencyBandImageFilter.h:73
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::FrequencyBandImageFilter::m_LowFrequencyThreshold
FrequencyValueType m_LowFrequencyThreshold
Definition: itkFrequencyBandImageFilter.h:209
itkUnaryFrequencyDomainFilter.h
itk::FrequencyBandImageFilter::m_PassBand
bool m_PassBand
Definition: itkFrequencyBandImageFilter.h:212
itk::FrequencyBandImageFilter::ImageRegionType
typename TImageType::RegionType ImageRegionType
Definition: itkFrequencyBandImageFilter.h:78
itk::FrequencyBandImageFilter::BandPass
void BandPass(FrequencyIteratorType &freqIt)
itk::FrequencyBandImageFilter::SetFrequencyThresholdsInRadians
void SetFrequencyThresholdsInRadians(const FrequencyValueType &freqLowInRadians, const FrequencyValueType &freqHighInRadians)
itk::FrequencyBandImageFilter::PixelType
typename TImageType::PixelType PixelType
Definition: itkFrequencyBandImageFilter.h:75