#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 44 of file itkShapeLabelObject.h.
Inheritance diagram for itk::ShapeLabelObject< TLabel, VImageDimension >:
Collaboration diagram for itk::ShapeLabelObject< TLabel, VImageDimension >:Public Member Functions | |
| template<typename TSourceLabelObject> | |
| void | CopyAllFrom (const TSourceLabelObject *src) |
| template<typename TSourceLabelObject> | |
| void | CopyAttributesFrom (const TSourceLabelObject *src) |
| virtual::itk::LightObject::Pointer | CreateAnother () const |
| 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 |
| virtual const char * | GetNameOfClass () const |
| 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 |
| AffineTransformPointer | GetPhysicalAxesToPrincipalAxesTransform () const |
| const double & | GetPhysicalSize () const |
| const MatrixType & | GetPrincipalAxes () const |
| AffineTransformPointer | GetPrincipalAxesToPhysicalAxesTransform () 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) |
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 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 628 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 627 of file itkShapeLabelObject.h.
| using itk::LabelObject< TLabel, VImageDimension >::AttributeType |
Definition at line 90 of file itkLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::CentroidType = Point<double, VImageDimension> |
Definition at line 320 of file itkShapeLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::ConstPointer = SmartPointer<const Self> |
Definition at line 54 of file itkShapeLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::ConstWeakPointer = WeakPointer<const Self> |
Definition at line 55 of file itkShapeLabelObject.h.
| using itk::LabelObject< TLabel, VImageDimension >::IndexType |
Definition at line 85 of file itkLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::LabelMapType = LabelMap<Self> |
Definition at line 63 of file itkShapeLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::LabelObjectType = typename Superclass::LabelObjectType |
Definition at line 52 of file itkShapeLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::LabelType = TLabel |
Definition at line 69 of file itkShapeLabelObject.h.
| using itk::LabelObject< TLabel, VImageDimension >::LengthType |
Definition at line 89 of file itkLabelObject.h.
| using itk::LabelObject< TLabel, VImageDimension >::LineType |
Definition at line 88 of file itkLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::MatrixType = Matrix<double, VImageDimension, VImageDimension> |
Definition at line 322 of file itkShapeLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::OrientedBoundingBoxDirectionType = MatrixType |
Definition at line 327 of file itkShapeLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::OrientedBoundingBoxPointType = Point<double, VImageDimension> |
Definition at line 329 of file itkShapeLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::OrientedBoundingBoxSizeType = Vector<double, VImageDimension> |
Definition at line 331 of file itkShapeLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::OrientedBoundingBoxVerticesType |
Definition at line 333 of file itkShapeLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::Pointer = SmartPointer<Self> |
Definition at line 53 of file itkShapeLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::RegionType = ImageRegion<VImageDimension> |
Definition at line 318 of file itkShapeLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::Self = ShapeLabelObject |
Standard class type aliases
Definition at line 50 of file itkShapeLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::Superclass = LabelObject<TLabel, VImageDimension> |
Definition at line 51 of file itkShapeLabelObject.h.
| using itk::ShapeLabelObject< TLabel, VImageDimension >::VectorType = Vector<double, VImageDimension> |
Definition at line 324 of file itkShapeLabelObject.h.
|
inlineprotected |
Definition at line 720 of file itkShapeLabelObject.h.
|
inline |
Definition at line 712 of file itkShapeLabelObject.h.
|
inline |
Definition at line 685 of file itkShapeLabelObject.h.
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::LabelObject< TLabel, VImageDimension >.
Reimplemented in itk::StatisticsLabelObject< TLabel, VImageDimension >, itk::StatisticsLabelObject< InputImagePixelType, Self::ImageDimension >, itk::StatisticsLabelObject< InputImagePixelType, Self::ImageDimension >, itk::StatisticsLabelObject< LabelType, Self::ImageDimension >, and itk::StatisticsLabelObject< LabelType, Self::ImageDimension >.
|
inlinestatic |
Definition at line 165 of file itkShapeLabelObject.h.
Referenced by itk::StatisticsLabelObject< LabelType, Self::ImageDimension >::GetAttributeFromName().
|
inline |
Definition at line 338 of file itkShapeLabelObject.h.
|
inline |
Definition at line 374 of file itkShapeLabelObject.h.
|
inlinenodiscard |
Definition at line 446 of file itkShapeLabelObject.h.
|
inline |
Definition at line 506 of file itkShapeLabelObject.h.
|
inlinenodiscard |
Definition at line 494 of file itkShapeLabelObject.h.
|
inlinenodiscard |
Definition at line 482 of file itkShapeLabelObject.h.
|
inlinenodiscard |
Definition at line 410 of file itkShapeLabelObject.h.
|
inlinenodiscard |
Definition at line 518 of file itkShapeLabelObject.h.
|
inlinestatic |
Definition at line 248 of file itkShapeLabelObject.h.
Referenced by itk::StatisticsLabelObject< LabelType, Self::ImageDimension >::GetNameFromAttribute().
|
virtual |
Reimplemented from itk::LabelObject< TLabel, VImageDimension >.
Reimplemented in itk::StatisticsLabelObject< TLabel, VImageDimension >, itk::StatisticsLabelObject< InputImagePixelType, Self::ImageDimension >, itk::StatisticsLabelObject< InputImagePixelType, Self::ImageDimension >, itk::StatisticsLabelObject< LabelType, Self::ImageDimension >, and itk::StatisticsLabelObject< LabelType, Self::ImageDimension >.
|
inlinenodiscard |
Definition at line 362 of file itkShapeLabelObject.h.
|
inlinenodiscard |
Definition at line 386 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 579 of file itkShapeLabelObject.h.
|
inline |
Definition at line 542 of file itkShapeLabelObject.h.
|
inline |
Definition at line 554 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 595 of file itkShapeLabelObject.h.
|
inlinenodiscard |
Definition at line 458 of file itkShapeLabelObject.h.
|
inlinenodiscard |
Definition at line 398 of file itkShapeLabelObject.h.
|
inlinenodiscard |
Definition at line 530 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.
|
inlinenodiscard |
Definition at line 350 of file itkShapeLabelObject.h.
|
inline |
Definition at line 434 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 634 of file itkShapeLabelObject.h.
|
inline |
Definition at line 422 of file itkShapeLabelObject.h.
|
inline |
Get the BoundingBox as an ImageRegion.
Definition at line 570 of file itkShapeLabelObject.h.
|
inlinenodiscard |
Definition at line 470 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 >, itk::StatisticsLabelObject< InputImagePixelType, Self::ImageDimension >, itk::StatisticsLabelObject< InputImagePixelType, Self::ImageDimension >, itk::StatisticsLabelObject< LabelType, Self::ImageDimension >, and itk::StatisticsLabelObject< LabelType, Self::ImageDimension >.
Definition at line 732 of file itkShapeLabelObject.h.
Referenced by itk::StatisticsLabelObject< LabelType, Self::ImageDimension >::PrintSelf().
|
inline |
Definition at line 344 of file itkShapeLabelObject.h.
|
inline |
Definition at line 380 of file itkShapeLabelObject.h.
|
inline |
Definition at line 452 of file itkShapeLabelObject.h.
|
inline |
Definition at line 512 of file itkShapeLabelObject.h.
|
inline |
Definition at line 500 of file itkShapeLabelObject.h.
|
inline |
Definition at line 488 of file itkShapeLabelObject.h.
|
inline |
Definition at line 416 of file itkShapeLabelObject.h.
|
inline |
Definition at line 524 of file itkShapeLabelObject.h.
|
inline |
Definition at line 368 of file itkShapeLabelObject.h.
|
inline |
Definition at line 392 of file itkShapeLabelObject.h.
|
inline |
Definition at line 548 of file itkShapeLabelObject.h.
|
inline |
Definition at line 560 of file itkShapeLabelObject.h.
|
inline |
Definition at line 464 of file itkShapeLabelObject.h.
|
inline |
Definition at line 404 of file itkShapeLabelObject.h.
|
inline |
Definition at line 536 of file itkShapeLabelObject.h.
|
inline |
Definition at line 356 of file itkShapeLabelObject.h.
|
inline |
Definition at line 440 of file itkShapeLabelObject.h.
|
inline |
Definition at line 428 of file itkShapeLabelObject.h.
|
inline |
Definition at line 476 of file itkShapeLabelObject.h.
|
staticconstexpr |
Definition at line 90 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 88 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 123 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 143 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 138 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 133 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 112 of file itkShapeLabelObject.h.
|
staticconstexpr |
Definition at line 145 of file itkShapeLabelObject.h.
|
staticconstexpr |
Definition at line 65 of file itkShapeLabelObject.h.
|
private |
Definition at line 758 of file itkShapeLabelObject.h.
|
private |
Definition at line 761 of file itkShapeLabelObject.h.
|
private |
Definition at line 767 of file itkShapeLabelObject.h.
|
private |
Definition at line 772 of file itkShapeLabelObject.h.
|
private |
Definition at line 771 of file itkShapeLabelObject.h.
|
private |
Definition at line 770 of file itkShapeLabelObject.h.
|
private |
Definition at line 764 of file itkShapeLabelObject.h.
|
private |
Definition at line 773 of file itkShapeLabelObject.h.
|
private |
Definition at line 759 of file itkShapeLabelObject.h.
|
private |
Definition at line 762 of file itkShapeLabelObject.h.
|
private |
Definition at line 777 of file itkShapeLabelObject.h.
|
private |
Definition at line 776 of file itkShapeLabelObject.h.
|
private |
Definition at line 768 of file itkShapeLabelObject.h.
|
private |
Definition at line 763 of file itkShapeLabelObject.h.
|
private |
Definition at line 774 of file itkShapeLabelObject.h.
|
private |
Definition at line 760 of file itkShapeLabelObject.h.
|
private |
Definition at line 766 of file itkShapeLabelObject.h.
|
private |
Definition at line 765 of file itkShapeLabelObject.h.
|
private |
Definition at line 769 of file itkShapeLabelObject.h.
|
staticconstexpr |
The number of pixels.
Definition at line 78 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 98 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 152 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 162 of file itkShapeLabelObject.h.
|
staticconstexpr |
The perimeter of the object.
Definition at line 126 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 107 of file itkShapeLabelObject.h.
|
staticconstexpr |
Definition at line 147 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 83 of file itkShapeLabelObject.h.
|
staticconstexpr |
BinaryPrincipalAxes contains the principal axes of the object.
Definition at line 118 of file itkShapeLabelObject.h.
|
staticconstexpr |
PrincipalMoments contains the principal moments.
Definition at line 115 of file itkShapeLabelObject.h.
|
staticconstexpr |
Definition at line 128 of file itkShapeLabelObject.h.