Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <mitkModelFitFunctorBase.h>
Public Types | |
typedef ModelFitFunctorBase | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef ScalarType | ParameterImagePixelType |
typedef std::vector< ParameterImagePixelType > | InputPixelArrayType |
typedef std::vector< ParameterImagePixelType > | OutputPixelArrayType |
typedef ModelBase::ParameterNamesType | ParameterNamesType |
Public Member Functions | |
virtual const char * | GetClassName () const |
OutputPixelArrayType | Compute (const InputPixelArrayType &value, const ModelBase *model, const ModelBase::ParametersType &initialParameters) const |
unsigned int | GetNumberOfOutputs (const ModelBase *model) const |
ParameterNamesType | GetEvaluationParameterNames () const |
void | ResetEvaluationParameters () |
void | RegisterEvaluationParameter (const std::string ¶meterName, SVModelFitCostFunction *evaluationCostFunction) |
const SVModelFitCostFunction * | GetEvaluationParameterCostFunction (const std::string ¶meterName) const |
virtual ParameterNamesType | GetCriterionNames () const =0 |
ParameterNamesType | GetDebugParameterNames () const |
virtual void | DebugParameterMapsOn () |
virtual void | DebugParameterMapsOff () |
virtual void | SetDebugParameterMaps (bool _arg) |
virtual bool | GetDebugParameterMaps () const |
Protected Types | |
typedef ModelBase::ParametersType | ParametersType |
typedef ModelFitCostFunctionInterface::SignalType | SignalType |
typedef std::map< std::string, ParameterImagePixelType > | DebugParameterMapType |
Protected Member Functions | |
ModelFitFunctorBase () | |
~ModelFitFunctorBase () override | |
virtual OutputPixelArrayType | GetCriteria (const ModelBase *model, const ParametersType ¶meters, const SignalType &sample) const =0 |
OutputPixelArrayType | GetDerivedParameters (const ModelBase *model, const ParametersType ¶meters) const |
OutputPixelArrayType | GetEvaluationParameters (const ModelBase *model, const ParametersType ¶meters, const SignalType &sample) const |
virtual ParametersType | DoModelFit (const SignalType &value, const ModelBase *model, const ModelBase::ParametersType &initialParameters, DebugParameterMapType &debugParameters) const =0 |
virtual ParameterNamesType | DefineDebugParameterNames () const =0 |
Definition at line 28 of file mitkModelFitFunctorBase.h.
typedef itk::SmartPointer< const Self > mitk::ModelFitFunctorBase::ConstPointer |
Definition at line 34 of file mitkModelFitFunctorBase.h.
|
protected |
Definition at line 108 of file mitkModelFitFunctorBase.h.
typedef std::vector<ParameterImagePixelType> mitk::ModelFitFunctorBase::InputPixelArrayType |
Definition at line 39 of file mitkModelFitFunctorBase.h.
typedef std::vector<ParameterImagePixelType> mitk::ModelFitFunctorBase::OutputPixelArrayType |
Definition at line 40 of file mitkModelFitFunctorBase.h.
Definition at line 36 of file mitkModelFitFunctorBase.h.
Definition at line 62 of file mitkModelFitFunctorBase.h.
|
protected |
Definition at line 81 of file mitkModelFitFunctorBase.h.
Definition at line 33 of file mitkModelFitFunctorBase.h.
Definition at line 31 of file mitkModelFitFunctorBase.h.
Definition at line 86 of file mitkModelFitFunctorBase.h.
typedef itk::Object mitk::ModelFitFunctorBase::Superclass |
Definition at line 32 of file mitkModelFitFunctorBase.h.
|
protected |
Definition at line 190 of file mitkModelFitFunctorBase.cpp.
References ~ModelFitFunctorBase().
Referenced by GetDebugParameterNames().
|
overrideprotected |
Definition at line 194 of file mitkModelFitFunctorBase.cpp.
Referenced by ModelFitFunctorBase().
mitk::ModelFitFunctorBase::OutputPixelArrayType mitk::ModelFitFunctorBase::Compute | ( | const InputPixelArrayType & | value, |
const ModelBase * | model, | ||
const ModelBase::ParametersType & | initialParameters | ||
) | const |
Returns the values determined by fitting the passed model. The values in the returned vector are ordered in the following sequence:
value | Signal the model should be fitted onto |
model | Pointer to the preconfigured/ready to use model instance for the fitting against the signal curve |
initialParameters | parameters of the model that should be used as starting point of the fitting process. |
Definition at line 17 of file mitkModelFitFunctorBase.cpp.
References DoModelFit(), GetCriteria(), GetCriterionNames(), GetDebugParameterNames(), GetDerivedParameters(), GetEvaluationParameters(), mitk::ModelTraitsInterface::GetNumberOfParameters(), and offset.
|
virtual |
|
virtual |
|
protectedpure virtual |
Returns names of the depug parameters generated by the functor. Will be called by GetDebugParameterNames, if debug is activated.
Implemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.
Referenced by GetDebugParameterNames().
|
protectedpure virtual |
Internal Method called by Compute(). It does the real fit and returns the found parameters. Additionally it must return its debug parameter via debugParameters.
value | Signal the Model should be fitted against | |
model | Pointer to the model that should be fitted | |
initialParameters | Initial modal parameters for the fit | |
[out] | debugParameters | Map containing all debug parameters for the done fit (must only valid if m_DebugParameterMap is true) |
Implemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.
Referenced by Compute().
|
virtual |
Reimplemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.
|
protectedpure virtual |
Internal Method called by Compute to get the final criterion values thar dove the fit. must be implemented be concrete functor classes.
Implemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.
Referenced by Compute().
|
pure virtual |
Returns names of the criterion used to fit the model.
Implemented in mitk::LevenbergMarquardtModelFitFunctor, and mitk::DummyModelFitFunctor.
Referenced by Compute(), and GetNumberOfOutputs().
|
virtual |
Referenced by mitk::LevenbergMarquardtModelFitFunctor::DoModelFit().
mitk::ModelFitFunctorBase::ParameterNamesType mitk::ModelFitFunctorBase::GetDebugParameterNames | ( | ) | const |
Returns names of the depug parameters generated by the functor. Is empty, if debug is deactivated.
Definition at line 177 of file mitkModelFitFunctorBase.cpp.
References DefineDebugParameterNames(), and ModelFitFunctorBase().
Referenced by Compute(), and GetNumberOfOutputs().
|
protected |
Internal Method called by Compute(). Gets all derived parameters of the models with the final found parameters of the fit.
Definition at line 197 of file mitkModelFitFunctorBase.cpp.
References mitk::ModelBase::GetDerivedParameters().
Referenced by Compute().
const mitk::SVModelFitCostFunction * mitk::ModelFitFunctorBase::GetEvaluationParameterCostFunction | ( | const std::string & | parameterName | ) | const |
Definition at line 157 of file mitkModelFitFunctorBase.cpp.
mitk::ModelFitFunctorBase::ParameterNamesType mitk::ModelFitFunctorBase::GetEvaluationParameterNames | ( | ) | const |
Returns names of all evaluation parameters defined by the user
Definition at line 139 of file mitkModelFitFunctorBase.cpp.
|
protected |
Internal Method called by Compute(). Gets the evaluation parameters for all cost functions enlisted by the user, based on the model with the final found parameters of the fit and the input signal.
Definition at line 215 of file mitkModelFitFunctorBase.cpp.
References mitk::SVModelFitCostFunction::GetValue(), mitk::SVModelFitCostFunction::SetModel(), and mitk::SVModelFitCostFunction::SetSample().
Referenced by Compute().
unsigned int mitk::ModelFitFunctorBase::GetNumberOfOutputs | ( | const ModelBase * | model | ) | const |
Returns the number of outputs the fit functor will return if compute is called. The number depends in parts on the passed model.
Exception | will be thrown if no valid model is passed. |
Definition at line 104 of file mitkModelFitFunctorBase.cpp.
References GetCriterionNames(), GetDebugParameterNames(), mitk::ModelBase::GetNumberOfDerivedParameters(), and mitk::ModelTraitsInterface::GetNumberOfParameters().
void mitk::ModelFitFunctorBase::RegisterEvaluationParameter | ( | const std::string & | parameterName, |
SVModelFitCostFunction * | evaluationCostFunction | ||
) |
Definition at line 126 of file mitkModelFitFunctorBase.cpp.
void mitk::ModelFitFunctorBase::ResetEvaluationParameters | ( | ) |
Definition at line 116 of file mitkModelFitFunctorBase.cpp.
|
virtual |