ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkSigmoidTransferFunction.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 __itkSigmoidTransferFunction_h
00019 #define __itkSigmoidTransferFunction_h
00020 
00021 #include "itkTransferFunctionBase.h"
00022 
00023 namespace itk
00024 {
00025 namespace Statistics
00026 {
00033 template<class ScalarType>
00034 class SigmoidTransferFunction : public TransferFunctionBase<ScalarType>
00035 {
00036 
00037 public:
00038 
00040   typedef SigmoidTransferFunction          Self;
00041   typedef TransferFunctionBase<ScalarType> Superclass;
00042   typedef SmartPointer<Self>               Pointer;
00043   typedef SmartPointer<const Self>         ConstPointer;
00044 
00046   itkTypeMacro(SigmoidTransferFunction, TransferFunctionBase);
00047 
00049   itkNewMacro(Self);
00050 
00052   itkSetMacro(Alpha,ScalarType);
00053   itkGetMacro(Alpha,ScalarType);
00054   itkSetMacro(Beta,ScalarType);
00055   itkGetMacro(Beta,ScalarType);
00056   itkSetMacro(OutputMinimum,ScalarType);
00057   itkGetMacro(OutputMinimum,ScalarType);
00058   itkSetMacro(OutputMaximum,ScalarType);
00059   itkGetMacro(OutputMaximum,ScalarType);
00061 
00063   virtual ScalarType Evaluate(const ScalarType& input) const;
00064 
00066   virtual ScalarType EvaluateDerivative(const ScalarType& input) const;
00067 
00068 protected:
00069 
00070   SigmoidTransferFunction();
00071   virtual ~SigmoidTransferFunction();
00072 
00074   virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00075 
00076 private:
00077 
00078   ScalarType m_Alpha;
00079   ScalarType m_Beta;
00080   ScalarType m_OutputMinimum;
00081   ScalarType m_OutputMaximum;
00082 };
00083 
00084 } // end namespace Statistics
00085 } // end namespace itk
00086 
00087 #ifndef ITK_MANUAL_INSTANTIATION
00088   #include "itkSigmoidTransferFunction.hxx"
00089 #endif
00090 
00091 #endif
00092