Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkRBFNetwork.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkRBFNetwork.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/08/03 14:40:14 $
00007   Version:   $Revision: 1.2 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 
00018 #ifndef __itkRBFNetwork_h
00019 #define __itkRBFNetwork_h
00020 
00021 
00022 #include "itkMultilayerNeuralNetworkBase.h"
00023 #include "itkBackPropagationLayer.h"
00024 #include "itkRBFLayer.h"
00025 #include "itkCompletelyConnectedWeightSet.h"
00026 #include "itkSigmoidTransferFunction.h"
00027 #include "itkLogSigmoidTransferFunction.h"
00028 #include "itkSymmetricSigmoidTransferFunction.h"
00029 #include "itkTanSigmoidTransferFunction.h"
00030 #include "itkHardLimitTransferFunction.h"
00031 #include "itkSignedHardLimitTransferFunction.h"
00032 #include "itkGaussianTransferFunction.h"
00033 #include "itkTanHTransferFunction.h"
00034 #include "itkIdentityTransferFunction.h"
00035 #include "itkSumInputFunction.h"
00036 
00037 namespace itk
00038 {
00039 namespace Statistics
00040 {
00041 template<class TVector, class TOutput>
00042 class RBFNetwork : public MultilayerNeuralNetworkBase<TVector, TOutput>
00043 {
00044 public:
00045 
00046   typedef RBFNetwork Self;
00047   typedef MultilayerNeuralNetworkBase<TVector, TOutput> Superclass;
00048   typedef SmartPointer<Self> Pointer;
00049   typedef SmartPointer<const Self> ConstPointer;
00050   typedef typename Superclass::ValueType ValueType;
00051   typedef Array<ValueType> ArrayType;
00052 
00053   typedef TransferFunctionBase<ValueType> TransferFunctionType;
00054   typedef RadialBasisFunctionBase<ValueType> RBFType;
00055   typedef InputFunctionBase<ValueType*, ValueType> InputFunctionType;
00056   typedef EuclideanDistance<TVector> DistanceMetricType; 
00057 
00058   typename InputFunctionType::Pointer InputFunction;
00059   typename DistanceMetricType::Pointer DistanceMetric;
00060   
00061   typename TransferFunctionType::Pointer InputTransferFunction;
00062   typename RBFType::Pointer HiddenTransferFunction;
00063   typename TransferFunctionType::Pointer OutputTransferFunction;
00064   
00065   /* Method for creation through the object factory. */
00066   itkTypeMacro(RBFNetwork,
00067                MultilayerNeuralNetworkBase);  
00068   itkNewMacro(Self) ;
00069 
00070   //Add the layers to the network.
00071   // 1 input, 1 hidden, 1 output 
00072   void Initialize();
00073 
00074   itkSetMacro(NumOfInputNodes, int);
00075   itkGetConstReferenceMacro(NumOfInputNodes, int);
00076 
00077   itkSetMacro(NumOfHiddenNodes, int);
00078   itkGetConstReferenceMacro(NumOfHiddenNodes, int);
00079 
00080   itkSetMacro(NumOfOutputNodes, int);
00081   itkGetConstReferenceMacro(NumOfOutputNodes, int);
00082 
00083   itkSetMacro(HiddenLayerBias, ValueType);
00084   itkGetConstReferenceMacro(HiddenLayerBias, ValueType);
00085 
00086   itkSetMacro(OutputLayerBias, ValueType);
00087   itkGetConstReferenceMacro(OutputLayerBias, ValueType);
00088 
00089   itkSetMacro(Classes, int);
00090   itkGetConstReferenceMacro(Classes,int);
00091 
00092   ValueType* GenerateOutput(TVector samplevector);
00093 
00094   void SetInputTransferFunction(TransferFunctionType* f);
00095   void SetDistanceMetric(DistanceMetricType* f);
00096   void SetHiddenTransferFunction(TransferFunctionType* f);
00097   void SetOutputTransferFunction(TransferFunctionType* f);
00098 
00099   void SetInputFunction(InputFunctionType* f);
00100   void InitializeWeights();
00101 
00102 protected:
00103 
00104   RBFNetwork();
00105   ~RBFNetwork(){};
00106   
00108   virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00109 
00110 private:
00111 
00112   int       m_NumOfInputNodes;
00113   int       m_NumOfHiddenNodes;
00114   int       m_NumOfOutputNodes;
00115   int       m_Classes;
00116   ValueType m_HiddenLayerBias;
00117   ValueType m_OutputLayerBias;
00118 };
00119 
00120 } // end namespace Statistics
00121 } // end namespace itk
00122 
00123 #ifndef ITK_MANUAL_INSTANTIATION
00124 #include "itkRBFNetwork.txx"
00125 #endif
00126 
00127 #endif

Generated at Wed May 24 23:57:12 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000