Page MenuHomePhabricator

Adding new statistical coefficients to mitkImageStatisticsCalculator
Closed, ResolvedPublic

Description

We wanted to calculate the Skewness and Kurtosis of a distribution.

Therefore we implement a new class which inherits from the itkStatisticsImageFilter and which will be used in the mitkImageStatisticsCalculator.

This makes sense because the itkStatisticsImageFilter already calculates all other important statistical coefficients.

Event Timeline

Creating two new classes mitkExtendedLabelStatisticsImageFilter and mitkExtendedStatisticsImageFilter for calculating the coefficients.

first before going thorugh the whole plan and which class assign values to antoher we have to identify where the coefficients are calculated. There are two classes which actually calculate the other statisitcal coefficients like mean value and variance(itkImageStatisticsFilter for unmasked images, itkLabelImageStatisticsFilter for masked images). To have no conflicts with the rest of the source code this two classes will be replaced by mitkExtendedLabelStatisticsImageFilter and mitkExtendedStatisticsImageFilter. This two classes inherits from the unextended Filterversion. This new classes invokes the new coefficients on top of that as two new members and methods.

For the calculations of both coefficients the mean and variance is needed, so the base classes will be first executed and provides the needed values. Then the coefficients will be calculated together in a member method of the new class and will be accessible thorugh getter methods.

User muellert has pushed new remote branch:

bug-18255-add-new-statistical-coefficients

User muellert has pushed new remote branch:

bug-18255-stat-coefficients-master-rebased

REVIEW:

= ExtendedStatisticsImageFilter =

  • Documentation missing on why skewness and kurtosis are stored in outputs 7 and 8
  • use itkFactorylessNewMacro & itkCloneMacro instead of itkNewMacro
  • Variables for the coefficients are initialized with different values in c'tor and ComputeTheSkewnessAndKurtosis() -> unify

= ExtendedLabelStatisticsImageFilter =

  • use itkFactorylessNewMacro & itkCloneMacro instead of itkNewMacro
  • GetKurtosis() and GetSkewness() return Zero as default value, ComputeTheSkewnessAndKurtosis() sets -1 as default value -> unify

review completed.
branch bug-18255-master-integration is ready for integration in the master.

User engelm has pushed new remote branch:

bug-18255-stat-coefficients-master-rebased2

As we need to maintain this code as soon as it is merged into the master branch, it would be really nice if we would somehow benefit from it, e.g., the new functionality should also be integrated into the Statistics view. We had trouble the last time with the Hot Spot calculation which was never integrated in a working state into the Statistics view which ultimately lead to the removal from the view. Now we have that code of which no one of us really know how to "use" it properly.

I work on to integrate it into the Statistics View.

Integration into master has been completed.