ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkRegularizedHeavisideStepFunction.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 __itkRegularizedHeavisideStepFunction_h
00019 #define __itkRegularizedHeavisideStepFunction_h
00020 
00021 #include "itkHeavisideStepFunctionBase.h"
00022 
00023 namespace itk
00024 {
00052 template< typename TInput = float, typename TOutput = double >
00053 class RegularizedHeavisideStepFunction:
00054     public HeavisideStepFunctionBase< TInput, TOutput >
00055 {
00056 public:
00057   typedef RegularizedHeavisideStepFunction             Self;
00058   typedef HeavisideStepFunctionBase< TInput, TOutput > Superclass;
00059   typedef SmartPointer< Self >                         Pointer;
00060   typedef SmartPointer< const Self >                   ConstPointer;
00061 
00062   typedef typename Superclass::InputType  InputType;
00063   typedef typename Superclass::OutputType OutputType;
00064 
00065   typedef typename NumericTraits< InputType >::RealType RealType;
00066 
00067   void SetEpsilon(const RealType & ieps);
00068 
00069   itkGetConstMacro( Epsilon, RealType );
00070   itkGetConstMacro( OneOverEpsilon, RealType );
00071 
00072 protected:
00073   RegularizedHeavisideStepFunction();
00074   virtual ~RegularizedHeavisideStepFunction();
00075 private:
00076   RegularizedHeavisideStepFunction(const Self &); //purposely not implemented
00077   void operator=(const Self &);                   //purposely not implemented
00078 
00079   RealType m_Epsilon;
00080   RealType m_OneOverEpsilon;
00081 };
00082 }
00083 
00084 #ifndef ITK_MANUAL_INSTANTIATION
00085 #include "itkRegularizedHeavisideStepFunction.hxx"
00086 #endif
00087 
00088 #endif
00089