18#ifndef itkStatisticsLabelObject_h
19#define itkStatisticsLabelObject_h
40template <
typename TLabel,
unsigned int VImageDimension>
111 else if (s ==
"Mean")
119 else if (s ==
"StandardDeviation")
123 else if (s ==
"Variance")
127 else if (s ==
"Median")
131 else if (s ==
"MaximumIndex")
135 else if (s ==
"MinimumIndex")
139 else if (s ==
"CenterOfGravity")
149 else if (s ==
"WeightedPrincipalMoments")
153 else if (s ==
"WeightedPrincipalAxes")
157 else if (s ==
"Kurtosis")
161 else if (s ==
"Skewness")
165 else if (s ==
"WeightedElongation")
169 else if (s ==
"Histogram")
173 else if (s ==
"WeightedFlatness")
195 return "StandardDeviation";
201 return "MaximumIndex";
203 return "MinimumIndex";
205 return "CenterOfGravity";
209 return "WeightedPrincipalMoments";
211 return "WeightedPrincipalAxes";
217 return "WeightedElongation";
221 return "WeightedFlatness";
231 template <
typename TSourceLabelObject>
240 m_Sum = src->GetSum();
257 template <
typename TSourceLabelObject>
261 itkAssertOrThrowMacro((src !=
nullptr),
"Null Pointer");
457 const HistogramType *
506 result->SetMatrix(matrix);
507 result->SetOffset(offset);
516 AffineTransformPointer
532 result->SetMatrix(matrix);
533 result->SetOffset(offset);
536 result->GetInverse(inverse);
569 os << indent <<
"Minimum: " <<
m_Minimum << std::endl;
570 os << indent <<
"Maximum: " <<
m_Maximum << std::endl;
571 os << indent <<
"Mean: " <<
m_Mean << std::endl;
572 os << indent <<
"Sum: " <<
m_Sum << std::endl;
574 os << indent <<
"Variance: " <<
m_Variance << std::endl;
575 os << indent <<
"Median: " <<
m_Median << std::endl;
576 os << indent <<
"Skewness: " <<
m_Skewness << std::endl;
577 os << indent <<
"Kurtosis: " <<
m_Kurtosis << std::endl;
586 itkPrintSelfObjectMacro(Histogram);
An image region represents a structured region of data.
Control indentation during Print() invocation.
Templated n-dimensional image to store labeled objects.
void CopyLinesFrom(const TSourceLabelObject *src)
A templated class holding a M x N size Matrix.
A templated class holding a geometric point in n-Dimensional space.
LabelObjectLine< VImageDimension > LineType
static AttributeType GetAttributeFromName(const std::string &s)
typename Superclass::LabelObjectType LabelObjectType
Index< VImageDimension > IndexType
unsigned int AttributeType
void PrintSelf(std::ostream &os, Indent indent) const override
typename LineType::LengthType LengthType
static std::string GetNameFromAttribute(const AttributeType &a)
Point< double, VImageDimension > CentroidType
Implements transparent reference counting.
static constexpr AttributeType SKEWNESS
const PointType & GetCenterOfGravity() const
AffineTransform< double, Self::ImageDimension > AffineTransformType
static constexpr AttributeType MINIMUM_INDEX
void SetVariance(const double v)
const double & GetVariance() const
WeakPointer< const Self > ConstWeakPointer
const double & GetStandardDeviation() const
void SetWeightedPrincipalMoments(const VectorType &v)
static constexpr AttributeType MEAN
static constexpr AttributeType KURTOSIS
void SetHistogram(const HistogramType *v)
Statistics::Histogram< double > HistogramType
StatisticsLabelObject Self
Vector< double, Self::ImageDimension > VectorType
void SetMinimumIndex(const IndexType &v)
static constexpr AttributeType MAXIMUM
const IndexType & GetMinimumIndex() const
Matrix< double, Self::ImageDimension, Self::ImageDimension > MatrixType
static constexpr AttributeType MAXIMUM_INDEX
const double & GetWeightedElongation() const
typename AffineTransformType::Pointer AffineTransformPointer
const double & GetSkewness() const
static AttributeType GetAttributeFromName(const std::string &s)
void SetSkewness(const double v)
static constexpr AttributeType WEIGHTED_PRINCIPAL_AXES
static constexpr unsigned int ImageDimension
double m_StandardDeviation
const IndexType & GetMaximumIndex() const
void SetKurtosis(const double v)
SmartPointer< Self > Pointer
void PrintSelf(std::ostream &os, Indent indent) const override
static constexpr AttributeType HISTOGRAM
void SetCenterOfGravity(const PointType &v)
double m_WeightedElongation
AffineTransformPointer GetWeightedPrincipalAxesToPhysicalAxesTransform() const
VectorType m_WeightedPrincipalMoments
void CopyAttributesFrom(const TSourceLabelObject *src)
void SetWeightedElongation(const double v)
MatrixType m_WeightedPrincipalAxes
typename Superclass::LabelObjectType LabelObjectType
static constexpr AttributeType WEIGHTED_FLATNESS
PointType m_CenterOfGravity
const double & GetKurtosis() const
void SetMaximumIndex(const IndexType &v)
static constexpr AttributeType SUM
const double & GetMaximum() const
void SetSum(const double v)
static constexpr AttributeType MINIMUM
static constexpr AttributeType MEDIAN
SmartPointer< const Self > ConstPointer
const double & GetMean() const
Index< VImageDimension > IndexType
const HistogramType * GetHistogram() const
unsigned int AttributeType
static constexpr AttributeType VARIANCE
void SetMaximum(const double v)
static constexpr AttributeType WEIGHTED_ELONGATION
static constexpr AttributeType STANDARD_DEVIATION
static constexpr AttributeType WEIGHTED_PRINCIPAL_MOMENTS
ShapeLabelObject< LabelType, VImageDimension > Superclass
static constexpr AttributeType CENTER_OF_GRAVITY
const double & GetWeightedFlatness() const
LabelMap< Self > LabelMapType
void SetStandardDeviation(const double v)
void SetWeightedFlatness(const double v)
void CopyAllFrom(const TSourceLabelObject *src)
AffineTransformPointer GetPhysicalAxesToWeightedPrincipalAxesTransform() const
double m_WeightedFlatness
const double & GetSum() const
static std::string GetNameFromAttribute(const AttributeType &a)
void SetWeightedPrincipalAxes(const MatrixType &v)
const double & GetMinimum() const
void SetMinimum(const double v)
const VectorType & GetWeightedPrincipalMoments() const
ImageRegion< Self::ImageDimension > RegionType
const double & GetMedian() const
HistogramType::ConstPointer m_Histogram
void SetMedian(const double v)
const MatrixType & GetWeightedPrincipalAxes() const
Point< double, Self::ImageDimension > PointType
void SetMean(const double v)
This class stores measurement vectors in the context of n-dimensional histogram.
SmartPointer< const Self > ConstPointer
A templated class holding a n-Dimensional vector.
Implements a weak reference to an object.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....