go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkLimiterFunctionBase.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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 itkLimiterFunctionBase_h
19#define itkLimiterFunctionBase_h
20
21#include "itkFunctionBase.h"
22#include "itkMacro.h"
23
24namespace itk
25{
26
49template <class TInput, unsigned int NDimension>
50class ITK_TEMPLATE_EXPORT LimiterFunctionBase : public FunctionBase<TInput, typename NumericTraits<TInput>::RealType>
51{
52public:
54
57 using Superclass = FunctionBase<TInput, typename NumericTraits<TInput>::RealType>;
58 using Pointer = SmartPointer<Self>;
59 using ConstPointer = SmartPointer<const Self>;
60
62 itkTypeMacro(LimiterFunctionBase, FunctionBase);
63
64 itkStaticConstMacro(Dimension, unsigned int, NDimension);
65
67 using typename Superclass::InputType;
68 using typename Superclass::OutputType;
69
70 using DerivativeValueType = OutputType;
71 using DerivativeType = CovariantVector<DerivativeValueType, Self::Dimension>;
72
74 OutputType
75 Evaluate(const InputType & input) const override = 0;
76
78 virtual OutputType
79 Evaluate(const InputType & input, DerivativeType & derivative) const = 0;
80
83 itkSetMacro(UpperBound, OutputType);
84 itkGetConstMacro(UpperBound, OutputType);
85
88 itkSetMacro(LowerBound, OutputType);
89 itkGetConstMacro(LowerBound, OutputType);
90
93 itkSetMacro(UpperThreshold, InputType);
94 itkGetConstMacro(UpperThreshold, InputType);
95
98 itkSetMacro(LowerThreshold, InputType);
99 itkGetConstMacro(LowerThreshold, InputType);
100
102 virtual void
104 {}
105
106protected:
108 {
109 this->m_UpperBound = itk::NumericTraits<OutputType>::One + itk::NumericTraits<OutputType>::One;
110 this->m_LowerBound = OutputType{};
111 this->m_UpperThreshold = itk::NumericTraits<InputType>::One;
112 this->m_LowerThreshold = itk::NumericTraits<InputType>::One;
113 }
114
115
116 ~LimiterFunctionBase() override = default;
117
118 OutputType m_UpperBound{};
119 OutputType m_LowerBound{};
120 InputType m_UpperThreshold{};
121 InputType m_LowerThreshold{};
122};
123
124} // end namespace itk
125
126#endif
Base class for all ITK limiter function objects.
CovariantVector< DerivativeValueType, Self::Dimension > DerivativeType
~LimiterFunctionBase() override=default
virtual OutputType Evaluate(const InputType &input, DerivativeType &derivative) const =0
ITK_DISALLOW_COPY_AND_MOVE(LimiterFunctionBase)
OutputType Evaluate(const InputType &input) const override=0
FunctionBase< TInput, typename NumericTraits< TInput >::RealType > Superclass
SmartPointer< const Self > ConstPointer
itkStaticConstMacro(Dimension, unsigned int, NDimension)


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo