ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkIsotropicFrequencyFunction.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 itkIsotropicFrequencyFunction_h
19#define itkIsotropicFrequencyFunction_h
20
22#include <itkFloatTypes.h>
23
24namespace itk
25{
36template <typename TFunctionValue = double,
37 unsigned int VImageDimension = 3,
39class IsotropicFrequencyFunction : public FrequencyFunction<TFunctionValue, VImageDimension, TInput>
40{
41public:
42 ITK_DISALLOW_COPY_AND_MOVE(IsotropicFrequencyFunction);
43
49
51 itkOverrideGetNameOfClassMacro(IsotropicFrequencyFunction);
52
55
60 double
61 Magnitude(const TInput & point) const
62 {
63 double accum(0);
64
65 for (size_t d = 0; d < VImageDimension; ++d)
66 {
67 accum += point[d] * point[d];
68 }
69 return sqrt(accum);
70 };
71
75 Evaluate(const TInput & frequency_point) const override
76 {
77 return this->EvaluateMagnitude(static_cast<TFunctionValue>(this->Magnitude(frequency_point)));
78 }
79
82 virtual FunctionValueType
83 EvaluateMagnitude(const TFunctionValue & freq_norm_in_hz) const = 0;
84
85 // #<{(|*** Forward/Analysis **|)}>#
86 // virtual FunctionValueType EvaluateForward(const TFunctionValue& freq_in_hz) const = 0;
87 // #<{(|*** Inverse/Synthesis **|)}>#
88 // virtual FunctionValueType EvaluateInverse(const TFunctionValue& freq_in_hz) const = 0;
89
90protected:
92 ~IsotropicFrequencyFunction() override = default;
93 void
94 PrintSelf(std::ostream & os, Indent indent) const override
95 {
96 Superclass::PrintSelf(os, indent);
97 }
98};
99} // end namespace itk
100
101#endif
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition itkIndent.h:53
typename Superclass::FunctionValueType FunctionValueType
FunctionValueType Evaluate(const TInput &frequency_point) const override
virtual FunctionValueType EvaluateMagnitude(const TFunctionValue &freq_norm_in_hz) const =0
~IsotropicFrequencyFunction() override=default
typename Superclass::OutputType OutputType
void PrintSelf(std::ostream &os, Indent indent) const override
FrequencyFunction< TFunctionValue, VImageDimension, TInput > Superclass
typename Superclass::InputType InputType
double Magnitude(const TInput &point) const
Implements transparent reference counting.
A templated class holding a n-Dimensional vector.
Definition itkVector.h:63
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....