Class LabelStatisticsImageFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.LabelStatisticsImageFilter
Given an intensity image and a label map, compute min, max, variance
and mean of the pixels associated with each label or segment.
LabelStatisticsImageFilter computes the minimum, maximum, sum, mean, median, variance and sigma
of regions of an intensity image, where the regions are defined via a
label map (a second input). The label image should be integral type.
The filter needs all of its input image. It behaves as a filter with
an input and output. Thus it can be inserted in a pipeline with other
filters and the statistics will only be recomputed if a downstream
filter changes.
Optionally, the filter also computes intensity histograms on each
object. If histograms are enabled, a median intensity value can also
be computed, although its accuracy is limited to the bin width of the
histogram. If histograms are not enabled, the median returns zero.
This filter is automatically multi-threaded and can stream its input
when NumberOfStreamDivisions is set to more than
Statistics are independently computed for each streamed and threaded region then
merged.
See:
 itk::LabelStatisticsImageFilter for the Doxygen on the original ITK class.
C++ includes: sitkLabelStatisticsImageFilter.h
- 
Field SummaryFields inherited from class org.itk.simple.ProcessObjectswigCMemOwn
- 
Constructor SummaryConstructorsModifierConstructorDescriptionitk::simple::LabelStatisticsImageFilter::LabelStatisticsImageFilter() Default Constructor that takes no arguments and initializes default parametersprotectedLabelStatisticsImageFilter(long cPtr, boolean cMemoryOwn) 
- 
Method SummaryModifier and TypeMethodDescriptionvoiddelete()virtual itk::simple::LabelStatisticsImageFilter::~LabelStatisticsImageFilter() Destructorvoidvoid itk::simple::LabelStatisticsImageFilter::Execute(const Image &image, const Image &labelImage) Execute the filter on the input imageprotected voidfinalize()getBoundingBox(long label) std::vector<int> itk::simple::LabelStatisticsImageFilter::GetBoundingBox(int64_t label) const Return the computed bounding box for a label.getCount(long label) uint64_t itk::simple::LabelStatisticsImageFilter::GetCount(int64_t label) const Return the number of pixels for a label.protected static longstd::vector<int64_t> itk::simple::LabelStatisticsImageFilter::GetLabels() const This is a measurement.doublegetMaximum(long label) double itk::simple::LabelStatisticsImageFilter::GetMaximum(int64_t label) const Return the computed Maximum for a label.doublegetMean(long label) double itk::simple::LabelStatisticsImageFilter::GetMean(int64_t label) const Return the computed Mean for a label.doublegetMedian(long label) double itk::simple::LabelStatisticsImageFilter::GetMedian(int64_t label) const Return the computed Median for a label.doublegetMinimum(long label) double itk::simple::LabelStatisticsImageFilter::GetMinimum(int64_t label) const Return the computed Minimum for a label.getName()std::string itk::simple::LabelStatisticsImageFilter::GetName() const Name of this classuint64_t itk::simple::LabelStatisticsImageFilter::GetNumberOfLabels() Return the number of labels after execution .getRegion(long label) std::vector<unsigned int> itk::simple::LabelStatisticsImageFilter::GetRegion(int64_t label) const Return the computed region.doublegetSigma(long label) double itk::simple::LabelStatisticsImageFilter::GetSigma(int64_t label) const Return the computed Standard Deviation for a label.doublegetSum(long label) double itk::simple::LabelStatisticsImageFilter::GetSum(int64_t label) const Return the compute Sum for a label.booleanbool itk::simple::LabelStatisticsImageFilter::GetUseHistograms() constdoublegetVariance(long label) double itk::simple::LabelStatisticsImageFilter::GetVariance(int64_t label) const Return the computed Variance for a label.booleanhasLabel(long label) bool itk::simple::LabelStatisticsImageFilter::HasLabel(int64_t label) Does the specified label exist? Can only be called after a call a call to Update().voidsetUseHistograms(boolean UseHistograms) Self& itk::simple::LabelStatisticsImageFilter::SetUseHistograms(bool UseHistograms)protected static longtoString()std::string itk::simple::LabelStatisticsImageFilter::ToString() const Print ourselves outvoidSelf& itk::simple::LabelStatisticsImageFilter::UseHistogramsOff()voidSelf& itk::simple::LabelStatisticsImageFilter::UseHistogramsOn() Set the value of UseHistograms to true or false respectfully.Methods 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- 
LabelStatisticsImageFilterprotected LabelStatisticsImageFilter(long cPtr, boolean cMemoryOwn) 
- 
LabelStatisticsImageFilterpublic LabelStatisticsImageFilter()itk::simple::LabelStatisticsImageFilter::LabelStatisticsImageFilter() 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::LabelStatisticsImageFilter::~LabelStatisticsImageFilter() Destructor- Overrides:
- deletein class- ImageFilter
 
- 
setUseHistogramspublic void setUseHistograms(boolean UseHistograms) Self& itk::simple::LabelStatisticsImageFilter::SetUseHistograms(bool UseHistograms)
- 
useHistogramsOnpublic void useHistogramsOn()Self& itk::simple::LabelStatisticsImageFilter::UseHistogramsOn() Set the value of UseHistograms to true or false respectfully.
- 
useHistogramsOffpublic void useHistogramsOff()Self& itk::simple::LabelStatisticsImageFilter::UseHistogramsOff()
- 
getUseHistogramspublic boolean getUseHistograms()bool itk::simple::LabelStatisticsImageFilter::GetUseHistograms() const
- 
getMinimumpublic double getMinimum(long label) double itk::simple::LabelStatisticsImageFilter::GetMinimum(int64_t label) const Return the computed Minimum for a label. 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.
- 
getMaximumpublic double getMaximum(long label) double itk::simple::LabelStatisticsImageFilter::GetMaximum(int64_t label) const Return the computed Maximum for a label. 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.
- 
getMeanpublic double getMean(long label) double itk::simple::LabelStatisticsImageFilter::GetMean(int64_t label) const Return the computed Mean for a label. 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.
- 
getMedianpublic double getMedian(long label) double itk::simple::LabelStatisticsImageFilter::GetMedian(int64_t label) const Return the computed Median for a label. Requires histograms to be enabled! 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.
- 
getSigmapublic double getSigma(long label) double itk::simple::LabelStatisticsImageFilter::GetSigma(int64_t label) const Return the computed Standard Deviation for a label. 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.
- 
getVariancepublic double getVariance(long label) double itk::simple::LabelStatisticsImageFilter::GetVariance(int64_t label) const Return the computed Variance for a label. 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.
- 
getSumpublic double getSum(long label) double itk::simple::LabelStatisticsImageFilter::GetSum(int64_t label) const Return the compute Sum for a label. 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.
- 
getCountuint64_t itk::simple::LabelStatisticsImageFilter::GetCount(int64_t label) const Return the number of pixels for a label. 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.
- 
getBoundingBoxstd::vector<int> itk::simple::LabelStatisticsImageFilter::GetBoundingBox(int64_t label) const Return the computed bounding box for a label. A vector of minIndex, maxIndex pairs for each axis. The intervals include the endpoints. 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::LabelStatisticsImageFilter::GetRegion(int64_t label) const Return the computed region. 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::LabelStatisticsImageFilter::GetLabels() const This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.
- 
getNamestd::string itk::simple::LabelStatisticsImageFilter::GetName() const Name of this class- Overrides:
- getNamein class- ProcessObject
 
- 
toStringstd::string itk::simple::LabelStatisticsImageFilter::ToString() const Print ourselves out- Overrides:
- toStringin class- ProcessObject
 
- 
execute
- 
hasLabelpublic boolean hasLabel(long label) bool itk::simple::LabelStatisticsImageFilter::HasLabel(int64_t label) Does the specified label exist? Can only be called after a call a call to Update().
- 
getNumberOfLabelsuint64_t itk::simple::LabelStatisticsImageFilter::GetNumberOfLabels() Return the number of labels after execution .
 
-