18 #ifndef itkTrainingFunctionBase_h
19 #define itkTrainingFunctionBase_h
36 template<
typename TSample,
typename TTargetVector,
typename ScalarType>
52 typedef typename TSample::MeasurementVectorType
VectorType;
63 void SetTrainingSamples(TSample* samples);
64 void SetTargetValues(TTargetVector* targets);
74 virtual void Train(
NetworkType* itkNotUsed(net), TSample* itkNotUsed(samples), TTargetVector* itkNotUsed(targets))
83 for (
unsigned int i = 0; i < v.Size(); i++)
85 temp[i] =
static_cast<ScalarType
>(v[i]);
90 inline OutputVectorType
95 for (
unsigned int i = 0; i < v.Size(); i++)
97 temp[i] =
static_cast<ScalarType
>(v[i]);
108 virtual void PrintSelf( std::ostream& os,
Indent indent )
const ITK_OVERRIDE;
122 #ifndef ITK_MANUAL_INSTANTIATION
123 #include "itkTrainingFunctionBase.hxx"
Array class with size defined at construction time.
Light weight base class for most itk classes.
LightProcessObject Superclass
ErrorFunctionBase< InternalVectorType, ScalarType > PerformanceFunctionType
SmartPointer< Self > Pointer
VectorType defaultconverter(typename TSample::MeasurementVectorType v)
SizeValueType m_Iterations
Array< ValueType > InternalVectorType
OutputVectorType targetconverter(typename TTargetVector::MeasurementVectorType v)
unsigned long SizeValueType
This is the itkErrorFunctionBase class.
ImageBaseType::SpacingType VectorType
std::vector< OutputVectorType > OutputSampleVectorType
TTargetVector * m_SampleTargets
std::vector< VectorType > InputSampleVectorType
SmartPointer< const Self > ConstPointer
PerformanceFunctionType::Pointer m_PerformanceFunction
SquaredDifferenceErrorFunction< InternalVectorType, ScalarType > DefaultPerformanceType
TSample::MeasurementVectorType VectorType
This is the itkNeuralNetworkObject class.
InputSampleVectorType m_InputSamples
This is the itkTrainingFunctionBase class.
NeuralNetworkObject< VectorType, OutputVectorType > NetworkType
LightProcessObject is the base class for all process objects (source, filters, mappers) in the Insigh...
Control indentation during Print() invocation.
TrainingFunctionBase Self
virtual void Train(NetworkType *, TSample *, TTargetVector *)
~TrainingFunctionBase() override
TTargetVector::MeasurementVectorType OutputVectorType
This is the itkSquaredDifferenceErrorFunction class.
TSample * m_TrainingSamples
OutputSampleVectorType m_Targets