13 #ifndef mitkModelFitFunctorBase_h
14 #define mitkModelFitFunctorBase_h
16 #include <itkObject.h>
118 itkBooleanMacro(DebugParameterMaps);
119 itkSetMacro(DebugParameterMaps,
bool);
120 itkGetConstMacro(DebugParameterMaps,
bool);
176 typedef std::map<std::string, SVModelFitCostFunction::Pointer> CostFunctionMapType;
177 CostFunctionMapType m_CostFunctionMap;
178 bool m_DebugParameterMaps;
179 mutable std::mutex m_Mutex;
#define MITKMODELFIT_EXPORT
Base class for (dynamic) models.
ModelTraitsInterface::ParameterNamesType ParameterNamesType
ModelTraitsInterface::ParametersType ParametersType
itk::Array< double > SignalType
Type representing the observed signal values.
Abstract base class for functors that perform model fitting.
ModelFitCostFunctionInterface::SignalType SignalType
virtual ParameterNamesType GetCriterionNames() const =0
Returns names of the criteria used to fit the model.
void RegisterEvaluationParameter(const std::string ¶meterName, SVModelFitCostFunction *evaluationCostFunction)
Registers an evaluation parameter with its cost function.
std::map< std::string, ParameterImagePixelType > DebugParameterMapType
itk::SmartPointer< const Self > ConstPointer
std::vector< ParameterImagePixelType > InputPixelArrayType
~ModelFitFunctorBase() override
virtual ParameterNamesType DefineDebugParameterNames() const =0
Returns names of the debug parameters generated by the functor.
ModelBase::ParametersType ParametersType
virtual ParametersType DoModelFit(const SignalType &value, const ModelBase *model, const ModelBase::ParametersType &initialParameters, DebugParameterMapType &debugParameters) const =0
Internal method that performs the actual model fitting.
OutputPixelArrayType Compute(const InputPixelArrayType &value, const ModelBase *model, const ModelBase::ParametersType &initialParameters) const
Performs model fitting and returns the results.
unsigned int GetNumberOfOutputs(const ModelBase *model) const
Returns the number of outputs the fit functor will produce.
ParameterNamesType GetEvaluationParameterNames() const
Returns names of all evaluation parameters defined by the user.
ScalarType ParameterImagePixelType
void ResetEvaluationParameters()
Removes all registered evaluation parameters.
ModelBase::ParameterNamesType ParameterNamesType
itk::SmartPointer< Self > Pointer
ParameterNamesType GetDebugParameterNames() const
Returns names of the debug parameters generated by the functor.
virtual OutputPixelArrayType GetCriteria(const ModelBase *model, const ParametersType ¶meters, const SignalType &sample) const =0
Internal method called by Compute() to get the final criterion values that drove the fit.
OutputPixelArrayType GetEvaluationParameters(const ModelBase *model, const ParametersType ¶meters, const SignalType &sample) const
Internal method called by Compute() to get evaluation parameters from user-defined cost functions.
std::vector< ParameterImagePixelType > OutputPixelArrayType
OutputPixelArrayType GetDerivedParameters(const ModelBase *model, const ParametersType ¶meters) const
Internal method called by Compute() to get derived parameters with the final fit parameters.
const SVModelFitCostFunction * GetEvaluationParameterCostFunction(const std::string ¶meterName) const
Returns the cost function associated with the given evaluation parameter.
Base class for all model fit cost functions that return a single scalar cost value.
Find image slices visible on a given plane.
double ScalarType
Scalar type used throughout MITK for geometric computations.