Package org.itk.simple
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 Summary
Fields inherited from class org.itk.simple.ProcessObject
swigCMemOwn
-
Constructor Summary
ConstructorsModifierConstructorDescriptionitk::simple::LabelStatisticsImageFilter::LabelStatisticsImageFilter() Default Constructor that takes no arguments and initializes default parametersprotected
LabelStatisticsImageFilter
(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
virtual itk::simple::LabelStatisticsImageFilter::~LabelStatisticsImageFilter() Destructorvoid
void itk::simple::LabelStatisticsImageFilter::Execute(const Image &image, const Image &labelImage) Execute the filter on the input imageprotected void
finalize()
getBoundingBox
(int label) std::vector<int> itk::simple::LabelStatisticsImageFilter::GetBoundingBox(int64_t label) const Return the computed bounding box for a label.long
getCount
(int label) uint64_t itk::simple::LabelStatisticsImageFilter::GetCount(int64_t label) const Return the number of pixels for a label.protected static long
std::vector<int64_t> itk::simple::LabelStatisticsImageFilter::GetLabels() const This is a measurement.double
getMaximum
(int label) double itk::simple::LabelStatisticsImageFilter::GetMaximum(int64_t label) const Return the computed Maximum for a label.double
getMean
(int label) double itk::simple::LabelStatisticsImageFilter::GetMean(int64_t label) const Return the computed Mean for a label.double
getMedian
(int label) double itk::simple::LabelStatisticsImageFilter::GetMedian(int64_t label) const Return the computed Median for a label.double
getMinimum
(int 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 classlong
uint64_t itk::simple::LabelStatisticsImageFilter::GetNumberOfLabels() Return the number of labels after execution .getRegion
(int label) std::vector<unsigned int> itk::simple::LabelStatisticsImageFilter::GetRegion(int64_t label) const Return the computed region.double
getSigma
(int label) double itk::simple::LabelStatisticsImageFilter::GetSigma(int64_t label) const Return the computed Standard Deviation for a label.double
getSum
(int label) double itk::simple::LabelStatisticsImageFilter::GetSum(int64_t label) const Return the compute Sum for a label.boolean
bool itk::simple::LabelStatisticsImageFilter::GetUseHistograms() constdouble
getVariance
(int label) double itk::simple::LabelStatisticsImageFilter::GetVariance(int64_t label) const Return the computed Variance for a label.boolean
hasLabel
(int 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().void
setUseHistograms
(boolean UseHistograms) Self& itk::simple::LabelStatisticsImageFilter::SetUseHistograms(bool UseHistograms)protected static long
toString()
std::string itk::simple::LabelStatisticsImageFilter::ToString() const Print ourselves outvoid
Self& itk::simple::LabelStatisticsImageFilter::UseHistogramsOff()void
Self& itk::simple::LabelStatisticsImageFilter::UseHistogramsOn() Set the value of UseHistograms to true or false respectfully.Methods inherited from class org.itk.simple.ImageFilter
getCPtr, swigRelease
Methods inherited from class org.itk.simple.ProcessObject
abort, 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
-
LabelStatisticsImageFilter
protected LabelStatisticsImageFilter(long cPtr, boolean cMemoryOwn) -
LabelStatisticsImageFilter
public LabelStatisticsImageFilter()itk::simple::LabelStatisticsImageFilter::LabelStatisticsImageFilter() Default Constructor that takes no arguments and initializes default parameters
-
-
Method Details
-
getCPtr
-
swigRelease
-
finalize
protected void finalize()- Overrides:
finalize
in classImageFilter
-
delete
public void delete()virtual itk::simple::LabelStatisticsImageFilter::~LabelStatisticsImageFilter() Destructor- Overrides:
delete
in classImageFilter
-
setUseHistograms
public void setUseHistograms(boolean UseHistograms) Self& itk::simple::LabelStatisticsImageFilter::SetUseHistograms(bool UseHistograms) -
useHistogramsOn
public void useHistogramsOn()Self& itk::simple::LabelStatisticsImageFilter::UseHistogramsOn() Set the value of UseHistograms to true or false respectfully. -
useHistogramsOff
public void useHistogramsOff()Self& itk::simple::LabelStatisticsImageFilter::UseHistogramsOff() -
getUseHistograms
public boolean getUseHistograms()bool itk::simple::LabelStatisticsImageFilter::GetUseHistograms() const -
getMinimum
public double getMinimum(int 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. -
getMaximum
public double getMaximum(int 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. -
getMean
public double getMean(int 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. -
getMedian
public double getMedian(int 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. -
getSigma
public double getSigma(int 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. -
getVariance
public double getVariance(int 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. -
getSum
public double getSum(int 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. -
getCount
public long getCount(int label) uint64_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. -
getBoundingBox
std::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. -
getRegion
std::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. -
getLabels
std::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. -
getName
std::string itk::simple::LabelStatisticsImageFilter::GetName() const Name of this class- Overrides:
getName
in classProcessObject
-
toString
std::string itk::simple::LabelStatisticsImageFilter::ToString() const Print ourselves out- Overrides:
toString
in classProcessObject
-
execute
void itk::simple::LabelStatisticsImageFilter::Execute(const Image &image, const Image &labelImage) Execute the filter on the input image -
hasLabel
public boolean hasLabel(int 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(). -
getNumberOfLabels
public long getNumberOfLabels()uint64_t itk::simple::LabelStatisticsImageFilter::GetNumberOfLabels() Return the number of labels after execution .
-