ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkNeuralNetworkObject.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 __itkNeuralNetworkObject_h
00019 #define __itkNeuralNetworkObject_h
00020 
00021 #include "itkDataObject.h"
00022 #include "itkLayerBase.h"
00023 #include "itkLearningFunctionBase.h"
00024 
00025 namespace itk
00026 {
00027 namespace Statistics
00028 {
00035 template<class TMeasurementVector, class TTargetVector >
00036 class NeuralNetworkObject : public DataObject
00037 {
00038 public:
00039 
00040   typedef NeuralNetworkObject      Self;
00041   typedef DataObject               Superclass;
00042   typedef SmartPointer<Self>       Pointer;
00043   typedef SmartPointer<const Self> ConstPointer;
00044 
00045   itkTypeMacro(NeuralNetworkObject, DataObject);
00046 
00047   typedef TMeasurementVector                        MeasurementVectorType;
00048   typedef typename MeasurementVectorType::ValueType ValueType;
00049   typedef Array<ValueType>                          NetworkOutputType;
00050   typedef TTargetVector                             TargetVectorType;
00051 
00052   typedef LayerBase<TMeasurementVector, TTargetVector> LayerInterfaceType;
00053 
00054   virtual NetworkOutputType GenerateOutput(TMeasurementVector samplevector)=0;
00055 
00056   virtual void BackwardPropagate(NetworkOutputType errors) = 0;
00057   virtual void UpdateWeights(ValueType) = 0;
00058 
00059 protected:
00060 
00061   NeuralNetworkObject();
00062   virtual ~NeuralNetworkObject();
00063 
00065   virtual void PrintSelf( std::ostream& os, Indent indent ) const;
00066 
00067   ValueType m_LearningRate;
00068 
00069 };
00070 
00071 } // end namespace Statistics
00072 } // end namespace itk
00073 
00074 #ifndef ITK_MANUAL_INSTANTIATION
00075 #include "itkNeuralNetworkObject.hxx"
00076 #endif
00077 
00078 #endif
00079