18 #ifndef itkStatisticsLabelObject_h
19 #define itkStatisticsLabelObject_h
40 template<
typename TLabel,
unsigned int VImageDimension >
102 if ( s ==
"Minimum" )
106 else if ( s ==
"Maximum" )
110 else if ( s ==
"Mean" )
114 else if ( s ==
"Sum" )
118 else if ( s ==
"StandardDeviation" )
122 else if ( s ==
"Variance" )
126 else if ( s ==
"Median" )
130 else if ( s ==
"MaximumIndex" )
134 else if ( s ==
"MinimumIndex" )
138 else if ( s ==
"CenterOfGravity" )
148 else if ( s ==
"WeightedPrincipalMoments" )
152 else if ( s ==
"WeightedPrincipalAxes" )
156 else if ( s ==
"Kurtosis" )
160 else if ( s ==
"Skewness" )
164 else if ( s ==
"WeightedElongation" )
168 else if ( s ==
"Histogram" )
172 else if ( s ==
"WeightedFlatness" )
197 return "StandardDeviation";
206 return "MaximumIndex";
209 return "MinimumIndex";
212 return "CenterOfGravity";
218 return "WeightedPrincipalMoments";
221 return "WeightedPrincipalAxes";
230 return "WeightedElongation";
236 return "WeightedFlatness";
247 template<
typename TSourceLabelObject >
250 Superclass::template CopyAttributesFrom<TSourceLabelObject>(src);
255 m_Sum = src->GetSum();
272 template<
typename TSourceLabelObject >
275 itkAssertOrThrowMacro ( ( src !=
nullptr ),
"Null Pointer" );
276 this->
template CopyLinesFrom<TSourceLabelObject>( src );
277 this->
template CopyAttributesFrom<TSourceLabelObject>( src );
485 result->SetMatrix(matrix);
486 result->SetOffset(offset);
510 result->SetMatrix(matrix);
511 result->SetOffset(offset);
514 result->GetInverse(inverse);
546 os << indent <<
"Minimum: " <<
m_Minimum << std::endl;
547 os << indent <<
"Maximum: " <<
m_Maximum << std::endl;
548 os << indent <<
"Mean: " <<
m_Mean << std::endl;
549 os << indent <<
"Sum: " <<
m_Sum << std::endl;
551 os << indent <<
"Variance: " <<
m_Variance << std::endl;
552 os << indent <<
"Median: " <<
m_Median << std::endl;
553 os << indent <<
"Skewness: " <<
m_Skewness << std::endl;
554 os << indent <<
"Kurtosis: " <<
m_Kurtosis << std::endl;
563 itkPrintSelfObjectMacro( Histogram );
void SetMedian(const double &v)
static constexpr AttributeType WEIGHTED_FLATNESS
void SetWeightedPrincipalMoments(const VectorType &v)
void SetStandardDeviation(const double &v)
Light weight base class for most itk classes.
static std::string GetNameFromAttribute(const AttributeType &a)
typename Superclass::IndexType IndexType
void SetMaximum(const double &v)
const PointType & GetCenterOfGravity() const
static constexpr AttributeType VARIANCE
typename Superclass::AttributeType AttributeType
const double & GetMean() const
void CopyAttributesFrom(const TSourceLabelObject *src)
void SetKurtosis(const double &v)
double m_WeightedFlatness
void SetMaximumIndex(const IndexType &v)
const HistogramType * GetHistogram() const
static constexpr AttributeType STANDARD_DEVIATION
This class stores measurement vectors in the context of n-dimensional histogram.
An image region represents a structured region of data.
void PrintSelf(std::ostream &os, Indent indent) const override
static constexpr AttributeType KURTOSIS
static constexpr AttributeType WEIGHTED_ELONGATION
Implements a weak reference to an object.
static constexpr AttributeType SKEWNESS
void Fill(const ValueType &)
static AttributeType GetAttributeFromName(const std::string &s)
void PrintSelf(std::ostream &os, Indent indent) const override
A Label object to store the common attributes related to the statistics of the object.
VectorType m_WeightedPrincipalMoments
typename Superclass::LengthType LengthType
const double & GetSum() const
void SetVariance(const double &v)
void SetSkewness(const double &v)
void SetHistogram(const HistogramType *v)
void SetSum(const double &v)
const double & GetMedian() const
AffineTransformPointer GetPhysicalAxesToWeightedPrincipalAxesTransform() const
static constexpr AttributeType MEAN
const double & GetKurtosis() const
const double & GetSkewness() const
MatrixType m_WeightedPrincipalAxes
const VectorType & GetWeightedPrincipalMoments() const
static AttributeType GetAttributeFromName(const std::string &s)
double m_StandardDeviation
static constexpr AttributeType MAXIMUM
Point< double, VImageDimension > CentroidType
A Label object to store the common attributes related to the shape of the object. ...
static constexpr unsigned int ImageDimension
void SetMinimumIndex(const IndexType &v)
const MatrixType & GetWeightedPrincipalAxes() const
static constexpr AttributeType MINIMUM_INDEX
const double & GetStandardDeviation() const
static constexpr AttributeType MEDIAN
typename Superclass::LineType LineType
typename LineType::LengthType LengthType
static constexpr AttributeType CENTER_OF_GRAVITY
PointType m_CenterOfGravity
void SetMinimum(const double &v)
void SetWeightedElongation(const double &v)
static constexpr AttributeType MINIMUM
The base class for the representation of an labeled binary object in an image.
static constexpr AttributeType WEIGHTED_PRINCIPAL_AXES
HistogramType::ConstPointer m_Histogram
void SetWeightedPrincipalAxes(const MatrixType &v)
void Fill(IndexValueType value)
static constexpr AttributeType WEIGHTED_PRINCIPAL_MOMENTS
const IndexType & GetMaximumIndex() const
const double & GetWeightedFlatness() const
typename AffineTransformType::Pointer AffineTransformPointer
const double & GetMaximum() const
Control indentation during Print() invocation.
void Fill(const T &value)
static constexpr AttributeType HISTOGRAM
AffineTransformPointer GetWeightedPrincipalAxesToPhysicalAxesTransform() const
Templated n-dimensional image to store labeled objects.
const double & GetMinimum() const
void SetWeightedFlatness(const double &v)
void SetCenterOfGravity(const PointType &v)
static constexpr AttributeType SUM
typename Superclass::LabelObjectType LabelObjectType
static std::string GetNameFromAttribute(const AttributeType &a)
double m_WeightedElongation
typename Superclass::AttributeType AttributeType
const double & GetVariance() const
void SetMean(const double &v)
void CopyAllFrom(const TSourceLabelObject *src)
const IndexType & GetMinimumIndex() const
const double & GetWeightedElongation() const
static constexpr AttributeType MAXIMUM_INDEX