ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkRieszFrequencyFilterBankGenerator.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 itkRieszFrequencyFilterBankGenerator_h
19#define itkRieszFrequencyFilterBankGenerator_h
20
23#include <complex>
26
27namespace itk
28{
39template <typename TOutputImage,
40 typename TRieszFunction = itk::RieszFrequencyFunction<std::complex<double>, TOutputImage::ImageDimension>,
41 typename TFrequencyRegionIterator = FrequencyFFTLayoutImageRegionIteratorWithIndex<TOutputImage>>
43{
44public:
45 ITK_DISALLOW_COPY_AND_MOVE(RieszFrequencyFilterBankGenerator);
46
52
54 itkNewMacro(Self);
55
57 itkOverrideGetNameOfClassMacro(RieszFrequencyFilterBankGenerator);
58
63 using OutputRegionIterator = TFrequencyRegionIterator;
64 using OutputImageRegionType = typename OutputImageType::RegionType;
66 using RieszFunctionType = TRieszFunction;
67 using RieszFunctionPointer = typename RieszFunctionType::Pointer;
68 using FunctionValueType = typename RieszFunctionType::FunctionValueType;
69
70 using OutputsType = typename std::vector<OutputImagePointer>;
71 // using OutputsType = typename itk::VectorContainer<OutputImagePointer>;
72
74 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
75
80
81 itkConceptMacro(OutputPixelTypeIsComplexAndFloatCheck,
83
85 virtual void
86 SetOrder(const unsigned int inputOrder)
87 {
88 // Precondition
89 if (inputOrder < 1)
90 {
91 itkExceptionMacro(<< "Error: inputOrder = " << inputOrder << ". It has to be greater than 0.");
92 }
93
94 if (this->m_Order != inputOrder)
95 {
96 this->m_Order = inputOrder;
97 this->m_Evaluator->SetOrder(inputOrder);
98
99 this->SetNumberOfRequiredOutputs(this->m_Evaluator->ComputeNumberOfComponents(inputOrder));
100 for (unsigned int comp = 0; comp < this->GetNumberOfRequiredOutputs(); ++comp)
101 {
102 this->SetNthOutput(comp, this->MakeOutput(comp));
103 }
104 this->Modified();
105 }
106 }
107 itkGetConstReferenceMacro(Order, unsigned int);
108
110 itkGetModifiableObjectMacro(Evaluator, RieszFunctionType);
111
112protected:
115 void
116 PrintSelf(std::ostream & os, Indent indent) const override;
117
119 void
121 void
123
124private:
125 unsigned int m_Order{ 0 };
127}; // end of class
128} // end namespace itk
129#ifndef ITK_MANUAL_INSTANTIATION
130# include "itkRieszFrequencyFilterBankGenerator.hxx"
131#endif
132
133#endif
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
a Base class for image sources which need to have image size, and other meta-data set.
typename OutputImageType::Pointer OutputImagePointer
ProcessObject::DataObjectPointer MakeOutput(ProcessObject::DataObjectPointerArraySizeType idx) override
Control indentation during Print() invocation.
Definition itkIndent.h:53
virtual void Modified() const
virtual void SetNumberOfRequiredOutputs(DataObjectPointerArraySizeType _arg)
virtual const DataObjectPointerArraySizeType & GetNumberOfRequiredOutputs() const
virtual void SetNthOutput(DataObjectPointerArraySizeType idx, DataObject *output)
typename RieszFunctionType::FunctionValueType FunctionValueType
itk::GenerateImageSource< TOutputImage > Superclass
~RieszFrequencyFilterBankGenerator() override=default
void DynamicThreadedGenerateData(const OutputImageRegionType &threadRegion) override
typename std::vector< OutputImagePointer > OutputsType
virtual void SetOrder(const unsigned int inputOrder)
typename Superclass::OutputImagePointer OutputImagePointer
void PrintSelf(std::ostream &os, Indent indent) const override
typename OutputImageType::RegionType OutputImageRegionType
Implements transparent reference counting.
#define itkConceptMacro(name, conceptType)
Compile-time check that a template argument satisfies an itk::Concept.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....