ITK
6.0.0
Insight Toolkit
|
#include <itkShapeLabelObject.h>
A Label object to store the common attributes related to the shape of the object.
ShapeLabelObject stores the common attributes related to the shape of the object
This implementation was taken from the Insight Journal paper: https://doi.org/10.54294/q6auw4
Definition at line 43 of file itkShapeLabelObject.h.
Public Member Functions | |
template<typename TSourceLabelObject > | |
void | CopyAllFrom (const TSourceLabelObject *src) |
template<typename TSourceLabelObject > | |
void | CopyAttributesFrom (const TSourceLabelObject *src) |
const RegionType & | GetBoundingBox () const |
const CentroidType & | GetCentroid () const |
const double & | GetElongation () const |
const VectorType & | GetEquivalentEllipsoidDiameter () const |
const double & | GetEquivalentSphericalPerimeter () const |
const double & | GetEquivalentSphericalRadius () const |
const double & | GetFeretDiameter () const |
const double & | GetFlatness () const |
const char * | GetNameOfClass () const override |
const SizeValueType & | GetNumberOfPixels () const |
const SizeValueType & | GetNumberOfPixelsOnBorder () const |
const OrientedBoundingBoxDirectionType & | GetOrientedBoundingBoxDirection () const |
const OrientedBoundingBoxPointType & | GetOrientedBoundingBoxOrigin () const |
const OrientedBoundingBoxSizeType & | GetOrientedBoundingBoxSize () const |
OrientedBoundingBoxVerticesType | GetOrientedBoundingBoxVertices () const |
const double & | GetPerimeter () const |
const double & | GetPerimeterOnBorder () const |
const double & | GetPerimeterOnBorderRatio () const |
const double & | GetPhysicalSize () const |
const MatrixType & | GetPrincipalAxes () const |
const VectorType & | GetPrincipalMoments () const |
const RegionType & | GetRegion () const |
const double & | GetRoundness () const |
void | SetBoundingBox (const RegionType &v) |
void | SetCentroid (const CentroidType ¢roid) |
void | SetElongation (const double v) |
void | SetEquivalentEllipsoidDiameter (const VectorType &v) |
void | SetEquivalentSphericalPerimeter (const double v) |
void | SetEquivalentSphericalRadius (const double v) |
void | SetFeretDiameter (const double v) |
void | SetFlatness (const double v) |
void | SetNumberOfPixels (const SizeValueType &v) |
void | SetNumberOfPixelsOnBorder (const SizeValueType &v) |
void | SetOrientedBoundingBoxOrigin (const OrientedBoundingBoxPointType &v) |
void | SetOrientedBoundingBoxSize (const OrientedBoundingBoxSizeType &v) |
void | SetPerimeter (const double v) |
void | SetPerimeterOnBorder (const double v) |
void | SetPerimeterOnBorderRatio (const double v) |
void | SetPhysicalSize (const double v) |
void | SetPrincipalAxes (const MatrixType &v) |
void | SetPrincipalMoments (const VectorType &v) |
void | SetRoundness (const double v) |
AffineTransformPointer | GetPrincipalAxesToPhysicalAxesTransform () const |
AffineTransformPointer | GetPhysicalAxesToPrincipalAxesTransform () const |
Public Member Functions inherited from itk::LabelObject< TLabel, VImageDimension > | |
void | AddIndex (const IndexType &idx) |
void | AddLine (const IndexType &idx, const LengthType &length) |
void | AddLine (const LineType &line) |
void | Clear () |
template<typename TSourceLabelObject > | |
void | CopyAllFrom (const TSourceLabelObject *src) |
template<typename TSourceLabelObject > | |
void | CopyAttributesFrom (const TSourceLabelObject *src) |
template<typename TSourceLabelObject > | |
void | CopyLinesFrom (const TSourceLabelObject *src) |
bool | Empty () const |
IndexType | GetIndex (SizeValueType offset) const |
const LabelType & | GetLabel () const |
LineType & | GetLine (SizeValueType i) |
const LineType & | GetLine (SizeValueType i) const |
SizeValueType | GetNumberOfLines () const |
bool | HasIndex (const IndexType &idx) const |
void | Optimize () |
bool | RemoveIndex (const IndexType &idx) |
void | SetLabel (const LabelType &label) |
void | Shift (OffsetType offset) |
SizeValueType | Size () const |
Public Member Functions inherited from itk::LightObject | |
Pointer | Clone () const |
virtual Pointer | CreateAnother () const |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
virtual void | Register () const |
virtual void | SetReferenceCount (int) |
virtual void | UnRegister () const noexcept |
Static Public Member Functions | |
static AttributeType | GetAttributeFromName (const std::string &s) |
static std::string | GetNameFromAttribute (const AttributeType &a) |
static Pointer | New () |
Static Public Member Functions inherited from itk::LabelObject< TLabel, VImageDimension > | |
static AttributeType | GetAttributeFromName (const std::string &s) |
static std::string | GetNameFromAttribute (const AttributeType &a) |
static Pointer | New () |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Protected Member Functions | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
ShapeLabelObject () | |
Protected Member Functions inherited from itk::LabelObject< TLabel, VImageDimension > | |
LabelObject () | |
Protected Member Functions inherited from itk::LightObject | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Private Attributes | |
RegionType | m_BoundingBox {} |
CentroidType | m_Centroid {} |
double | m_Elongation {} |
VectorType | m_EquivalentEllipsoidDiameter {} |
double | m_EquivalentSphericalPerimeter {} |
double | m_EquivalentSphericalRadius {} |
double | m_FeretDiameter {} |
double | m_Flatness {} |
SizeValueType | m_NumberOfPixels {} |
SizeValueType | m_NumberOfPixelsOnBorder {} |
OrientedBoundingBoxPointType | m_OrientedBoundingBoxOrigin {} |
OrientedBoundingBoxSizeType | m_OrientedBoundingBoxSize {} |
double | m_Perimeter {} |
double | m_PerimeterOnBorder {} |
double | m_PerimeterOnBorderRatio {} |
double | m_PhysicalSize {} |
MatrixType | m_PrincipalAxes {} |
VectorType | m_PrincipalMoments {} |
double | m_Roundness {} |
Additional Inherited Members | |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount {} |
using itk::ShapeLabelObject< TLabel, VImageDimension >::AffineTransformPointer = typename AffineTransformType::Pointer |
Definition at line 627 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::AffineTransformType = AffineTransform<double, VImageDimension> |
Affine transform for mapping to and from principal axis
Definition at line 626 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::CentroidType = Point<double, VImageDimension> |
Definition at line 319 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::ConstPointer = SmartPointer<const Self> |
Definition at line 53 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::ConstWeakPointer = WeakPointer<const Self> |
Definition at line 54 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::LabelMapType = LabelMap<Self> |
Definition at line 62 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::LabelObjectType = typename Superclass::LabelObjectType |
Definition at line 51 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::LabelType = TLabel |
Definition at line 68 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::MatrixType = Matrix<double, VImageDimension, VImageDimension> |
Definition at line 321 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::OrientedBoundingBoxDirectionType = MatrixType |
Definition at line 326 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::OrientedBoundingBoxPointType = Point<double, VImageDimension> |
Definition at line 328 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::OrientedBoundingBoxSizeType = Vector<double, VImageDimension> |
Definition at line 330 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::OrientedBoundingBoxVerticesType = FixedArray<OrientedBoundingBoxPointType, Math::UnsignedPower<unsigned int>(2, ImageDimension)> |
Definition at line 333 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::Pointer = SmartPointer<Self> |
Definition at line 52 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::RegionType = ImageRegion<VImageDimension> |
Definition at line 317 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::Self = ShapeLabelObject |
Standard class type aliases
Definition at line 49 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::Superclass = LabelObject<TLabel, VImageDimension> |
Definition at line 50 of file itkShapeLabelObject.h.
using itk::ShapeLabelObject< TLabel, VImageDimension >::VectorType = Vector<double, VImageDimension> |
Definition at line 323 of file itkShapeLabelObject.h.
|
inlineprotected |
Definition at line 721 of file itkShapeLabelObject.h.
|
inline |
Definition at line 713 of file itkShapeLabelObject.h.
|
inline |
Definition at line 686 of file itkShapeLabelObject.h.
|
inlinestatic |
Definition at line 164 of file itkShapeLabelObject.h.
|
inline |
Definition at line 337 of file itkShapeLabelObject.h.
|
inline |
Definition at line 373 of file itkShapeLabelObject.h.
|
inline |
Definition at line 445 of file itkShapeLabelObject.h.
|
inline |
Definition at line 505 of file itkShapeLabelObject.h.
|
inline |
Definition at line 493 of file itkShapeLabelObject.h.
|
inline |
Definition at line 481 of file itkShapeLabelObject.h.
|
inline |
Definition at line 409 of file itkShapeLabelObject.h.
|
inline |
Definition at line 517 of file itkShapeLabelObject.h.
|
inlinestatic |
Definition at line 247 of file itkShapeLabelObject.h.
|
overridevirtual |
Reimplemented from itk::LabelObject< TLabel, VImageDimension >.
Reimplemented in itk::StatisticsLabelObject< TLabel, VImageDimension >.
|
inline |
Definition at line 361 of file itkShapeLabelObject.h.
|
inline |
Definition at line 385 of file itkShapeLabelObject.h.
|
inline |
Get the direction matrix for the oriented bounding box coordinates. This is an alias for the principal axes.
Definition at line 578 of file itkShapeLabelObject.h.
|
inline |
Definition at line 541 of file itkShapeLabelObject.h.
|
inline |
Definition at line 553 of file itkShapeLabelObject.h.
|
inline |
Get an array of point vertices which define the corners of the oriented bounding box in physical space.
The first element in the array contains minimum coordinate values which correspond to the origin while the last contains the maximum. Use the index of the array in binary to determine min/max for the indexed vertex. For example, in 2D, binary counting will give[0,0], [0,1], [1,0], [1,1], which corresponds to [minX,minY], [minX,maxY], [maxX,minY], [maxX,maxY].
Definition at line 594 of file itkShapeLabelObject.h.
|
inline |
Definition at line 457 of file itkShapeLabelObject.h.
|
inline |
Definition at line 397 of file itkShapeLabelObject.h.
|
inline |
Definition at line 529 of file itkShapeLabelObject.h.
|
inline |
Get the affine transform from physical axes to principal axes This method returns an affine transform which transforms from the physical coordinate system to the principal axes coordinate system.
Definition at line 660 of file itkShapeLabelObject.h.
References New().
|
inline |
Definition at line 349 of file itkShapeLabelObject.h.
|
inline |
Definition at line 433 of file itkShapeLabelObject.h.
|
inline |
Get the affine transform from principal axes to physical axes This method returns an affine transform which transforms from the principal axes coordinate system to physical coordinates.
Definition at line 633 of file itkShapeLabelObject.h.
References New().
|
inline |
Definition at line 421 of file itkShapeLabelObject.h.
|
inline |
Get the BoundingBox as an ImageRegion.
Definition at line 569 of file itkShapeLabelObject.h.
|
inline |
Definition at line 469 of file itkShapeLabelObject.h.
|
static |
Method for creation through the object factory.
|
inlineoverrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::LabelObject< TLabel, VImageDimension >.
Reimplemented in itk::StatisticsLabelObject< TLabel, VImageDimension >.
Definition at line 744 of file itkShapeLabelObject.h.
|
inline |
Definition at line 343 of file itkShapeLabelObject.h.
|
inline |
Definition at line 379 of file itkShapeLabelObject.h.
|
inline |
Definition at line 451 of file itkShapeLabelObject.h.
|
inline |
Definition at line 511 of file itkShapeLabelObject.h.
|
inline |
Definition at line 499 of file itkShapeLabelObject.h.
|
inline |
Definition at line 487 of file itkShapeLabelObject.h.
|
inline |
Definition at line 415 of file itkShapeLabelObject.h.
|
inline |
Definition at line 523 of file itkShapeLabelObject.h.
|
inline |
Definition at line 367 of file itkShapeLabelObject.h.
|
inline |
Definition at line 391 of file itkShapeLabelObject.h.
|
inline |
Definition at line 547 of file itkShapeLabelObject.h.
|
inline |
Definition at line 559 of file itkShapeLabelObject.h.
|
inline |
Definition at line 463 of file itkShapeLabelObject.h.
|
inline |
Definition at line 403 of file itkShapeLabelObject.h.
|
inline |
Definition at line 535 of file itkShapeLabelObject.h.
|
inline |
Definition at line 355 of file itkShapeLabelObject.h.
|
inline |
Definition at line 439 of file itkShapeLabelObject.h.
|
inline |
Definition at line 427 of file itkShapeLabelObject.h.
|
inline |
Definition at line 475 of file itkShapeLabelObject.h.
|
staticconstexpr |
Definition at line 89 of file itkShapeLabelObject.h.
|
staticconstexpr |
Centroid is the position of the center of the shape in physical coordinates. It is not constrained to be in the object, and thus can be outside if the object is not convex.
Definition at line 87 of file itkShapeLabelObject.h.
|
staticconstexpr |
Elongation is the ratio of the largest principal moment to the second largest principal moment. Its value is greater or equal to 1. Its type is double.
Definition at line 122 of file itkShapeLabelObject.h.
|
staticconstexpr |
EquivalentEllipsoidPerimeter is the size of the ellipsoid of the same size and the same ratio on all the axes than the label object. The value depends on the image spacing.
Definition at line 142 of file itkShapeLabelObject.h.
|
staticconstexpr |
EquivalentPerimeter is the equivalent perimeter of the hypersphere of the same size than the label object. The value depends on the image spacing. Its type is double.
Definition at line 137 of file itkShapeLabelObject.h.
|
staticconstexpr |
EquivalentRadius is the equivalent radius of the hypersphere of the same size than the label object. The value depends on the image spacing. Its type is double.
Definition at line 132 of file itkShapeLabelObject.h.
|
staticconstexpr |
FeretDiameter is the diameter in physical units of the sphere which include all the object. The feret diameter is not computed by default, because of its high computation. Its type is double.
Definition at line 111 of file itkShapeLabelObject.h.
|
staticconstexpr |
Definition at line 144 of file itkShapeLabelObject.h.
|
staticconstexpr |
Definition at line 64 of file itkShapeLabelObject.h.
|
private |
Definition at line 778 of file itkShapeLabelObject.h.
|
private |
Definition at line 781 of file itkShapeLabelObject.h.
|
private |
Definition at line 787 of file itkShapeLabelObject.h.
|
private |
Definition at line 792 of file itkShapeLabelObject.h.
|
private |
Definition at line 791 of file itkShapeLabelObject.h.
|
private |
Definition at line 790 of file itkShapeLabelObject.h.
|
private |
Definition at line 784 of file itkShapeLabelObject.h.
|
private |
Definition at line 793 of file itkShapeLabelObject.h.
|
private |
Definition at line 779 of file itkShapeLabelObject.h.
|
private |
Definition at line 782 of file itkShapeLabelObject.h.
|
private |
Definition at line 797 of file itkShapeLabelObject.h.
|
private |
Definition at line 796 of file itkShapeLabelObject.h.
|
private |
Definition at line 788 of file itkShapeLabelObject.h.
|
private |
Definition at line 783 of file itkShapeLabelObject.h.
|
private |
Definition at line 794 of file itkShapeLabelObject.h.
|
private |
Definition at line 780 of file itkShapeLabelObject.h.
|
private |
Definition at line 786 of file itkShapeLabelObject.h.
|
private |
Definition at line 785 of file itkShapeLabelObject.h.
|
private |
Definition at line 789 of file itkShapeLabelObject.h.
|
staticconstexpr |
The number of pixels.
Definition at line 77 of file itkShapeLabelObject.h.
|
staticconstexpr |
NumberOfPixelsOnBorder is the number of pixels in the objects which are on the border of the image. A pixel on several borders (a pixel in a corner) is counted only one time, so the size on border can't be greater than the size of the object. This attribute is particularly useful to remove the objects which are touching too much the border. Its type is unsigned long.
Definition at line 97 of file itkShapeLabelObject.h.
|
staticconstexpr |
Origin of the oriented bounding box defined by the principle axes, and the oriented bounding box size
Definition at line 151 of file itkShapeLabelObject.h.
|
staticconstexpr |
Size of the oriented bounding box defined by the principle axes, and the bounding box origin.
The combination of the OBB origin, OBB size and OBB direction ( principal axes ) defines a coordinate system suitable to use resample the OBB onto its own image.
Definition at line 161 of file itkShapeLabelObject.h.
|
staticconstexpr |
The perimeter of the object.
Definition at line 125 of file itkShapeLabelObject.h.
|
staticconstexpr |
PerimeterOnBorder is the physical size of the objects which are on the border of the image. In 2D, it is a distance, in 3D, a surface, etc. Contrary to the PhysicalSize attribute which is directly linked to the NumberOfPixels, this attribute is not directly linked to the NumberOfPixelsOnBorder attribute. This attribute is particularly useful to remove the objects which are touching too much the border. Its type is double.
Definition at line 106 of file itkShapeLabelObject.h.
|
staticconstexpr |
Definition at line 146 of file itkShapeLabelObject.h.
|
staticconstexpr |
PhysicalSize is the size of the object in physical units. It is equal to the NumberOfPixels multiplied by the physical pixel size. Its type is double.
Definition at line 82 of file itkShapeLabelObject.h.
|
staticconstexpr |
BinaryPrincipalAxes contains the principal axes of the object.
Definition at line 117 of file itkShapeLabelObject.h.
|
staticconstexpr |
PrincipalMoments contains the principal moments.
Definition at line 114 of file itkShapeLabelObject.h.
|
staticconstexpr |
Definition at line 127 of file itkShapeLabelObject.h.