ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkHeavisideStepFunction.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 __itkHeavisideStepFunction_h
00019 #define __itkHeavisideStepFunction_h
00020 
00021 #include "itkHeavisideStepFunctionBase.h"
00022 #include "itkNumericTraits.h"
00023 
00024 namespace itk
00025 {
00058 template< typename TInput = float, typename TOutput = double >
00059 class HeavisideStepFunction:
00060   public HeavisideStepFunctionBase< TInput, TOutput >
00061 {
00062 public:
00063   typedef HeavisideStepFunction                        Self;
00064   typedef HeavisideStepFunctionBase< TInput, TOutput > Superclass;
00065   typedef SmartPointer< Self >                         Pointer;
00066   typedef SmartPointer< const Self >                   ConstPointer;
00067 
00068   itkNewMacro(Self);
00069 
00070   itkTypeMacro(HeavisideStepFunction, HeavisideStepFunctionBase);
00071 
00072   typedef typename Superclass::InputType  InputType;
00073   typedef typename Superclass::OutputType OutputType;
00074 
00076   OutputType Evaluate(const InputType & input) const;
00077 
00079   OutputType EvaluateDerivative(const InputType & input) const;
00080 
00081 protected:
00082   HeavisideStepFunction();
00083   ~HeavisideStepFunction();
00084 
00085 private:
00086   HeavisideStepFunction(const Self &); //purposely not implemented
00087   void operator=(const Self &);        //purposely not implemented
00088 };
00089 }
00090 
00091 #ifndef ITK_MANUAL_INSTANTIATION
00092 #include "itkHeavisideStepFunction.hxx"
00093 #endif
00094 
00095 #endif
00096