18 #ifndef itkStatisticsLabelObject_h
19 #define itkStatisticsLabelObject_h
40 template<
typename TLabel,
unsigned int VImageDimension >
100 if ( s ==
"Minimum" )
104 else if ( s ==
"Maximum" )
108 else if ( s ==
"Mean" )
112 else if ( s ==
"Sum" )
116 else if ( s ==
"StandardDeviation" )
120 else if ( s ==
"Variance" )
124 else if ( s ==
"Median" )
128 else if ( s ==
"MaximumIndex" )
132 else if ( s ==
"MinimumIndex" )
136 else if ( s ==
"CenterOfGravity" )
146 else if ( s ==
"WeightedPrincipalMoments" )
150 else if ( s ==
"WeightedPrincipalAxes" )
154 else if ( s ==
"Kurtosis" )
158 else if ( s ==
"Skewness" )
162 else if ( s ==
"WeightedElongation" )
166 else if ( s ==
"Histogram" )
170 else if ( s ==
"WeightedFlatness" )
195 return "StandardDeviation";
204 return "MaximumIndex";
207 return "MinimumIndex";
210 return "CenterOfGravity";
216 return "WeightedPrincipalMoments";
219 return "WeightedPrincipalAxes";
228 return "WeightedElongation";
234 return "WeightedFlatness";
245 template<
typename TSourceLabelObject >
248 Superclass::template CopyAttributesFrom<TSourceLabelObject>(src);
253 m_Sum = src->GetSum();
270 template<
typename TSourceLabelObject >
273 itkAssertOrThrowMacro ( ( src != ITK_NULLPTR ),
"Null Pointer" );
274 this->
template CopyLinesFrom<TSourceLabelObject>( src );
275 this->
template CopyAttributesFrom<TSourceLabelObject>( src );
483 result->SetMatrix(matrix);
484 result->SetOffset(offset);
508 result->SetMatrix(matrix);
509 result->SetOffset(offset);
512 result->GetInverse(inverse);
544 os << indent <<
"Minimum: " <<
m_Minimum << std::endl;
545 os << indent <<
"Maximum: " <<
m_Maximum << std::endl;
546 os << indent <<
"Mean: " <<
m_Mean << std::endl;
547 os << indent <<
"Sum: " <<
m_Sum << std::endl;
549 os << indent <<
"Variance: " <<
m_Variance << std::endl;
550 os << indent <<
"Median: " <<
m_Median << std::endl;
551 os << indent <<
"Skewness: " <<
m_Skewness << std::endl;
552 os << indent <<
"Kurtosis: " <<
m_Kurtosis << std::endl;
561 itkPrintSelfObjectMacro( Histogram );
void SetMedian(const double &v)
static const AttributeType MAXIMUM
void SetWeightedPrincipalMoments(const VectorType &v)
SmartPointer< Self > Pointer
void SetStandardDeviation(const double &v)
Light weight base class for most itk classes.
static std::string GetNameFromAttribute(const AttributeType &a)
void SetMaximum(const double &v)
AffineTransformType::Pointer AffineTransformPointer
const PointType & GetCenterOfGravity() const
Superclass::AttributeType AttributeType
Superclass::LengthType LengthType
Superclass::LabelObjectType LabelObjectType
Point< double, VImageDimension > CentroidType
static const AttributeType MINIMUM_INDEX
AffineTransform< double, itkGetStaticConstMacro(ImageDimension) > AffineTransformType
static const AttributeType WEIGHTED_ELONGATION
static const AttributeType WEIGHTED_PRINCIPAL_MOMENTS
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
This class stores measurement vectors in the context of n-dimensional histogram.
static const AttributeType MINIMUM
An image region represents a structured region of data.
void PrintSelf(std::ostream &os, Indent indent) const override
static const AttributeType MEAN
Vector< double, itkGetStaticConstMacro(ImageDimension) > VectorType
Superclass::CentroidType CentroidType
Implements a weak reference to an object.
Superclass::LabelObjectType LabelObjectType
Superclass::LengthType LengthType
Statistics::Histogram< double > HistogramType
static const AttributeType MEDIAN
void Fill(const ValueType &)
AffineTransformPointer GetPhysicalAxesToWeightedPrincipalAxesTransform(void) const
static const AttributeType WEIGHTED_FLATNESS
static AttributeType GetAttributeFromName(const std::string &s)
Point< double, itkGetStaticConstMacro(ImageDimension) > PointType
static const AttributeType SUM
void PrintSelf(std::ostream &os, Indent indent) const override
ShapeLabelObject< TLabel, VImageDimension > Superclass
Superclass::IndexType IndexType
A Label object to store the common attributes related to the statistics of the object.
VectorType m_WeightedPrincipalMoments
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
static const AttributeType MAXIMUM_INDEX
const double & GetKurtosis() const
Matrix< double, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) > MatrixType
const double & GetSkewness() const
MatrixType m_WeightedPrincipalAxes
Superclass::AttributeType AttributeType
Superclass::LineType LineType
void Fill(IndexValueType value)
const VectorType & GetWeightedPrincipalMoments() const
static AttributeType GetAttributeFromName(const std::string &s)
double m_StandardDeviation
A Label object to store the common attributes related to the shape of the object. ...
ImageRegion< itkGetStaticConstMacro(ImageDimension) > RegionType
void SetMinimumIndex(const IndexType &v)
static const AttributeType CENTER_OF_GRAVITY
const MatrixType & GetWeightedPrincipalAxes() const
Superclass::LineType LineType
const double & GetStandardDeviation() const
PointType m_CenterOfGravity
void SetMinimum(const double &v)
WeakPointer< const Self > ConstWeakPointer
void SetWeightedElongation(const double &v)
static const unsigned int ImageDimension
StatisticsLabelObject Self
SmartPointer< const Self > ConstPointer
The base class for the representation of an labeled binary object in an image.
static const AttributeType WEIGHTED_PRINCIPAL_AXES
HistogramType::ConstPointer m_Histogram
void SetWeightedPrincipalAxes(const MatrixType &v)
LabelMap< Self > LabelMapType
static const AttributeType KURTOSIS
const IndexType & GetMaximumIndex() const
const double & GetWeightedFlatness() const
Superclass::IndexType IndexType
static const AttributeType VARIANCE
const double & GetMaximum() const
Control indentation during Print() invocation.
void Fill(const T &value)
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 std::string GetNameFromAttribute(const AttributeType &a)
static const AttributeType STANDARD_DEVIATION
double m_WeightedElongation
const double & GetVariance() const
void SetMean(const double &v)
static const AttributeType SKEWNESS
static const AttributeType HISTOGRAM
void CopyAllFrom(const TSourceLabelObject *src)
const IndexType & GetMinimumIndex() const
const double & GetWeightedElongation() const