|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Container class for storing the computed image statistics. More...
#include <mitkImageStatisticsContainer.h>
Public Types | |
| using | RealType = double |
| using | IndexType = vnl_vector< int > |
| using | VoxelCountType = unsigned long |
| using | StatisticsVariantType = boost::variant< RealType, VoxelCountType, IndexType > |
| using | StatisticNameVector = std::vector< std::string > |
Public Member Functions | |
| ImageStatisticsObject () | |
| void | AddStatistic (const std::string_view key, StatisticsVariantType value) |
| Adds a statistic to the statistics object. More... | |
| const StatisticNameVector & | GetCustomStatisticNames () const |
| Returns the names of all custom statistics (defined at runtime and no default names). More... | |
| StatisticNameVector | GetAllStatisticNames () const |
| Returns the names of all statistics (default and custom defined) Additional custom keys are added at the end in a sorted order. More... | |
| StatisticNameVector | GetExistingStatisticNames () const |
| Returns the names of statistics that actually have stored values. More... | |
| bool | HasStatistic (const std::string_view name) const |
| Check whether a statistic with the given name exists. More... | |
| template<typename TType > | |
| TType | GetValueConverted (const std::string_view name) const |
| Converts the requested value to the defined type. More... | |
| StatisticsVariantType | GetValueNonConverted (const std::string_view name) const |
| Returns the requested value. More... | |
| void | Reset () |
| Clear all stored statistics and custom names. More... | |
Static Public Member Functions | |
| static const StatisticNameVector & | GetDefaultStatisticNames () |
| Returns the names of the default statistics. More... | |
Public Attributes | |
| HistogramType::ConstPointer | m_Histogram |
| The histogram of pixel values for this statistics object. Can be nullptr. More... | |
Container class for storing the computed image statistics.
The statistics are stored in a map <name,value> with value as boost::variant<RealType, VoxelCountType, IndexType >. The type used to create the boost::variant is important as only this type can be recovered later on.
Definition at line 61 of file mitkImageStatisticsContainer.h.
| using mitk::ImageStatisticsContainer::ImageStatisticsObject::IndexType = vnl_vector<int> |
Definition at line 66 of file mitkImageStatisticsContainer.h.
Definition at line 65 of file mitkImageStatisticsContainer.h.
| using mitk::ImageStatisticsContainer::ImageStatisticsObject::StatisticNameVector = std::vector<std::string> |
Definition at line 77 of file mitkImageStatisticsContainer.h.
| using mitk::ImageStatisticsContainer::ImageStatisticsObject::StatisticsVariantType = boost::variant<RealType, VoxelCountType, IndexType > |
Definition at line 69 of file mitkImageStatisticsContainer.h.
| using mitk::ImageStatisticsContainer::ImageStatisticsObject::VoxelCountType = unsigned long |
Definition at line 67 of file mitkImageStatisticsContainer.h.
| mitk::ImageStatisticsContainer::ImageStatisticsObject::ImageStatisticsObject | ( | ) |
| void mitk::ImageStatisticsContainer::ImageStatisticsObject::AddStatistic | ( | const std::string_view | key, |
| StatisticsVariantType | value | ||
| ) |
Adds a statistic to the statistics object.
if already a statistic with that name is included, it is overwritten
| StatisticNameVector mitk::ImageStatisticsContainer::ImageStatisticsObject::GetAllStatisticNames | ( | ) | const |
Returns the names of all statistics (default and custom defined) Additional custom keys are added at the end in a sorted order.
| const StatisticNameVector& mitk::ImageStatisticsContainer::ImageStatisticsObject::GetCustomStatisticNames | ( | ) | const |
Returns the names of all custom statistics (defined at runtime and no default names).
|
static |
Returns the names of the default statistics.
The order is derived from the image statistics plugin.
| StatisticNameVector mitk::ImageStatisticsContainer::ImageStatisticsObject::GetExistingStatisticNames | ( | ) | const |
Returns the names of statistics that actually have stored values.
|
inline |
Converts the requested value to the defined type.
| name | defined string on creation (AddStatistic) |
| if | no statistics with key name was found. |
Definition at line 115 of file mitkImageStatisticsContainer.h.
| StatisticsVariantType mitk::ImageStatisticsContainer::ImageStatisticsObject::GetValueNonConverted | ( | const std::string_view | name | ) | const |
Returns the requested value.
| if | no statistics with key name was found. |
| bool mitk::ImageStatisticsContainer::ImageStatisticsObject::HasStatistic | ( | const std::string_view | name | ) | const |
Check whether a statistic with the given name exists.
| [in] | name | The name of the statistic to query. |
| void mitk::ImageStatisticsContainer::ImageStatisticsObject::Reset | ( | ) |
Clear all stored statistics and custom names.
| HistogramType::ConstPointer mitk::ImageStatisticsContainer::ImageStatisticsObject::m_Histogram |
The histogram of pixel values for this statistics object. Can be nullptr.
Definition at line 131 of file mitkImageStatisticsContainer.h.