ITK
6.0.0
Insight Toolkit
|
#include <itkLabelGeometryImageFilter.h>
Given a label map and an optional intensity image, compute geometric features.
This filter enables the measurement of geometric features of all objects in a labeled ND volume. This labeled volume can represent, for instance, a medical image segmented into different anatomical structures or a microscope image segmented into individual cells. This filter is closely related to the itkLabelStatisticsImageFilter, which measures statistics of image regions defined by a labeled mask such as min, max, and mean intensity, intensity standard deviation, and bounding boxes. This filter, however, measures the geometry of the labeled regions themselves.
It calculates features similar to the regionprops command of Matlab. The set of measurements that it enables include: volume, centroid, eigenvalues, eigenvectors, axes lengths, eccentricity, elongation, orientation, bounding box, oriented bounding box, and rotation matrix. These features are based solely on the labeled mask itself. It also calculates integrated intensity and weighted centroid, which are measured on an intensity image under the labeled mask. These features represent the set of currently calculated features, but the framework of the filter is designed so that it can be easily expanded to measure a wide variety of other features.
This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Information on the National Centers for Biomedical Computing can be obtained from http://commonfund.nih.gov/bioinformatics.
This filter was contributed in the Insight Journal paper: "A Label Geometry Image Filter for Multiple Object Measurement" by Padfield D., Miller J https://doi.org/10.54294/saa3nn
This class contains computational inefficiencies and bugs such as some attributes are not computed with respect to image geometry, consider using these supported alternatives:
Definition at line 81 of file itkLabelGeometryImageFilter.h.
Classes | |
class | LabelGeometry |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::ImageToImageFilter< TLabelImage, TLabelImage > | |
static double | GetGlobalDefaultCoordinateTolerance () |
static double | GetGlobalDefaultDirectionTolerance () |
static void | SetGlobalDefaultCoordinateTolerance (double) |
static void | SetGlobalDefaultDirectionTolerance (double) |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Static Public Attributes | |
static constexpr unsigned int | ImageDimension = TLabelImage::ImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TLabelImage, TLabelImage > | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
Static Public Attributes inherited from itk::ImageSource< TLabelImage > | |
static constexpr unsigned int | OutputImageDimension |
Private Member Functions | |
bool | CalculateOrientedBoundingBoxVertices (vnl_symmetric_eigensystem< double > eig, LabelGeometry &m_LabelGeometry) |
Private Attributes | |
LabelsType | m_AllLabels {} |
bool | m_CalculateOrientedBoundingBox {} |
bool | m_CalculateOrientedIntensityRegions {} |
bool | m_CalculateOrientedLabelRegions {} |
bool | m_CalculatePixelIndices {} |
LabelGeometry | m_LabelGeometry {} |
MapType | m_LabelGeometryMapper {} |
Additional Inherited Members | |
Protected Types inherited from itk::ImageToImageFilter< TLabelImage, TLabelImage > | |
using | InputToOutputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::OutputImageDimension, Self::InputImageDimension > |
using | OutputToInputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::InputImageDimension, Self::OutputImageDimension > |
Static Protected Member Functions inherited from itk::ImageSource< TLabelImage > | |
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
Static Protected Member Functions inherited from itk::ProcessObject | |
template<typename TSourceObject > | |
static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
static constexpr float | progressFixedToFloat (uint32_t fixed) |
static uint32_t | progressFloatToFixed (float f) |
Protected Attributes inherited from itk::ImageSource< TLabelImage > | |
bool | m_DynamicMultiThreading |
Protected Attributes inherited from itk::ProcessObject | |
TimeStamp | m_OutputInformationMTime {} |
bool | m_Updating {} |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount {} |
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::AxesLengthType = itk::FixedArray<RealType, Self::ImageDimension> |
Axes Length-related type alias
Definition at line 140 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::BoundingBoxFloatType = itk::FixedArray<float, Self::ImageDimension * 2> |
Definition at line 133 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::BoundingBoxType = itk::FixedArray<typename LabelIndexType::IndexValueType, Self::ImageDimension * 2> |
Bounding Box-related type alias
Definition at line 132 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::BoundingBoxVerticesType = std::vector<LabelPointType> |
Definition at line 137 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 94 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::DataObjectPointer = typename DataObject::Pointer |
Smart Pointer type to a DataObject.
Definition at line 126 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::IndexArrayType = itk::FixedArray<typename LabelIndexType::IndexValueType, Self::ImageDimension> |
Index array type alias
Definition at line 143 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::IndexType = typename TIntensityImage::IndexType |
Definition at line 107 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::InputImagePointer = typename TIntensityImage::Pointer |
Definition at line 104 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::IntensityImageType = TIntensityImage |
Image related type alias.
Definition at line 103 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelImagePointer = typename TLabelImage::Pointer |
Definition at line 112 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelImageType = TLabelImage |
Label image related type alias.
Definition at line 111 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelIndexType = typename TLabelImage::IndexType |
Definition at line 115 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelIndicesType = std::vector<LabelIndexType> |
vector of indices
Definition at line 149 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelPixelType = typename TLabelImage::PixelType |
Definition at line 116 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelPointType = typename TLabelImage::PointType |
Definition at line 117 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelRegionType = typename TLabelImage::RegionType |
Definition at line 113 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelSizeType = typename TLabelImage::SizeType |
Definition at line 114 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelsType = std::vector<LabelPixelType> |
vector of labels
Definition at line 146 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::MapConstIterator = typename std::map<LabelPixelType, LabelGeometry>::const_iterator |
Definition at line 253 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::MapIterator = typename std::map<LabelPixelType, LabelGeometry>::iterator |
Definition at line 252 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::MapType = std::map<LabelPixelType, LabelGeometry> |
Type of the map used to store data per label
Definition at line 251 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::MatrixType = vnl_matrix<double> |
Matrix type
Definition at line 155 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::PixelType = typename TIntensityImage::PixelType |
Definition at line 108 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::Pointer = SmartPointer<Self> |
Definition at line 93 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::RealObjectType = SimpleDataObjectDecorator<RealType> |
Type of DataObjects used for scalar outputs
Definition at line 129 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::RealType = typename NumericTraits<PixelType>::RealType |
Type to use for computations.
Definition at line 123 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::RegionType = typename TIntensityImage::RegionType |
Definition at line 105 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::Self = LabelGeometryImageFilter |
Standard Self type alias
Definition at line 91 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::SizeType = typename TIntensityImage::SizeType |
Definition at line 106 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::Superclass = ImageToImageFilter<TLabelImage, TIntensityImage> |
Definition at line 92 of file itkLabelGeometryImageFilter.h.
using itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::VectorType = std::vector<double> |
Vector type
Definition at line 152 of file itkLabelGeometryImageFilter.h.
|
protected |
|
overrideprotecteddefault |
|
virtual |
|
private |
|
virtual |
|
virtual |
|
virtual |
|
overrideprotectedvirtual |
This method causes the filter to generate its output.
Reimplemented from itk::ProcessObject.
AxesLengthType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetAxesLength | ( | LabelPixelType | label | ) | const |
Return the axes length for a label.
BoundingBoxType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetBoundingBox | ( | LabelPixelType | label | ) | const |
Return the computed bounding box for a label. This is organized in min/max pairs as [min(X), max(X), min(Y), max(Y), min(Z), max(Z),...]
LabelSizeType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetBoundingBoxSize | ( | LabelPixelType | label | ) | const |
Return the size of the bounding box.
RealType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetBoundingBoxVolume | ( | LabelPixelType | label | ) | const |
Return the volume of the bounding box.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
LabelPointType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetCentroid | ( | LabelPixelType | label | ) | const |
Return the unweighted centroid for a label.
RealType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetEccentricity | ( | LabelPixelType | label | ) | const |
Return the eccentricity for a label.
VectorType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetEigenvalues | ( | LabelPixelType | label | ) | const |
Return the eigenvalues as a vector.
MatrixType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetEigenvectors | ( | LabelPixelType | label | ) | const |
Return the eigenvectors as a matrix.
RealType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetElongation | ( | LabelPixelType | label | ) | const |
Return the elongation for a label. This is defined as the length of the major axis divided by the length of the minor axis.
RealType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetIntegratedIntensity | ( | LabelPixelType | label | ) | const |
Return the computed integrated pixel intensity for a label.
|
inline |
Get the label image
Definition at line 344 of file itkLabelGeometryImageFilter.h.
References itk::ProcessObject::GetInput().
|
inline |
Get the labels that are in the image.
Definition at line 359 of file itkLabelGeometryImageFilter.h.
RealType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetMajorAxisLength | ( | LabelPixelType | label | ) | const |
Return the major axis length for a label. This is a convenience class that returns the longest length from GetAxesLength.
RealType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetMinorAxisLength | ( | LabelPixelType | label | ) | const |
Return the minor axis length for a label. This is a convenience class that returns the shortest length from GetAxesLength.
|
overridevirtual |
Reimplemented from itk::ProcessObject.
|
inline |
Definition at line 356 of file itkLabelGeometryImageFilter.h.
|
inline |
Get the number of labels used
Definition at line 354 of file itkLabelGeometryImageFilter.h.
RealType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetOrientation | ( | LabelPixelType | label | ) | const |
Return the orientation for a label defined in radians.
LabelPointType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetOrientedBoundingBoxOrigin | ( | LabelPixelType | label | ) | const |
Return the origin of the oriented bounding box.
LabelPointType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetOrientedBoundingBoxSize | ( | LabelPixelType | label | ) | const |
Return the size of the oriented bounding box.
BoundingBoxVerticesType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetOrientedBoundingBoxVertices | ( | LabelPixelType | label | ) | const |
Return the oriented bounding box vertices. The order of the vertices corresponds with binary counting, where min is zero and max is one. 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]. Each vertex is defined as an ND point.
RealType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetOrientedBoundingBoxVolume | ( | LabelPixelType | label | ) | const |
Return the volume of the oriented bounding box.
TIntensityImage * itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetOrientedIntensityImage | ( | LabelPixelType | label | ) | const |
Return the intensity region defined by the oriented bounding box.
TLabelImage * itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetOrientedLabelImage | ( | LabelPixelType | label | ) | const |
Return the label region defined by the oriented bounding box.
LabelIndicesType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetPixelIndices | ( | LabelPixelType | label | ) | const |
Return the all pixel indices for a label.
RegionType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetRegion | ( | LabelPixelType | label | ) | const |
Return the region defined by the bounding box.
MatrixType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetRotationMatrix | ( | LabelPixelType | label | ) | const |
Return the rotation matrix defined by the eigenvalues/eigenvectors.
SizeValueType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetVolume | ( | LabelPixelType | label | ) | const |
Return the number of pixels for a label. This is the same as the volume and the zero order moment
LabelPointType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::GetWeightedCentroid | ( | LabelPixelType | label | ) | const |
Return the weighted centroid for a label.
|
inline |
Does the specified label exist? Can only be called after a call to Update().
Definition at line 351 of file itkLabelGeometryImageFilter.h.
|
static |
Method for creation through the object factory.
|
overrideprotectedvirtual |
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::ProcessObject.
|
inline |
Definition at line 284 of file itkLabelGeometryImageFilter.h.
|
inline |
Definition at line 320 of file itkLabelGeometryImageFilter.h.
|
inline |
Definition at line 302 of file itkLabelGeometryImageFilter.h.
|
inline |
Definition at line 258 of file itkLabelGeometryImageFilter.h.
|
inline |
Set the intensity image
Definition at line 337 of file itkLabelGeometryImageFilter.h.
|
staticconstexpr |
Image related type alias.
Definition at line 120 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 469 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 463 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 465 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 464 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 462 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 468 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 467 of file itkLabelGeometryImageFilter.h.