|
ITK
5.1.0
Insight Toolkit
|
Go to the documentation of this file.
18 #ifndef itkStatisticsLabelObject_h
19 #define itkStatisticsLabelObject_h
41 template <
typename TLabel,
unsigned int VImageDimension>
108 else if (s ==
"Maximum")
112 else if (s ==
"Mean")
120 else if (s ==
"StandardDeviation")
124 else if (s ==
"Variance")
128 else if (s ==
"Median")
132 else if (s ==
"MaximumIndex")
136 else if (s ==
"MinimumIndex")
140 else if (s ==
"CenterOfGravity")
150 else if (s ==
"WeightedPrincipalMoments")
154 else if (s ==
"WeightedPrincipalAxes")
158 else if (s ==
"Kurtosis")
162 else if (s ==
"Skewness")
166 else if (s ==
"WeightedElongation")
170 else if (s ==
"Histogram")
174 else if (s ==
"WeightedFlatness")
200 return "StandardDeviation";
209 return "MaximumIndex";
212 return "MinimumIndex";
215 return "CenterOfGravity";
221 return "WeightedPrincipalMoments";
224 return "WeightedPrincipalAxes";
233 return "WeightedElongation";
239 return "WeightedFlatness";
250 template <
typename TSourceLabelObject>
254 Superclass::template CopyAttributesFrom<TSourceLabelObject>(src);
259 m_Sum = src->GetSum();
276 template <
typename TSourceLabelObject>
280 itkAssertOrThrowMacro((src !=
nullptr),
"Null Pointer");
281 this->
template CopyLinesFrom<TSourceLabelObject>(src);
282 this->
template CopyAttributesFrom<TSourceLabelObject>(src);
525 result->SetMatrix(matrix);
526 result->SetOffset(offset);
551 result->SetMatrix(matrix);
552 result->SetOffset(offset);
555 result->GetInverse(inverse);
588 os << indent <<
"Minimum: " <<
m_Minimum << std::endl;
589 os << indent <<
"Maximum: " <<
m_Maximum << std::endl;
590 os << indent <<
"Mean: " <<
m_Mean << std::endl;
591 os << indent <<
"Sum: " <<
m_Sum << std::endl;
593 os << indent <<
"Variance: " <<
m_Variance << std::endl;
594 os << indent <<
"Median: " <<
m_Median << std::endl;
595 os << indent <<
"Skewness: " <<
m_Skewness << std::endl;
596 os << indent <<
"Kurtosis: " <<
m_Kurtosis << std::endl;
605 itkPrintSelfObjectMacro(Histogram);
const double & GetKurtosis() const
typename Superclass::LengthType LengthType
typename LineType::LengthType LengthType
void SetWeightedPrincipalAxes(const MatrixType &v)
static constexpr unsigned int ImageDimension
const MatrixType & GetWeightedPrincipalAxes() const
static constexpr AttributeType SKEWNESS
void SetHistogram(const HistogramType *v)
void Fill(const T &value)
void SetKurtosis(const double &v)
void SetSum(const double &v)
static AttributeType GetAttributeFromName(const std::string &s)
AffineTransformPointer GetPhysicalAxesToWeightedPrincipalAxesTransform() const
An image region represents a structured region of data.
static constexpr AttributeType MEDIAN
typename AffineTransformType::Pointer AffineTransformPointer
static constexpr AttributeType MAXIMUM
A Label object to store the common attributes related to the statistics of the object.
void SetWeightedElongation(const double &v)
static constexpr AttributeType WEIGHTED_PRINCIPAL_MOMENTS
static constexpr AttributeType WEIGHTED_FLATNESS
void SetMaximum(const double &v)
void CopyAttributesFrom(const TSourceLabelObject *src)
double m_StandardDeviation
void SetMinimum(const double &v)
Control indentation during Print() invocation.
static constexpr AttributeType WEIGHTED_ELONGATION
static constexpr AttributeType MEAN
static constexpr AttributeType MINIMUM
void PrintSelf(std::ostream &os, Indent indent) const override
typename Superclass::LineType LineType
void Fill(IndexValueType value)
Matrix< double, Self::ImageDimension, Self::ImageDimension > MatrixType
MatrixType m_WeightedPrincipalAxes
const IndexType & GetMaximumIndex() const
Templated n-dimensional image to store labeled objects.
PointType m_CenterOfGravity
static constexpr AttributeType WEIGHTED_PRINCIPAL_AXES
const double & GetStandardDeviation() const
static AttributeType GetAttributeFromName(const std::string &s)
This class stores measurement vectors in the context of n-dimensional histogram.
const VectorType & GetWeightedPrincipalMoments() const
void SetWeightedFlatness(const double &v)
double m_WeightedFlatness
Light weight base class for most itk classes.
typename Superclass::IndexType IndexType
const double & GetWeightedElongation() const
static constexpr AttributeType STANDARD_DEVIATION
static std::string GetNameFromAttribute(const AttributeType &a)
The base class for the representation of an labeled binary object in an image.
Statistics::Histogram< double > HistogramType
const PointType & GetCenterOfGravity() const
const double & GetMaximum() const
void SetMedian(const double &v)
void SetSkewness(const double &v)
const double & GetMinimum() const
const double & GetMedian() const
const HistogramType * GetHistogram() const
void SetWeightedPrincipalMoments(const VectorType &v)
static constexpr AttributeType KURTOSIS
Vector< double, Self::ImageDimension > VectorType
void SetMean(const double &v)
typename AffineTransformType::Pointer AffineTransformPointer
const double & GetSum() const
const double & GetVariance() const
void SetMinimumIndex(const IndexType &v)
typename Superclass::LabelObjectType LabelObjectType
const double & GetWeightedFlatness() const
typename Superclass::IndexType IndexType
double m_WeightedElongation
void SetStandardDeviation(const double &v)
static constexpr AttributeType MINIMUM_INDEX
static constexpr AttributeType HISTOGRAM
Implements a weak reference to an object.
static constexpr AttributeType SUM
AffineTransformPointer GetWeightedPrincipalAxesToPhysicalAxesTransform() const
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Point< double, Self::ImageDimension > PointType
VectorType m_WeightedPrincipalMoments
A Label object to store the common attributes related to the shape of the object.
static constexpr AttributeType VARIANCE
const double & GetMean() const
static constexpr AttributeType MAXIMUM_INDEX
static std::string GetNameFromAttribute(const AttributeType &a)
typename Superclass::AttributeType AttributeType
const IndexType & GetMinimumIndex() const
void SetVariance(const double &v)
void SetMaximumIndex(const IndexType &v)
Point< double, VImageDimension > CentroidType
typename Superclass::AttributeType AttributeType
void CopyAllFrom(const TSourceLabelObject *src)
static constexpr AttributeType CENTER_OF_GRAVITY
HistogramType::ConstPointer m_Histogram
void PrintSelf(std::ostream &os, Indent indent) const override
const double & GetSkewness() const
void SetCenterOfGravity(const PointType &v)
void Fill(const ValueType &)