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 "itkExceptionObject.h"
23 
24 namespace itk
25 {
26 
49 template< class TInput, unsigned int NDimension >
51  public FunctionBase< TInput, typename NumericTraits< TInput >::RealType >
52 {
53 public:
54 
59  typedef SmartPointer< const Self > ConstPointer;
60 
62  itkTypeMacro( LimiterFunctionBase, FunctionBase );
63 
64  itkStaticConstMacro( Dimension, unsigned int, NDimension );
65 
67  typedef typename Superclass::InputType InputType;
68  typedef typename Superclass::OutputType OutputType;
69 
70  typedef OutputType DerivativeValueType;
71  typedef CovariantVector<
73  itkGetStaticConstMacro( Dimension ) > DerivativeType;
74 
76  virtual OutputType Evaluate( const InputType & input ) const = 0;
77 
79  virtual OutputType 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 Initialize( void ) throw ( ExceptionObject ) {}
103 
104 protected:
105 
107  {
108  this->m_UpperBound
109  = itk::NumericTraits< OutputType >::One
110  + itk::NumericTraits< OutputType >::One;
111  this->m_LowerBound = itk::NumericTraits< OutputType >::Zero;
112  this->m_UpperThreshold = itk::NumericTraits< InputType >::One;
113  this->m_LowerThreshold = itk::NumericTraits< InputType >::One;
114  }
115 
116 
118 
119  OutputType m_UpperBound;
120  OutputType m_LowerBound;
121  InputType m_UpperThreshold;
122  InputType m_LowerThreshold;
123 
124 private:
125 
126  LimiterFunctionBase( const Self & ); // purposely not implemented
127  void operator=( const Self & ); // purposely not implemented
128 
129 };
130 
131 } // end namespace itk
132 
133 #endif
itkStaticConstMacro(Dimension, unsigned int, NDimension)
CovariantVector< DerivativeValueType, itkGetStaticConstMacro(Dimension) > DerivativeType
SmartPointer< Self > Pointer
virtual OutputType Evaluate(const InputType &input) const =0
FunctionBase< TInput, typename NumericTraits< TInput >::RealType > Superclass
Base class for all ITK limiter function objects.
Superclass::InputType InputType
SmartPointer< const Self > ConstPointer
Superclass::OutputType OutputType
void operator=(const Self &)


Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo