ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkHeavisideStepFunctionBase.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkHeavisideStepFunctionBase_h
00019 #define __itkHeavisideStepFunctionBase_h
00020 
00021 #include "itkFunctionBase.h"
00022 #include "itkConceptChecking.h"
00023 
00024 namespace itk
00025 {
00053 template< typename TInput = float, typename TOutput = double >
00054 class HeavisideStepFunctionBase:public FunctionBase< TInput, TOutput >
00055 {
00056 public:
00057   typedef HeavisideStepFunctionBase       Self;
00058   typedef FunctionBase< TInput, TOutput > Superclass;
00059   typedef SmartPointer< Self >            Pointer;
00060   typedef SmartPointer< const Self >      ConstPointer;
00061 
00063   itkTypeMacro ( HeavisideStepFunctionBase, FunctionBase );
00064 
00065 
00066   typedef typename Superclass::InputType  InputType;
00067   typedef typename Superclass::OutputType OutputType;
00068 
00070   virtual OutputType Evaluate(const InputType & input) const = 0;
00071 
00073   virtual OutputType EvaluateDerivative(const InputType & input) const = 0;
00074 
00075 #ifdef ITK_USE_CONCEPT_CHECKING
00076   itkConceptMacro( DoubleConvertibleToInputCheck,
00077                  ( Concept::Convertible< double, TInput > ) );
00078 
00079   itkConceptMacro( DoubleConvertibleToOutputCheck,
00080                  ( Concept::Convertible< double, TOutput > ) );
00081 #endif // ITK_USE_CONCEPT_CHECKING
00082 
00083 protected:
00084   HeavisideStepFunctionBase() : Superclass() {}
00085   virtual ~HeavisideStepFunctionBase() {}
00086 
00087 private:
00088   HeavisideStepFunctionBase(const Self &); //purposely not implemented
00089   void operator=(const Self &);            //purposely not implemented
00090 };
00091 }
00092 
00093 #endif
00094