ImFusion SDK 4.3
DiceMetric Class Reference

#include <ImFusion/ML/Metrics.h>

Compute the Dice score between a label map and a ground truth segmentation. More...

+ Inheritance diagram for DiceMetric:

Detailed Description

Compute the Dice score between a label map and a ground truth segmentation.

Public Member Functions

DataScheme dataScheme () const override
 Returns the expected content of the input data.
 
 DiceMetric (bool ignoreBackground=true)
 
std::vector< Recordcompute (const DataItem &testItem) const override
 Generic method to compute the metric (each child class may have a dedicated and easier-to-use function) Result type is a vector (one record per frame) of maps (one entry per sub-metric)
 
std::vector< std::map< int, double > > computeDice (const SharedImageSet &prediction, const SharedImageSet &target) const
 
- Public Member Functions inherited from Metric
bool isCompatibleWith (const DataItem &item, bool strictCheck=false) const
 Checks if the input data item is compatible with the template metric.
 
- Public Member Functions inherited from Configurable
virtual void configure (const Properties *p)
 Configure this object instance by de-serializing the given Properties.
 
virtual void configuration (Properties *p) const
 Serialize the current object configuration into the given Properties object.
 
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
 
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
 
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 
 Configurable (const Configurable &rhs)
 
 Configurable (Configurable &&rhs) noexcept
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Additional Inherited Members

- Public Types inherited from Metric
using Field = typename DataItem::Field
 
using DataScheme = std::map<Field, ElementType>
 
using Record = std::map<std::string, Eigen::MatrixXd>
 
- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 
- Protected Member Functions inherited from Metric
void assertValidDataScheme (const DataItem &testItem) const
 Asserts if the input data item is compatible with the template metric.
 
void throwMetricError (std::string msg) const
 Helper function to throw a dedicated error with more info.
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ dataScheme()

DataScheme dataScheme ( ) const
inlineoverridevirtual

Returns the expected content of the input data.

Implements Metric.

◆ compute()

std::vector< Record > compute ( const DataItem & testItem) const
overridevirtual

Generic method to compute the metric (each child class may have a dedicated and easier-to-use function) Result type is a vector (one record per frame) of maps (one entry per sub-metric)

Implements Metric.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close