Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkITKLabelShapeStatistics Class Reference

ITK-based utilities for calculating label statistics. Utilizes itk::LabelImageToShapeLabelMapFilter to calculate label shape statistics (https://itk.org/Doxygen/html/classitk_1_1LabelImageToShapeLabelMapFilter.html) Label centroid and flatness are the only statistics calculated by default. For a list of available parameters, see: vtkITKLabelShapeStatistics::ShapeStatistic Calculated statistics can be changed using the SetComputeShapeStatistic/ComputeShapeStatisticOn/ComputeShapeStatisticOff methods. Output statistics are represented in a vtkTable where each column represents a statistic and each row is a different label value. More...

#include <Libs/vtkITK/vtkITKLabelShapeStatistics.h>

Inheritance diagram for vtkITKLabelShapeStatistics:
Inheritance graph
[legend]
Collaboration diagram for vtkITKLabelShapeStatistics:
Collaboration graph
[legend]

Public Types

enum  ShapeStatistic {
  Centroid, OrientedBoundingBox, FeretDiameter, Perimeter,
  Roundness, Flatness, Elongation, PrincipalMoments,
  PrincipalAxes, ShapeStatistic_Last
}
 
typedef vtkTableAlgorithm Superclass
 

Public Member Functions

void ComputeShapeStatisticOff (std::string statisticName)
 
void ComputeShapeStatisticOn (std::string statisticName)
 
virtual const char * GetClassName ()
 
bool GetComputeShapeStatistic (std::string statisticName)
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
void SetComputeShapeStatistic (std::string statisticName, bool state)
 
virtual void SetDirections (vtkMatrix4x4 *)
 
 vtkGetStdVectorMacro (ComputedStatistics, std::vector< std::string >)
 
 vtkSetStdVectorMacro (ComputedStatistics, std::vector< std::string >)
 

Static Public Member Functions

static std::string GetShapeStatisticAsString (ShapeStatistic statistic)
 
static ShapeStatistic GetShapeStatisticFromString (std::string statisticName)
 
static int IsTypeOf (const char *type)
 
static vtkITKLabelShapeStatisticsNew ()
 
static vtkITKLabelShapeStatisticsSafeDownCast (vtkObject *o)
 

Protected Member Functions

int FillInputPortInformation (int vtkNotUsed(port), vtkInformation *info) override
 
int RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
 
 vtkITKLabelShapeStatistics ()
 
 ~vtkITKLabelShapeStatistics () override
 

Protected Attributes

std::vector< std::string > ComputedStatistics
 
vtkMatrix4x4 * Directions
 

Detailed Description

ITK-based utilities for calculating label statistics. Utilizes itk::LabelImageToShapeLabelMapFilter to calculate label shape statistics (https://itk.org/Doxygen/html/classitk_1_1LabelImageToShapeLabelMapFilter.html) Label centroid and flatness are the only statistics calculated by default. For a list of available parameters, see: vtkITKLabelShapeStatistics::ShapeStatistic Calculated statistics can be changed using the SetComputeShapeStatistic/ComputeShapeStatisticOn/ComputeShapeStatisticOff methods. Output statistics are represented in a vtkTable where each column represents a statistic and each row is a different label value.

Definition at line 48 of file vtkITKLabelShapeStatistics.h.

Member Typedef Documentation

◆ Superclass

typedef vtkTableAlgorithm vtkITKLabelShapeStatistics::Superclass

Definition at line 52 of file vtkITKLabelShapeStatistics.h.

Member Enumeration Documentation

◆ ShapeStatistic

Shape statistic parameters See parameter definitions and formulas here: https://hdl.handle.net/1926/584

Enumerator
Centroid 

Location of the center of mass of the label.

OrientedBoundingBox 

Oriented bounding box of the label.

FeretDiameter 

Diameter of the sphere that contains the label.

Perimeter 

Surface area of the label.

Roundness 

Ratio of the area of the hypersphere by the actual area. A value of 1 represents a spherical structure.

Flatness 

Square root of the ratio of the second smallest principal moment by the smallest. A value of 0 represents a flat structure.

Elongation 

Square root of the ratio of the second largest principal moment by the second smallest.

PrincipalMoments 

Principal moments of inertia for the principal axes.

PrincipalAxes 
ShapeStatistic_Last 

Definition at line 57 of file vtkITKLabelShapeStatistics.h.

Constructor & Destructor Documentation

◆ vtkITKLabelShapeStatistics()

vtkITKLabelShapeStatistics::vtkITKLabelShapeStatistics ( )
protected

◆ ~vtkITKLabelShapeStatistics()

vtkITKLabelShapeStatistics::~vtkITKLabelShapeStatistics ( )
overrideprotected

Member Function Documentation

◆ ComputeShapeStatisticOff()

void vtkITKLabelShapeStatistics::ComputeShapeStatisticOff ( std::string  statisticName)

◆ ComputeShapeStatisticOn()

void vtkITKLabelShapeStatistics::ComputeShapeStatisticOn ( std::string  statisticName)

◆ FillInputPortInformation()

int vtkITKLabelShapeStatistics::FillInputPortInformation ( int   vtkNotUsedport,
vtkInformation *  info 
)
overrideprotected

◆ GetClassName()

virtual const char* vtkITKLabelShapeStatistics::GetClassName ( )
virtual

◆ GetComputeShapeStatistic()

bool vtkITKLabelShapeStatistics::GetComputeShapeStatistic ( std::string  statisticName)

◆ GetShapeStatisticAsString()

static std::string vtkITKLabelShapeStatistics::GetShapeStatisticAsString ( ShapeStatistic  statistic)
static

◆ GetShapeStatisticFromString()

static ShapeStatistic vtkITKLabelShapeStatistics::GetShapeStatisticFromString ( std::string  statisticName)
static

◆ IsA()

virtual int vtkITKLabelShapeStatistics::IsA ( const char *  type)
virtual

◆ IsTypeOf()

static int vtkITKLabelShapeStatistics::IsTypeOf ( const char *  type)
static

◆ New()

static vtkITKLabelShapeStatistics* vtkITKLabelShapeStatistics::New ( )
static

◆ PrintSelf()

void vtkITKLabelShapeStatistics::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
override

◆ RequestData()

int vtkITKLabelShapeStatistics::RequestData ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
overrideprotected

◆ SafeDownCast()

static vtkITKLabelShapeStatistics* vtkITKLabelShapeStatistics::SafeDownCast ( vtkObject *  o)
static

◆ SetComputeShapeStatistic()

void vtkITKLabelShapeStatistics::SetComputeShapeStatistic ( std::string  statisticName,
bool  state 
)

Set/Get if the the specified statistic should be computed. Label centroid and flatness are computed by default. Other statistics are listed in the ShapeStatistic enum.

◆ SetDirections()

virtual void vtkITKLabelShapeStatistics::SetDirections ( vtkMatrix4x4 *  )
virtual

◆ vtkGetStdVectorMacro()

vtkITKLabelShapeStatistics::vtkGetStdVectorMacro ( ComputedStatistics  ,
std::vector< std::string >   
)

◆ vtkSetStdVectorMacro()

vtkITKLabelShapeStatistics::vtkSetStdVectorMacro ( ComputedStatistics  ,
std::vector< std::string >   
)

Member Data Documentation

◆ ComputedStatistics

std::vector<std::string> vtkITKLabelShapeStatistics::ComputedStatistics
protected

Definition at line 105 of file vtkITKLabelShapeStatistics.h.

◆ Directions

vtkMatrix4x4* vtkITKLabelShapeStatistics::Directions
protected

Definition at line 106 of file vtkITKLabelShapeStatistics.h.


The documentation for this class was generated from the following file: