ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkTransferFunctionBase.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 __itkTransferFunctionBase_h
00019 #define __itkTransferFunctionBase_h
00020 
00021 #include "itkFunctionBase.h"
00022 #include "itkArray.h"
00023 
00024 namespace itk
00025 {
00026 namespace Statistics
00027 {
00034 template<class ScalarType>
00035 class TransferFunctionBase : public FunctionBase<ScalarType, ScalarType>
00036 {
00037 public:
00038 
00040   typedef TransferFunctionBase                 Self;
00041   typedef FunctionBase<ScalarType, ScalarType> Superclass;
00042   typedef SmartPointer<Self>                   Pointer;
00043   typedef SmartPointer<const Self>             ConstPointer;
00044 
00046   itkTypeMacro(TransferFunctionBase, FunctionBase);
00047 
00049   typedef ScalarType InputType;
00050 
00052   typedef ScalarType        OutputType;
00053   typedef Array<ScalarType> ArrayType;
00054 
00056   virtual OutputType Evaluate(const InputType& input) const = 0;
00057 
00059   virtual OutputType EvaluateDerivative(const InputType& input) const = 0;
00060 
00061 protected:
00062   TransferFunctionBase() {};
00063   ~TransferFunctionBase(){};
00064 
00066   virtual void PrintSelf( std::ostream& os, Indent indent ) const
00067     {
00068     os << indent << "TransferFunctionBase(" << this << ")" << std::endl;
00069     Superclass::PrintSelf( os, indent );
00070     }
00072 
00073 private:
00074 
00075   TransferFunctionBase(const Self&); //purposely not implemented
00076   void operator=(const Self&); //purposely not implemented
00077 };
00078 
00079 } // end namespace Statistics
00080 } // end namespace itk
00081 #endif
00082