SimpleITK  1.0.1
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
itk::simple::LabelShapeStatisticsImageFilter Class Reference

Converts a label image to a label map and valuates the shape attributes. More...

#include <sitkLabelShapeStatisticsImageFilter.h>

+ Inheritance diagram for itk::simple::LabelShapeStatisticsImageFilter:
+ Collaboration diagram for itk::simple::LabelShapeStatisticsImageFilter:

Public Types

typedef IntegerPixelIDTypeList PixelIDTypeList
 
typedef LabelShapeStatisticsImageFilter Self
 
- Public Types inherited from itk::simple::ImageFilter< 1 >
typedef ImageFilter Self
 
- Public Types inherited from itk::simple::ProcessObject
typedef ProcessObject Self
 

Public Member Functions

SelfComputeFeretDiameterOff ()
 
SelfComputeFeretDiameterOn ()
 
SelfComputePerimeterOff ()
 
SelfComputePerimeterOn ()
 
void Execute (const Image &image1)
 
void Execute (const Image &image1, double backgroundValue, bool computeFeretDiameter, bool computePerimeter)
 
double GetBackgroundValue () const
 
std::vector< unsigned int > GetBoundingBox (int64_t label) const
 
std::vector< double > GetCentroid (int64_t label) const
 
bool GetComputeFeretDiameter () const
 
bool GetComputePerimeter () const
 
double GetElongation (int64_t label) const
 
std::vector< double > GetEquivalentEllipsoidDiameter (int64_t label) const
 
double GetEquivalentSphericalPerimeter (int64_t label) const
 
double GetEquivalentSphericalRadius (int64_t label) const
 
double GetFeretDiameter (int64_t label) const
 
double GetFlatness (int64_t label) const
 
std::vector< int64_tGetLabels () const
 
std::string GetName () const
 
uint64_t GetNumberOfLabels ()
 
uint64_t GetNumberOfPixels (int64_t label) const
 
uint64_t GetNumberOfPixelsOnBorder (int64_t label) const
 
double GetPerimeter (int64_t label) const
 
double GetPerimeterOnBorder (int64_t label) const
 
double GetPerimeterOnBorderRatio (int64_t label) const
 
double GetPhysicalSize (int64_t label) const
 
std::vector< double > GetPrincipalAxes (int64_t label) const
 
std::vector< double > GetPrincipalMoments (int64_t label) const
 
double GetRoundness (int64_t label) const
 
double HasLabel (int64_t label)
 
 LabelShapeStatisticsImageFilter ()
 
SelfSetBackgroundValue (double BackgroundValue)
 
SelfSetComputeFeretDiameter (bool ComputeFeretDiameter)
 
SelfSetComputePerimeter (bool ComputePerimeter)
 
std::string ToString () const
 
 ~LabelShapeStatisticsImageFilter ()
 
- Public Member Functions inherited from itk::simple::ImageFilter< 1 >
 ImageFilter ()
 
virtual ~ImageFilter ()=0
 
- Public Member Functions inherited from itk::simple::ProcessObject
virtual void Abort ()
 
virtual int AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd)
 Add a Command Object to observer the event. More...
 
virtual float GetProgress () const
 An Active Measurement of the progress of execution. More...
 
virtual bool HasCommand (itk::simple::EventEnum event) const
 Query of this object has any registered commands for event. More...
 
 ProcessObject ()
 
virtual void RemoveAllCommands ()
 Remove all registered commands. More...
 
virtual ~ProcessObject ()
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
virtual bool GetDebug () const
 
virtual void SetDebug (bool debugFlag)
 
virtual void SetNumberOfThreads (unsigned int n)
 
virtual unsigned int GetNumberOfThreads () const
 

Private Types

typedef void(Self::* MemberFunctionType) (const Image &image1)
 

Private Member Functions

template<class TImageType >
void ExecuteInternal (const Image &image1)
 

Private Attributes

double m_BackgroundValue
 
bool m_ComputeFeretDiameter
 
bool m_ComputePerimeter
 
itk::ProcessObjectm_Filter
 
std::vector< int64_tm_Labels
 
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
 
nsstd::function< std::vector< unsigned int >int64_t)> m_pfGetBoundingBox
 
nsstd::function< std::vector< double >int64_t)> m_pfGetCentroid
 
nsstd::function< double(int64_t)> m_pfGetElongation
 
nsstd::function< std::vector< double >int64_t)> m_pfGetEquivalentEllipsoidDiameter
 
nsstd::function< double(int64_t)> m_pfGetEquivalentSphericalPerimeter
 
nsstd::function< double(int64_t)> m_pfGetEquivalentSphericalRadius
 
nsstd::function< double(int64_t)> m_pfGetFeretDiameter
 
nsstd::function< double(int64_t)> m_pfGetFlatness
 
nsstd::function< uint64_t(int64_t)> m_pfGetNumberOfPixels
 
nsstd::function< uint64_t(int64_t)> m_pfGetNumberOfPixelsOnBorder
 
nsstd::function< double(int64_t)> m_pfGetPerimeter
 
nsstd::function< double(int64_t)> m_pfGetPerimeterOnBorder
 
nsstd::function< double(int64_t)> m_pfGetPerimeterOnBorderRatio
 
nsstd::function< double(int64_t)> m_pfGetPhysicalSize
 
nsstd::function< std::vector< double >int64_t)> m_pfGetPrincipalAxes
 
nsstd::function< std::vector< double >int64_t)> m_pfGetPrincipalMoments
 
nsstd::function< double(int64_t)> m_pfGetRoundness
 

Friends

struct detail::MemberFunctionAddressor< MemberFunctionType >
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::simple::ProcessObject
static bool GetGlobalDefaultDebug ()
 
static void GlobalDefaultDebugOff ()
 
static void GlobalDefaultDebugOn ()
 
static void SetGlobalDefaultDebug (bool debugFlag)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static void SetGlobalWarningDisplay (bool flag)
 
static bool GetGlobalWarningDisplay ()
 
static void SetGlobalDefaultNumberOfThreads (unsigned int n)
 
static unsigned int GetGlobalDefaultNumberOfThreads ()
 
static double GetGlobalDefaultCoordinateTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultCoordinateTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
static double GetGlobalDefaultDirectionTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultDirectionTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
- Protected Member Functions inherited from itk::simple::ProcessObject
virtual unsigned long AddITKObserver (const itk::EventObject &, itk::Command *)
 
virtual itk::ProcessObjectGetActiveProcess ()
 
virtual void OnActiveProcessDelete ()
 
virtual void onCommandDelete (const itk::simple::Command *cmd) throw ()
 
virtual void PreUpdate (itk::ProcessObject *p)
 
virtual void RemoveITKObserver (EventCommand &e)
 
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()
 
- Static Protected Member Functions inherited from itk::simple::ImageFilter< 1 >
static void FixNonZeroIndex (TImageType *img)
 
- Static Protected Member Functions inherited from itk::simple::ProcessObject
template<class TImageType >
static TImageType::ConstPointer CastImageToITK (const Image &img)
 
template<class TImageType >
static Image CastITKToImage (TImageType *img)
 
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector>
static Image CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img)
 
static const itk::EventObjectGetITKEventObject (EventEnum e)
 
template<typename T >
static std::ostream & ToStringHelper (std::ostream &os, const T &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const signed char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const unsigned char &v)
 

Detailed Description

Converts a label image to a label map and valuates the shape attributes.

A convenient class that converts a label image to a label map and valuates the shape attribute at once.

This implementation was taken from the Insight Journal paper:

https://hdl.handle.net/1926/584 or http://www.insight-journal.org/browse/publication/176

Author
Gaetan Lehmann. Biologie du Developpement et de la Reproduction, INRA de Jouy-en-Josas, France.
See also
ShapeLabelObject , LabelShapeOpeningImageFilter , LabelStatisticsOpeningImageFilter
Wiki Examples:
See also
itk::LabelImageToShapeLabelMapFilter for the Doxygen on the original ITK class.

Definition at line 56 of file sitkLabelShapeStatisticsImageFilter.h.

Member Typedef Documentation

typedef void(Self::* itk::simple::LabelShapeStatisticsImageFilter::MemberFunctionType) (const Image &image1)
private

Setup for member function dispatching

Definition at line 296 of file sitkLabelShapeStatisticsImageFilter.h.

Define the pixels types supported by this filter

Definition at line 68 of file sitkLabelShapeStatisticsImageFilter.h.

Definition at line 58 of file sitkLabelShapeStatisticsImageFilter.h.

Constructor & Destructor Documentation

itk::simple::LabelShapeStatisticsImageFilter::LabelShapeStatisticsImageFilter ( )

Default Constructor that takes no arguments and initializes default parameters

itk::simple::LabelShapeStatisticsImageFilter::~LabelShapeStatisticsImageFilter ( )

Destructor

Member Function Documentation

Self& itk::simple::LabelShapeStatisticsImageFilter::ComputeFeretDiameterOff ( )
inline

Definition at line 89 of file sitkLabelShapeStatisticsImageFilter.h.

Self& itk::simple::LabelShapeStatisticsImageFilter::ComputeFeretDiameterOn ( )
inline

Set the value of ComputeFeretDiameter to true or false respectfully.

Definition at line 88 of file sitkLabelShapeStatisticsImageFilter.h.

Self& itk::simple::LabelShapeStatisticsImageFilter::ComputePerimeterOff ( )
inline

Definition at line 103 of file sitkLabelShapeStatisticsImageFilter.h.

Self& itk::simple::LabelShapeStatisticsImageFilter::ComputePerimeterOn ( )
inline

Set the value of ComputePerimeter to true or false respectfully.

Definition at line 102 of file sitkLabelShapeStatisticsImageFilter.h.

void itk::simple::LabelShapeStatisticsImageFilter::Execute ( const Image image1)

Execute the filter on the input image

void itk::simple::LabelShapeStatisticsImageFilter::Execute ( const Image image1,
double  backgroundValue,
bool  computeFeretDiameter,
bool  computePerimeter 
)

Execute the filter on the input image with the given parameters

template<class TImageType >
void itk::simple::LabelShapeStatisticsImageFilter::ExecuteInternal ( const Image image1)
private
double itk::simple::LabelShapeStatisticsImageFilter::GetBackgroundValue ( ) const
inline

Set/Get the value used as "background" in the output image. Defaults to NumericTraits<PixelType>::NonpositiveMin() .

Definition at line 80 of file sitkLabelShapeStatisticsImageFilter.h.

std::vector<unsigned int> itk::simple::LabelShapeStatisticsImageFilter::GetBoundingBox ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 116 of file sitkLabelShapeStatisticsImageFilter.h.

std::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetCentroid ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 125 of file sitkLabelShapeStatisticsImageFilter.h.

bool itk::simple::LabelShapeStatisticsImageFilter::GetComputeFeretDiameter ( ) const
inline

Set/Get whether the maximum Feret diameter should be computed or not. Default value is false, because of the high computation time required.

Definition at line 94 of file sitkLabelShapeStatisticsImageFilter.h.

bool itk::simple::LabelShapeStatisticsImageFilter::GetComputePerimeter ( ) const
inline

Set/Get whether the perimeter should be computed or not. Default value is false, because of the high computation time required.

Definition at line 108 of file sitkLabelShapeStatisticsImageFilter.h.

double itk::simple::LabelShapeStatisticsImageFilter::GetElongation ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 134 of file sitkLabelShapeStatisticsImageFilter.h.

std::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetEquivalentEllipsoidDiameter ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 143 of file sitkLabelShapeStatisticsImageFilter.h.

double itk::simple::LabelShapeStatisticsImageFilter::GetEquivalentSphericalPerimeter ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 152 of file sitkLabelShapeStatisticsImageFilter.h.

double itk::simple::LabelShapeStatisticsImageFilter::GetEquivalentSphericalRadius ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 161 of file sitkLabelShapeStatisticsImageFilter.h.

double itk::simple::LabelShapeStatisticsImageFilter::GetFeretDiameter ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 170 of file sitkLabelShapeStatisticsImageFilter.h.

double itk::simple::LabelShapeStatisticsImageFilter::GetFlatness ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 179 of file sitkLabelShapeStatisticsImageFilter.h.

std::vector<int64_t> itk::simple::LabelShapeStatisticsImageFilter::GetLabels ( ) const
inline

This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.

Definition at line 187 of file sitkLabelShapeStatisticsImageFilter.h.

std::string itk::simple::LabelShapeStatisticsImageFilter::GetName ( ) const
inlinevirtual

Name of this class

Implements itk::simple::ProcessObject.

Definition at line 271 of file sitkLabelShapeStatisticsImageFilter.h.

uint64_t itk::simple::LabelShapeStatisticsImageFilter::GetNumberOfLabels ( )

Return the number of labels after execution.

uint64_t itk::simple::LabelShapeStatisticsImageFilter::GetNumberOfPixels ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 196 of file sitkLabelShapeStatisticsImageFilter.h.

uint64_t itk::simple::LabelShapeStatisticsImageFilter::GetNumberOfPixelsOnBorder ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 205 of file sitkLabelShapeStatisticsImageFilter.h.

double itk::simple::LabelShapeStatisticsImageFilter::GetPerimeter ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 214 of file sitkLabelShapeStatisticsImageFilter.h.

double itk::simple::LabelShapeStatisticsImageFilter::GetPerimeterOnBorder ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 223 of file sitkLabelShapeStatisticsImageFilter.h.

double itk::simple::LabelShapeStatisticsImageFilter::GetPerimeterOnBorderRatio ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 232 of file sitkLabelShapeStatisticsImageFilter.h.

double itk::simple::LabelShapeStatisticsImageFilter::GetPhysicalSize ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 241 of file sitkLabelShapeStatisticsImageFilter.h.

std::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetPrincipalAxes ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 250 of file sitkLabelShapeStatisticsImageFilter.h.

std::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetPrincipalMoments ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 259 of file sitkLabelShapeStatisticsImageFilter.h.

double itk::simple::LabelShapeStatisticsImageFilter::GetRoundness ( int64_t  label) const
inline

This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.

Definition at line 268 of file sitkLabelShapeStatisticsImageFilter.h.

double itk::simple::LabelShapeStatisticsImageFilter::HasLabel ( int64_t  label)

Does the specified label exist? Can only be called after a call a call to Update().

Self& itk::simple::LabelShapeStatisticsImageFilter::SetBackgroundValue ( double  BackgroundValue)
inline

Set/Get the value used as "background" in the output image. Defaults to NumericTraits<PixelType>::NonpositiveMin() .

Definition at line 75 of file sitkLabelShapeStatisticsImageFilter.h.

Self& itk::simple::LabelShapeStatisticsImageFilter::SetComputeFeretDiameter ( bool  ComputeFeretDiameter)
inline

Set/Get whether the maximum Feret diameter should be computed or not. Default value is false, because of the high computation time required.

Definition at line 85 of file sitkLabelShapeStatisticsImageFilter.h.

Self& itk::simple::LabelShapeStatisticsImageFilter::SetComputePerimeter ( bool  ComputePerimeter)
inline

Set/Get whether the perimeter should be computed or not. Default value is false, because of the high computation time required.

Definition at line 99 of file sitkLabelShapeStatisticsImageFilter.h.

std::string itk::simple::LabelShapeStatisticsImageFilter::ToString ( ) const
virtual

Print ourselves out

Reimplemented from itk::simple::ProcessObject.

Friends And Related Function Documentation

Definition at line 301 of file sitkLabelShapeStatisticsImageFilter.h.

Member Data Documentation

double itk::simple::LabelShapeStatisticsImageFilter::m_BackgroundValue
private

Definition at line 307 of file sitkLabelShapeStatisticsImageFilter.h.

bool itk::simple::LabelShapeStatisticsImageFilter::m_ComputeFeretDiameter
private

Definition at line 308 of file sitkLabelShapeStatisticsImageFilter.h.

bool itk::simple::LabelShapeStatisticsImageFilter::m_ComputePerimeter
private

Definition at line 309 of file sitkLabelShapeStatisticsImageFilter.h.

itk::ProcessObject* itk::simple::LabelShapeStatisticsImageFilter::m_Filter
private

Definition at line 348 of file sitkLabelShapeStatisticsImageFilter.h.

std::vector<int64_t> itk::simple::LabelShapeStatisticsImageFilter::m_Labels
private

Definition at line 327 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > itk::simple::LabelShapeStatisticsImageFilter::m_MemberFactory
private

Definition at line 303 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<std::vector<unsigned int>int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetBoundingBox
private

Definition at line 311 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<std::vector<double>int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetCentroid
private

Definition at line 313 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<double(int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetElongation
private

Definition at line 315 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<std::vector<double>int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetEquivalentEllipsoidDiameter
private

Definition at line 317 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<double(int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetEquivalentSphericalPerimeter
private

Definition at line 319 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<double(int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetEquivalentSphericalRadius
private

Definition at line 321 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<double(int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetFeretDiameter
private

Definition at line 323 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<double(int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetFlatness
private

Definition at line 325 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<uint64_t(int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetNumberOfPixels
private

Definition at line 329 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<uint64_t(int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetNumberOfPixelsOnBorder
private

Definition at line 331 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<double(int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetPerimeter
private

Definition at line 333 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<double(int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetPerimeterOnBorder
private

Definition at line 335 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<double(int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetPerimeterOnBorderRatio
private

Definition at line 337 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<double(int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetPhysicalSize
private

Definition at line 339 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<std::vector<double>int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetPrincipalAxes
private

Definition at line 341 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<std::vector<double>int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetPrincipalMoments
private

Definition at line 343 of file sitkLabelShapeStatisticsImageFilter.h.

nsstd::function<double(int64_t)> itk::simple::LabelShapeStatisticsImageFilter::m_pfGetRoundness
private

Definition at line 345 of file sitkLabelShapeStatisticsImageFilter.h.


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