ITK
4.13.0
Insight Segmentation and Registration 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 lenghts, 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 http://www.insight-journal.org/browse/publication/301 https://hdl.handle.net/1926/1493
Definition at line 78 of file itkLabelGeometryImageFilter.h.
Classes | |
class | LabelGeometry |
Public Types | |
typedef itk::FixedArray < RealType, itkGetStaticConstMacro(ImageDimension) > | AxesLengthType |
typedef std::vector < LabelPointType > | BoundingBoxVerticesType |
typedef SmartPointer< const Self > | ConstPointer |
typedef DataObject::Pointer | DataObjectPointer |
typedef itk::FixedArray < typename LabelIndexType::IndexValueType, itkGetStaticConstMacro(ImageDimension) > | IndexArrayType |
typedef TIntensityImage::IndexType | IndexType |
typedef TIntensityImage::Pointer | InputImagePointer |
typedef TIntensityImage | IntensityImageType |
typedef TLabelImage::Pointer | LabelImagePointer |
typedef TLabelImage | LabelImageType |
typedef TLabelImage::IndexType | LabelIndexType |
typedef std::vector < LabelIndexType > | LabelIndicesType |
typedef TLabelImage::PixelType | LabelPixelType |
typedef TLabelImage::PointType | LabelPointType |
typedef TLabelImage::RegionType | LabelRegionType |
typedef TLabelImage::SizeType | LabelSizeType |
typedef std::vector < LabelPixelType > | LabelsType |
typedef itksys::hash_map < LabelPixelType, LabelGeometry > ::const_iterator | MapConstIterator |
typedef itksys::hash_map < LabelPixelType, LabelGeometry >::iterator | MapIterator |
typedef itksys::hash_map < LabelPixelType, LabelGeometry > | MapType |
typedef vnl_matrix< double > | MatrixType |
typedef TIntensityImage::PixelType | PixelType |
typedef SmartPointer< Self > | Pointer |
typedef SimpleDataObjectDecorator < RealType > | RealObjectType |
typedef NumericTraits < PixelType >::RealType | RealType |
typedef TIntensityImage::RegionType | RegionType |
typedef LabelGeometryImageFilter | Self |
typedef TIntensityImage::SizeType | SizeType |
typedef ImageToImageFilter < TLabelImage, TIntensityImage > | Superclass |
typedef std::vector< double > | VectorType |
typedef itk::FixedArray < typename LabelIndexType::IndexValueType, itkGetStaticConstMacro(ImageDimension)*2 > | BoundingBoxType |
typedef itk::FixedArray< float, itkGetStaticConstMacro(ImageDimension)*2 > | BoundingBoxFloatType |
Public Types inherited from itk::ImageToImageFilter< TLabelImage, TIntensityImage > | |
typedef SmartPointer< const Self > | ConstPointer |
typedef InputImageType::ConstPointer | InputImageConstPointer |
typedef InputImageType::PixelType | InputImagePixelType |
typedef InputImageType::Pointer | InputImagePointer |
typedef InputImageType::RegionType | InputImageRegionType |
typedef TLabelImage | InputImageType |
typedef Superclass::OutputImagePixelType | OutputImagePixelType |
typedef Superclass::OutputImageRegionType | OutputImageRegionType |
typedef SmartPointer< Self > | Pointer |
typedef ImageToImageFilter | Self |
typedef ImageSource < TIntensityImage > | Superclass |
Public Types inherited from itk::ImageSource< TIntensityImage > | |
typedef SmartPointer< const Self > | ConstPointer |
typedef Superclass::DataObjectIdentifierType | DataObjectIdentifierType |
typedef DataObject::Pointer | DataObjectPointer |
typedef Superclass::DataObjectPointerArraySizeType | DataObjectPointerArraySizeType |
typedef OutputImageType::PixelType | OutputImagePixelType |
typedef OutputImageType::Pointer | OutputImagePointer |
typedef OutputImageType::RegionType | OutputImageRegionType |
typedef TIntensityImage | OutputImageType |
typedef SmartPointer< Self > | Pointer |
typedef ImageSource | Self |
typedef ProcessObject | Superclass |
Public Types inherited from itk::ProcessObject | |
typedef SmartPointer< const Self > | ConstPointer |
typedef DataObject::DataObjectIdentifierType | DataObjectIdentifierType |
typedef DataObject::Pointer | DataObjectPointer |
typedef std::vector < DataObjectPointer > | DataObjectPointerArray |
typedef DataObjectPointerArray::size_type | DataObjectPointerArraySizeType |
typedef MultiThreader | MultiThreaderType |
typedef std::vector < DataObjectIdentifierType > | NameArray |
typedef SmartPointer< Self > | Pointer |
typedef ProcessObject | Self |
typedef Object | Superclass |
Public Types inherited from itk::Object | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef Object | Self |
typedef LightObject | Superclass |
Public Types inherited from itk::LightObject | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef LightObject | Self |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool flag) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Static Public Attributes | |
static const unsigned int | ImageDimension = TLabelImage::ImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TLabelImage, TIntensityImage > | |
static const unsigned int | InputImageDimension |
static const unsigned int | OutputImageDimension |
Static Public Attributes inherited from itk::ImageSource< TIntensityImage > | |
static const unsigned int | OutputImageDimension |
Private Member Functions | |
bool | CalculateOrientedBoundingBoxVertices (vnl_symmetric_eigensystem< double > eig, LabelGeometry &m_LabelGeometry) |
Additional Inherited Members | |
Protected Types inherited from itk::ImageToImageFilter< TLabelImage, TIntensityImage > | |
typedef ImageToImageFilterDetail::ImageRegionCopier < itkGetStaticConstMacro(OutputImageDimension), itkGetStaticConstMacro(InputImageDimension) > | InputToOutputRegionCopierType |
typedef ImageToImageFilterDetail::ImageRegionCopier < itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) > | OutputToInputRegionCopierType |
Static Protected Member Functions inherited from itk::ImageSource< TIntensityImage > | |
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_TYPE | ThreaderCallback (void *arg) |
Protected Attributes inherited from itk::ProcessObject | |
TimeStamp | m_OutputInformationMTime |
bool | m_Updating |
Protected Attributes inherited from itk::LightObject | |
AtomicInt< int > | m_ReferenceCount |
typedef itk::FixedArray< RealType, itkGetStaticConstMacro(ImageDimension) > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::AxesLengthType |
Axes Length-related typedefs
Definition at line 137 of file itkLabelGeometryImageFilter.h.
typedef itk::FixedArray< float, itkGetStaticConstMacro(ImageDimension) *2 > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::BoundingBoxFloatType |
Bounding Box-related typedefs
Definition at line 128 of file itkLabelGeometryImageFilter.h.
typedef itk::FixedArray< typename LabelIndexType::IndexValueType, itkGetStaticConstMacro(ImageDimension) *2 > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::BoundingBoxType |
Bounding Box-related typedefs
Definition at line 126 of file itkLabelGeometryImageFilter.h.
typedef std::vector< LabelPointType > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::BoundingBoxVerticesType |
Definition at line 134 of file itkLabelGeometryImageFilter.h.
typedef SmartPointer< const Self > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::ConstPointer |
Definition at line 86 of file itkLabelGeometryImageFilter.h.
typedef DataObject::Pointer itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::DataObjectPointer |
Smart Pointer type to a DataObject.
Definition at line 119 of file itkLabelGeometryImageFilter.h.
typedef itk::FixedArray< typename LabelIndexType::IndexValueType, itkGetStaticConstMacro(ImageDimension) > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::IndexArrayType |
Index array typedefs
Definition at line 141 of file itkLabelGeometryImageFilter.h.
typedef TIntensityImage::IndexType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::IndexType |
Definition at line 99 of file itkLabelGeometryImageFilter.h.
typedef TIntensityImage::Pointer itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::InputImagePointer |
Definition at line 96 of file itkLabelGeometryImageFilter.h.
typedef TIntensityImage itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::IntensityImageType |
Image related typedefs.
Definition at line 92 of file itkLabelGeometryImageFilter.h.
typedef TLabelImage::Pointer itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelImagePointer |
Definition at line 104 of file itkLabelGeometryImageFilter.h.
typedef TLabelImage itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelImageType |
Label image related typedefs.
Definition at line 103 of file itkLabelGeometryImageFilter.h.
typedef TLabelImage::IndexType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelIndexType |
Definition at line 107 of file itkLabelGeometryImageFilter.h.
typedef std::vector< LabelIndexType > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelIndicesType |
vector of indices
Definition at line 147 of file itkLabelGeometryImageFilter.h.
typedef TLabelImage::PixelType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelPixelType |
Definition at line 108 of file itkLabelGeometryImageFilter.h.
typedef TLabelImage::PointType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelPointType |
Definition at line 109 of file itkLabelGeometryImageFilter.h.
typedef TLabelImage::RegionType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelRegionType |
Definition at line 105 of file itkLabelGeometryImageFilter.h.
typedef TLabelImage::SizeType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelSizeType |
Definition at line 106 of file itkLabelGeometryImageFilter.h.
typedef std::vector< LabelPixelType > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::LabelsType |
vector of labels
Definition at line 144 of file itkLabelGeometryImageFilter.h.
typedef itksys::hash_map< LabelPixelType, LabelGeometry >::const_iterator itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::MapConstIterator |
Definition at line 252 of file itkLabelGeometryImageFilter.h.
typedef itksys::hash_map< LabelPixelType, LabelGeometry >::iterator itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::MapIterator |
Definition at line 251 of file itkLabelGeometryImageFilter.h.
typedef itksys::hash_map< LabelPixelType, LabelGeometry > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::MapType |
Type of the map used to store data per label
Definition at line 250 of file itkLabelGeometryImageFilter.h.
typedef vnl_matrix< double > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::MatrixType |
Matrix type
Definition at line 153 of file itkLabelGeometryImageFilter.h.
typedef TIntensityImage::PixelType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::PixelType |
Definition at line 100 of file itkLabelGeometryImageFilter.h.
typedef SmartPointer< Self > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::Pointer |
Definition at line 85 of file itkLabelGeometryImageFilter.h.
typedef SimpleDataObjectDecorator< RealType > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::RealObjectType |
Type of DataObjects used for scalar outputs
Definition at line 122 of file itkLabelGeometryImageFilter.h.
typedef NumericTraits< PixelType >::RealType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::RealType |
Type to use for computations.
Definition at line 116 of file itkLabelGeometryImageFilter.h.
typedef TIntensityImage::RegionType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::RegionType |
Definition at line 97 of file itkLabelGeometryImageFilter.h.
typedef LabelGeometryImageFilter itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::Self |
Standard Self typedef
Definition at line 83 of file itkLabelGeometryImageFilter.h.
typedef TIntensityImage::SizeType itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::SizeType |
Definition at line 98 of file itkLabelGeometryImageFilter.h.
typedef ImageToImageFilter< TLabelImage, TIntensityImage > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::Superclass |
Definition at line 84 of file itkLabelGeometryImageFilter.h.
typedef std::vector< double > itk::LabelGeometryImageFilter< TLabelImage, TIntensityImage >::VectorType |
Vector type
Definition at line 150 of file itkLabelGeometryImageFilter.h.
|
protected |
|
inlineprotected |
Definition at line 470 of file itkLabelGeometryImageFilter.h.
|
virtual |
|
virtual |
|
private |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
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::Object.
|
overrideprotectedvirtual |
A version of GenerateData() specific for image processing filters. This implementation will split the processing across multiple threads. The buffer is allocated by this method. Then the BeforeThreadedGenerateData() method is called (if provided). Then, a series of threads are spawned each calling ThreadedGenerateData(). After all the threads have completed processing, the AfterThreadedGenerateData() method is called (if provided). If an image processing filter cannot be threaded, the filter should provide an implementation of GenerateData(). That implementation is responsible for allocating the output buffer. If a filter an be threaded, it should NOT provide a GenerateData() method but should provide a ThreadedGenerateData() instead.
Reimplemented from itk::ImageSource< TIntensityImage >.
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 number of pixels for all labels. 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 368 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.
|
virtual |
Runtime information support.
Reimplemented from itk::ImageToImageFilter< TLabelImage, TIntensityImage >.
|
inline |
Definition at line 362 of file itkLabelGeometryImageFilter.h.
|
inline |
Get the number of labels used
Definition at line 357 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::ImageToImageFilter< TLabelImage, TIntensityImage >.
|
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 257 of file itkLabelGeometryImageFilter.h.
|
inline |
Set the intensity image
Definition at line 337 of file itkLabelGeometryImageFilter.h.
|
static |
Image related typedefs.
Definition at line 113 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 487 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 481 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 483 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 482 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 480 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 486 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 485 of file itkLabelGeometryImageFilter.h.
|
private |
Definition at line 489 of file itkLabelGeometryImageFilter.h.