Class LabelShapeStatisticsImageFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.LabelShapeStatisticsImageFilter
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://doi.org/10.54294/q6auw4
Gaetan Lehmann. Biologie du Developpement et de la Reproduction, INRA
de Jouy-en-Josas, France.
See:
 ShapeLabelObject , LabelShapeOpeningImageFilter , LabelStatisticsOpeningImageFilter
 itk::LabelImageToShapeLabelMapFilter for the Doxygen on the original ITK class.
C++ includes: sitkLabelShapeStatisticsImageFilter.h
- 
Field SummaryFields inherited from class org.itk.simple.ProcessObjectswigCMemOwn
- 
Constructor SummaryConstructorsModifierConstructorDescriptionitk::simple::LabelShapeStatisticsImageFilter::LabelShapeStatisticsImageFilter() Default Constructor that takes no arguments and initializes default parametersprotectedLabelShapeStatisticsImageFilter(long cPtr, boolean cMemoryOwn) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidSelf& itk::simple::LabelShapeStatisticsImageFilter::ComputeFeretDiameterOff()voidSelf& itk::simple::LabelShapeStatisticsImageFilter::ComputeFeretDiameterOn() Set the value of ComputeFeretDiameter to true or false respectfully.voidSelf& itk::simple::LabelShapeStatisticsImageFilter::ComputeOrientedBoundingBoxOff()voidSelf& itk::simple::LabelShapeStatisticsImageFilter::ComputeOrientedBoundingBoxOn() Set the value of ComputeOrientedBoundingBox to true or false respectfully.voidSelf& itk::simple::LabelShapeStatisticsImageFilter::ComputePerimeterOff()voidSelf& itk::simple::LabelShapeStatisticsImageFilter::ComputePerimeterOn() Set the value of ComputePerimeter to true or false respectfully.voiddelete()virtual itk::simple::LabelShapeStatisticsImageFilter::~LabelShapeStatisticsImageFilter() Destructorvoidvoid itk::simple::LabelShapeStatisticsImageFilter::Execute(const Image &image1) Execute the filter on the input imageprotected voidfinalize()doubledouble itk::simple::LabelShapeStatisticsImageFilter::GetBackgroundValue() const Set/Get the value used as "background" in the output image.getBoundingBox(long label) std::vector<unsigned int> itk::simple::LabelShapeStatisticsImageFilter::GetBoundingBox(int64_t label) const This is an active measurement.getCentroid(long label) std::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetCentroid(int64_t label) const This is an active measurement.booleanbool itk::simple::LabelShapeStatisticsImageFilter::GetComputeFeretDiameter() const Set/Get whether the maximum Feret diameter should be computed or not.booleanbool itk::simple::LabelShapeStatisticsImageFilter::GetComputeOrientedBoundingBox() const Set/Get whether the oriented bounding box should be computed or not.booleanbool itk::simple::LabelShapeStatisticsImageFilter::GetComputePerimeter() const Set/Get whether the perimeter should be computed or not.protected static longdoublegetElongation(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetElongation(int64_t label) const This is an active measurement.getEquivalentEllipsoidDiameter(long label) std::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetEquivalentEllipsoidDiameter(int64_t label) const This is an active measurement.doublegetEquivalentSphericalPerimeter(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetEquivalentSphericalPerimeter(int64_t label) const This is an active measurement.doublegetEquivalentSphericalRadius(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetEquivalentSphericalRadius(int64_t label) const This is an active measurement.doublegetFeretDiameter(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetFeretDiameter(int64_t label) const This is an active measurement.doublegetFlatness(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetFlatness(int64_t label) const This is an active measurement.getIndexes(long label) std::vector<unsigned int> itk::simple::LabelShapeStatisticsImageFilter::GetIndexes(int64_t label) const Get an array of indexes for pixels with the label value.std::vector<int64_t> itk::simple::LabelShapeStatisticsImageFilter::GetLabels() const This is a measurement.getName()std::string itk::simple::LabelShapeStatisticsImageFilter::GetName() const Name of this classuint64_t itk::simple::LabelShapeStatisticsImageFilter::GetNumberOfLabels() Return the number of labels after execution.getNumberOfPixels(long label) uint64_t itk::simple::LabelShapeStatisticsImageFilter::GetNumberOfPixels(int64_t label) const This is an active measurement.getNumberOfPixelsOnBorder(long label) uint64_t itk::simple::LabelShapeStatisticsImageFilter::GetNumberOfPixelsOnBorder(int64_t label) const This is an active measurement.getOrientedBoundingBoxDirection(long label) std::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetOrientedBoundingBoxDirection(int64_t label) const This is an active measurement.getOrientedBoundingBoxOrigin(long label) std::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetOrientedBoundingBoxOrigin(int64_t label) const This is an active measurement.getOrientedBoundingBoxSize(long label) std::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetOrientedBoundingBoxSize(int64_t label) const This is an active measurement.getOrientedBoundingBoxVertices(long label) std::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetOrientedBoundingBoxVertices(int64_t label) const This is an active measurement.doublegetPerimeter(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetPerimeter(int64_t label) const This is an active measurement.doublegetPerimeterOnBorder(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetPerimeterOnBorder(int64_t label) const This is an active measurement.doublegetPerimeterOnBorderRatio(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetPerimeterOnBorderRatio(int64_t label) const This is an active measurement.doublegetPhysicalSize(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetPhysicalSize(int64_t label) const This is an active measurement.getPrincipalAxes(long label) std::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetPrincipalAxes(int64_t label) const This is an active measurement.getPrincipalMoments(long label) std::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetPrincipalMoments(int64_t label) const This is an active measurement.getRegion(long label) std::vector<unsigned int> itk::simple::LabelShapeStatisticsImageFilter::GetRegion(int64_t label) const This is an active measurement.getRLEIndexes(long label) std::vector<unsigned int> itk::simple::LabelShapeStatisticsImageFilter::GetRLEIndexes(int64_t label) const Get an array of run-length encoding (RLE) indexes for pixels with the label value.doublegetRoundness(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetRoundness(int64_t label) const This is an active measurement.booleanhasLabel(long label) bool itk::simple::LabelShapeStatisticsImageFilter::HasLabel(int64_t label) Does the specified label exist? Can only be called after a call a call to Update().voidsetBackgroundValue(double BackgroundValue) Self& itk::simple::LabelShapeStatisticsImageFilter::SetBackgroundValue(double BackgroundValue) Set/Get the value used as "background" in the output image.voidsetComputeFeretDiameter(boolean ComputeFeretDiameter) Self& itk::simple::LabelShapeStatisticsImageFilter::SetComputeFeretDiameter(bool ComputeFeretDiameter) Set/Get whether the maximum Feret diameter should be computed or not.voidsetComputeOrientedBoundingBox(boolean ComputeOrientedBoundingBox) Self& itk::simple::LabelShapeStatisticsImageFilter::SetComputeOrientedBoundingBox(bool ComputeOrientedBoundingBox) Set/Get whether the oriented bounding box should be computed or not.voidsetComputePerimeter(boolean ComputePerimeter) Self& itk::simple::LabelShapeStatisticsImageFilter::SetComputePerimeter(bool ComputePerimeter) Set/Get whether the perimeter should be computed or not.protected static longtoString()std::string itk::simple::LabelShapeStatisticsImageFilter::ToString() const Print ourselves outMethods inherited from class org.itk.simple.ImageFiltergetCPtr, swigReleaseMethods inherited from class org.itk.simple.ProcessObjectabort, addCommand, debugOff, debugOn, getCPtr, getDebug, getGlobalDefaultCoordinateTolerance, getGlobalDefaultDebug, getGlobalDefaultDirectionTolerance, getGlobalDefaultNumberOfThreads, getGlobalDefaultThreader, getGlobalWarningDisplay, getNumberOfThreads, getNumberOfWorkUnits, getProgress, globalDefaultDebugOff, globalDefaultDebugOn, globalWarningDisplayOff, globalWarningDisplayOn, hasCommand, removeAllCommands, setDebug, setGlobalDefaultCoordinateTolerance, setGlobalDefaultDebug, setGlobalDefaultDirectionTolerance, setGlobalDefaultNumberOfThreads, setGlobalDefaultThreader, setGlobalWarningDisplay, setNumberOfThreads, setNumberOfWorkUnits, swigRelease
- 
Constructor Details- 
LabelShapeStatisticsImageFilterprotected LabelShapeStatisticsImageFilter(long cPtr, boolean cMemoryOwn) 
- 
LabelShapeStatisticsImageFilterpublic LabelShapeStatisticsImageFilter()itk::simple::LabelShapeStatisticsImageFilter::LabelShapeStatisticsImageFilter() Default Constructor that takes no arguments and initializes default parameters
 
- 
- 
Method Details- 
getCPtr
- 
swigRelease
- 
finalizeprotected void finalize()- Overrides:
- finalizein class- ImageFilter
 
- 
deletepublic void delete()virtual itk::simple::LabelShapeStatisticsImageFilter::~LabelShapeStatisticsImageFilter() Destructor- Overrides:
- deletein class- ImageFilter
 
- 
setBackgroundValuepublic void setBackgroundValue(double BackgroundValue) Self& itk::simple::LabelShapeStatisticsImageFilter::SetBackgroundValue(double BackgroundValue) Set/Get the value used as "background" in the output image. Defaults to NumericTraits<PixelType>::NonpositiveMin() .
- 
getBackgroundValuepublic double getBackgroundValue()double itk::simple::LabelShapeStatisticsImageFilter::GetBackgroundValue() const Set/Get the value used as "background" in the output image. Defaults to NumericTraits<PixelType>::NonpositiveMin() .
- 
setComputeFeretDiameterpublic void setComputeFeretDiameter(boolean ComputeFeretDiameter) Self& itk::simple::LabelShapeStatisticsImageFilter::SetComputeFeretDiameter(bool ComputeFeretDiameter) Set/Get whether the maximum Feret diameter should be computed or not. Default value is false, because of the high computation time required.
- 
computeFeretDiameterOnpublic void computeFeretDiameterOn()Self& itk::simple::LabelShapeStatisticsImageFilter::ComputeFeretDiameterOn() Set the value of ComputeFeretDiameter to true or false respectfully.
- 
computeFeretDiameterOffpublic void computeFeretDiameterOff()Self& itk::simple::LabelShapeStatisticsImageFilter::ComputeFeretDiameterOff()
- 
getComputeFeretDiameterpublic boolean getComputeFeretDiameter()bool itk::simple::LabelShapeStatisticsImageFilter::GetComputeFeretDiameter() const Set/Get whether the maximum Feret diameter should be computed or not. Default value is false, because of the high computation time required.
- 
setComputePerimeterpublic void setComputePerimeter(boolean ComputePerimeter) Self& itk::simple::LabelShapeStatisticsImageFilter::SetComputePerimeter(bool ComputePerimeter) Set/Get whether the perimeter should be computed or not. Default value is false, because of the high computation time required.
- 
computePerimeterOnpublic void computePerimeterOn()Self& itk::simple::LabelShapeStatisticsImageFilter::ComputePerimeterOn() Set the value of ComputePerimeter to true or false respectfully.
- 
computePerimeterOffpublic void computePerimeterOff()Self& itk::simple::LabelShapeStatisticsImageFilter::ComputePerimeterOff()
- 
getComputePerimeterpublic boolean getComputePerimeter()bool itk::simple::LabelShapeStatisticsImageFilter::GetComputePerimeter() const Set/Get whether the perimeter should be computed or not. Default value is false, because of the high computation time required.
- 
setComputeOrientedBoundingBoxpublic void setComputeOrientedBoundingBox(boolean ComputeOrientedBoundingBox) Self& itk::simple::LabelShapeStatisticsImageFilter::SetComputeOrientedBoundingBox(bool ComputeOrientedBoundingBox) 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.
- 
computeOrientedBoundingBoxOnpublic void computeOrientedBoundingBoxOn()Self& itk::simple::LabelShapeStatisticsImageFilter::ComputeOrientedBoundingBoxOn() Set the value of ComputeOrientedBoundingBox to true or false respectfully.
- 
computeOrientedBoundingBoxOffpublic void computeOrientedBoundingBoxOff()Self& itk::simple::LabelShapeStatisticsImageFilter::ComputeOrientedBoundingBoxOff()
- 
getComputeOrientedBoundingBoxpublic boolean getComputeOrientedBoundingBox()bool itk::simple::LabelShapeStatisticsImageFilter::GetComputeOrientedBoundingBox() const 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.
- 
getBoundingBoxstd::vector<unsigned int> itk::simple::LabelShapeStatisticsImageFilter::GetBoundingBox(int64_t label) const 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.
- 
getRegionstd::vector<unsigned int> itk::simple::LabelShapeStatisticsImageFilter::GetRegion(int64_t label) const 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.
- 
getCentroidstd::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetCentroid(int64_t label) const 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.
- 
getElongationpublic double getElongation(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetElongation(int64_t label) const 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.
- 
getEquivalentEllipsoidDiameterstd::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetEquivalentEllipsoidDiameter(int64_t label) const 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.
- 
getEquivalentSphericalPerimeterpublic double getEquivalentSphericalPerimeter(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetEquivalentSphericalPerimeter(int64_t label) const 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.
- 
getEquivalentSphericalRadiuspublic double getEquivalentSphericalRadius(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetEquivalentSphericalRadius(int64_t label) const 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.
- 
getFeretDiameterpublic double getFeretDiameter(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetFeretDiameter(int64_t label) const 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.
- 
getFlatnesspublic double getFlatness(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetFlatness(int64_t label) const 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.
- 
getLabelsstd::vector<int64_t> itk::simple::LabelShapeStatisticsImageFilter::GetLabels() const This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.
- 
getNumberOfPixelsuint64_t itk::simple::LabelShapeStatisticsImageFilter::GetNumberOfPixels(int64_t label) const 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.
- 
getNumberOfPixelsOnBorderuint64_t itk::simple::LabelShapeStatisticsImageFilter::GetNumberOfPixelsOnBorder(int64_t label) const 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.
- 
getPerimeterpublic double getPerimeter(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetPerimeter(int64_t label) const 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.
- 
getPerimeterOnBorderpublic double getPerimeterOnBorder(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetPerimeterOnBorder(int64_t label) const 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.
- 
getPerimeterOnBorderRatiopublic double getPerimeterOnBorderRatio(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetPerimeterOnBorderRatio(int64_t label) const 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.
- 
getPhysicalSizepublic double getPhysicalSize(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetPhysicalSize(int64_t label) const 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.
- 
getPrincipalAxesstd::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetPrincipalAxes(int64_t label) const 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.
- 
getPrincipalMomentsstd::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetPrincipalMoments(int64_t label) const 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.
- 
getRoundnesspublic double getRoundness(long label) double itk::simple::LabelShapeStatisticsImageFilter::GetRoundness(int64_t label) const 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.
- 
getOrientedBoundingBoxSizestd::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetOrientedBoundingBoxSize(int64_t label) const 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.
- 
getOrientedBoundingBoxOriginstd::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetOrientedBoundingBoxOrigin(int64_t label) const 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.
- 
getOrientedBoundingBoxDirectionstd::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetOrientedBoundingBoxDirection(int64_t label) const 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.
- 
getOrientedBoundingBoxVerticesstd::vector<double> itk::simple::LabelShapeStatisticsImageFilter::GetOrientedBoundingBoxVertices(int64_t label) const 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.
- 
getIndexesstd::vector<unsigned int> itk::simple::LabelShapeStatisticsImageFilter::GetIndexes(int64_t label) const 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.
- 
getRLEIndexesstd::vector<unsigned int> itk::simple::LabelShapeStatisticsImageFilter::GetRLEIndexes(int64_t label) const 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.
- 
getNamestd::string itk::simple::LabelShapeStatisticsImageFilter::GetName() const Name of this class- Overrides:
- getNamein class- ProcessObject
 
- 
toStringstd::string itk::simple::LabelShapeStatisticsImageFilter::ToString() const Print ourselves out- Overrides:
- toStringin class- ProcessObject
 
- 
executevoid itk::simple::LabelShapeStatisticsImageFilter::Execute(const Image &image1) Execute the filter on the input image
- 
hasLabelpublic boolean hasLabel(long label) bool itk::simple::LabelShapeStatisticsImageFilter::HasLabel(int64_t label) Does the specified label exist? Can only be called after a call a call to Update().
- 
getNumberOfLabelsuint64_t itk::simple::LabelShapeStatisticsImageFilter::GetNumberOfLabels() Return the number of labels after execution.
 
-