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";
250 const Self *src =
dynamic_cast< const Self *
>( lo );
251 if ( src == ITK_NULLPTR )
480 result->SetMatrix(matrix);
481 result->SetOffset(offset);
505 result->SetMatrix(matrix);
506 result->SetOffset(offset);
509 result->GetInverse(inverse);
541 os << indent <<
"Minimum: " <<
m_Minimum << std::endl;
542 os << indent <<
"Maximum: " <<
m_Maximum << std::endl;
543 os << indent <<
"Mean: " <<
m_Mean << std::endl;
544 os << indent <<
"Sum: " <<
m_Sum << std::endl;
546 os << indent <<
"Variance: " <<
m_Variance << std::endl;
547 os << indent <<
"Median: " <<
m_Median << std::endl;
548 os << indent <<
"Skewness: " <<
m_Skewness << std::endl;
549 os << indent <<
"Kurtosis: " <<
m_Kurtosis << std::endl;
558 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
void PrintSelf(std::ostream &os, Indent indent) const
AffineTransform< double, itkGetStaticConstMacro(ImageDimension) > AffineTransformType
static const AttributeType WEIGHTED_ELONGATION
static const AttributeType WEIGHTED_PRINCIPAL_MOMENTS
const double & GetMean() const
void SetKurtosis(const double &v)
double m_WeightedFlatness
void SetMaximumIndex(const IndexType &v)
const HistogramType * GetHistogram() const
void operator=(const Self &)
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.
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
virtual void CopyAttributesFrom(const LabelObjectType *lo)
static const AttributeType WEIGHTED_FLATNESS
static AttributeType GetAttributeFromName(const std::string &s)
Point< double, itkGetStaticConstMacro(ImageDimension) > PointType
static const AttributeType SUM
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
void PrintSelf(std::ostream &os, Indent indent) const
virtual void CopyAttributesFrom(const LabelObjectType *lo)
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
const IndexType & GetMinimumIndex() const
const double & GetWeightedElongation() const