SimpleITK
|
Converts a label image to a label map and valuates the shape attributes. More...
#include <sitkLabelShapeStatisticsImageFilter.h>
Public Types | |
using | PixelIDTypeList = IntegerPixelIDTypeList |
using | Self = LabelShapeStatisticsImageFilter |
![]() | |
using | Self = ImageFilter |
![]() | |
using | Self = ProcessObject |
Public Member Functions | |
Self & | ComputeFeretDiameterOff () |
Self & | ComputeFeretDiameterOn () |
Self & | ComputeOrientedBoundingBoxOff () |
Self & | ComputeOrientedBoundingBoxOn () |
Self & | ComputePerimeterOff () |
Self & | ComputePerimeterOn () |
void | Execute (const Image &image1) |
double | GetBackgroundValue () const |
std::vector< unsigned int > | GetBoundingBox (int64_t label) const |
std::vector< double > | GetCentroid (int64_t label) const |
bool | GetComputeFeretDiameter () const |
bool | GetComputeOrientedBoundingBox () 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< unsigned int > | GetIndexes (int64_t label) const |
std::vector< int64_t > | GetLabels () const |
std::string | GetName () const |
uint64_t | GetNumberOfLabels () |
uint64_t | GetNumberOfPixels (int64_t label) const |
uint64_t | GetNumberOfPixelsOnBorder (int64_t label) const |
std::vector< double > | GetOrientedBoundingBoxDirection (int64_t label) const |
std::vector< double > | GetOrientedBoundingBoxOrigin (int64_t label) const |
std::vector< double > | GetOrientedBoundingBoxSize (int64_t label) const |
std::vector< double > | GetOrientedBoundingBoxVertices (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 |
std::vector< unsigned int > | GetRegion (int64_t label) const |
std::vector< unsigned int > | GetRLEIndexes (int64_t label) const |
double | GetRoundness (int64_t label) const |
bool | HasLabel (int64_t label) |
LabelShapeStatisticsImageFilter () | |
Self & | SetBackgroundValue (double BackgroundValue) |
Self & | SetComputeFeretDiameter (bool ComputeFeretDiameter) |
Self & | SetComputeOrientedBoundingBox (bool ComputeOrientedBoundingBox) |
Self & | SetComputePerimeter (bool ComputePerimeter) |
std::string | ToString () const |
virtual | ~LabelShapeStatisticsImageFilter () |
![]() | |
ImageFilter () | |
virtual | ~ImageFilter ()=0 |
![]() | |
virtual void | Abort () |
virtual int | AddCommand (itk::simple::EventEnum event, const std::function< void()> &func) |
Directly add a callback to observe an event. More... | |
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 |
virtual void | SetNumberOfWorkUnits (unsigned int n) |
virtual unsigned int | GetNumberOfWorkUnits () const |
Private Types | |
using | MemberFunctionType = void(Self::*)(const Image &image1) |
Private Member Functions | |
template<class TImageType > | |
void | ExecuteInternal (const Image &image1) |
Private Attributes | |
double | m_BackgroundValue {0} |
bool | m_ComputeFeretDiameter {false} |
bool | m_ComputeOrientedBoundingBox {false} |
bool | m_ComputePerimeter {true} |
itk::ProcessObject * | m_Filter {nullptr} |
std::vector< int64_t > | m_Labels {std::vector<int64_t>()} |
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > | m_MemberFactory |
std::function< std::vector< unsigned int >int64_t)> | m_pfGetBoundingBox |
std::function< std::vector< double >int64_t)> | m_pfGetCentroid |
std::function< double(int64_t)> | m_pfGetElongation |
std::function< std::vector< double >int64_t)> | m_pfGetEquivalentEllipsoidDiameter |
std::function< double(int64_t)> | m_pfGetEquivalentSphericalPerimeter |
std::function< double(int64_t)> | m_pfGetEquivalentSphericalRadius |
std::function< double(int64_t)> | m_pfGetFeretDiameter |
std::function< double(int64_t)> | m_pfGetFlatness |
std::function< std::vector< unsigned int >int64_t)> | m_pfGetIndexes |
std::function< uint64_t(int64_t)> | m_pfGetNumberOfPixels |
std::function< uint64_t(int64_t)> | m_pfGetNumberOfPixelsOnBorder |
std::function< std::vector< double >int64_t)> | m_pfGetOrientedBoundingBoxDirection |
std::function< std::vector< double >int64_t)> | m_pfGetOrientedBoundingBoxOrigin |
std::function< std::vector< double >int64_t)> | m_pfGetOrientedBoundingBoxSize |
std::function< std::vector< double >int64_t)> | m_pfGetOrientedBoundingBoxVertices |
std::function< double(int64_t)> | m_pfGetPerimeter |
std::function< double(int64_t)> | m_pfGetPerimeterOnBorder |
std::function< double(int64_t)> | m_pfGetPerimeterOnBorderRatio |
std::function< double(int64_t)> | m_pfGetPhysicalSize |
std::function< std::vector< double >int64_t)> | m_pfGetPrincipalAxes |
std::function< std::vector< double >int64_t)> | m_pfGetPrincipalMoments |
std::function< std::vector< unsigned int >int64_t)> | m_pfGetRegion |
std::function< std::vector< unsigned int >int64_t)> | m_pfGetRLEIndexes |
std::function< double(int64_t)> | m_pfGetRoundness |
Friends | |
struct | detail::MemberFunctionAddressor< MemberFunctionType > |
Additional Inherited Members | |
![]() | |
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 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... | |
static bool | SetGlobalDefaultThreader (const std::string &threader) |
Set/Get the default threader used for process objects. More... | |
static std::string | GetGlobalDefaultThreader () |
Set/Get the default threader used for process objects. More... | |
static void | SetGlobalDefaultNumberOfThreads (unsigned int n) |
static unsigned int | GetGlobalDefaultNumberOfThreads () |
Set/Get the default threader used for process objects. More... | |
![]() | |
void | CheckImageMatchingDimension (const Image &image1, const Image &image2, const std::string &image2Name) |
void | CheckImageMatchingPixelType (const Image &image1, const Image &image2, const std::string &image2Name) |
void | CheckImageMatchingSize (const Image &image1, const Image &image2, const std::string &image2Name) |
![]() | |
virtual unsigned long | AddITKObserver (const itk::EventObject &, itk::Command *) |
virtual itk::ProcessObject * | GetActiveProcess () |
virtual void | OnActiveProcessDelete () |
virtual void | onCommandDelete (const itk::simple::Command *cmd) noexcept |
virtual void | PreUpdate (itk::ProcessObject *p) |
virtual void | RemoveITKObserver (EventCommand &e) |
![]() | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
![]() | |
template<class TImageType > | |
static void | FixNonZeroIndex (TImageType *img) |
![]() | |
template<class TImageType > | |
static TImageType::ConstPointer | CastImageToITK (const Image &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) |
template<unsigned int VImageDimension, unsigned int VLength, template< unsigned int > class TVector> | |
static Image | CastITKToImage (itk::Image< TVector< VLength >, VImageDimension > *img) |
template<class TImageType > | |
static Image | CastITKToImage (TImageType *img) |
static const itk::EventObject & | GetITKEventObject (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) |
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://www.insight-journal.org/browse/publication/176
Definition at line 49 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Setup for member function dispatching
Definition at line 362 of file sitkLabelShapeStatisticsImageFilter.h.
Define the pixels types supported by this filter
Definition at line 61 of file sitkLabelShapeStatisticsImageFilter.h.
Definition at line 51 of file sitkLabelShapeStatisticsImageFilter.h.
|
virtual |
Destructor
itk::simple::LabelShapeStatisticsImageFilter::LabelShapeStatisticsImageFilter | ( | ) |
Default Constructor that takes no arguments and initializes default parameters
|
inline |
Definition at line 81 of file sitkLabelShapeStatisticsImageFilter.h.
|
inline |
Set the value of ComputeFeretDiameter to true or false respectfully.
Definition at line 80 of file sitkLabelShapeStatisticsImageFilter.h.
|
inline |
Definition at line 109 of file sitkLabelShapeStatisticsImageFilter.h.
|
inline |
Set the value of ComputeOrientedBoundingBox to true or false respectfully.
Definition at line 108 of file sitkLabelShapeStatisticsImageFilter.h.
|
inline |
Definition at line 95 of file sitkLabelShapeStatisticsImageFilter.h.
|
inline |
Set the value of ComputePerimeter to true or false respectfully.
Definition at line 94 of file sitkLabelShapeStatisticsImageFilter.h.
void itk::simple::LabelShapeStatisticsImageFilter::Execute | ( | const Image & | image1 | ) |
Execute the filter on the input image
|
private |
|
inline |
Set/Get the value used as "background" in the output image. Defaults to NumericTraits<PixelType>::NonpositiveMin() .
Definition at line 72 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 122 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 140 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 86 of file sitkLabelShapeStatisticsImageFilter.h.
|
inline |
Set/Get whether the oriented bounding box should be computed or not. Default value is false because of potential memory consumption issues with sparse labels.
Definition at line 114 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 100 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 149 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 158 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 167 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 176 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 185 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 194 of file sitkLabelShapeStatisticsImageFilter.h.
|
inline |
Get an array of indexes for pixels with the label value.
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 328 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 202 of file sitkLabelShapeStatisticsImageFilter.h.
|
inlinevirtual |
Name of this class
Implements itk::simple::ProcessObject.
Definition at line 341 of file sitkLabelShapeStatisticsImageFilter.h.
uint64_t itk::simple::LabelShapeStatisticsImageFilter::GetNumberOfLabels | ( | ) |
Return the number of labels after execution.
|
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 211 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 220 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 310 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 301 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 292 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 319 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 229 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 238 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 247 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 256 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 265 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 274 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 131 of file sitkLabelShapeStatisticsImageFilter.h.
|
inline |
Get an array of run-length encoding (RLE) indexes for pixels with the label value. The array is the index of a starting line, followed by the length repeated. The length of the array is divisible by the image's dimension + 1. For example for a 2D image the array [ 2, 3, 2] would encode the two indexes [2,3] and [3,3].
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 337 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 283 of file sitkLabelShapeStatisticsImageFilter.h.
bool itk::simple::LabelShapeStatisticsImageFilter::HasLabel | ( | int64_t | label | ) |
Does the specified label exist? Can only be called after a call a call to Update().
|
inline |
Set/Get the value used as "background" in the output image. Defaults to NumericTraits<PixelType>::NonpositiveMin() .
Definition at line 67 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 77 of file sitkLabelShapeStatisticsImageFilter.h.
|
inline |
Set/Get whether the oriented bounding box should be computed or not. Default value is false because of potential memory consumption issues with sparse labels.
Definition at line 105 of file sitkLabelShapeStatisticsImageFilter.h.
|
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 91 of file sitkLabelShapeStatisticsImageFilter.h.
|
virtual |
Print ourselves out
Reimplemented from itk::simple::ProcessObject.
|
friend |
Definition at line 366 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 372 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 374 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 378 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 376 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 432 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 399 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 368 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 381 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 385 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 387 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 389 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 391 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 393 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 395 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 397 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 427 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 401 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 403 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 423 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 421 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 419 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 425 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 405 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 407 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 409 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 411 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 413 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 415 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 383 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 429 of file sitkLabelShapeStatisticsImageFilter.h.
|
private |
Definition at line 417 of file sitkLabelShapeStatisticsImageFilter.h.