template<typename TInputImage, typename TLabelImage>
class itk::LabelStatisticsImageFilter< TInputImage, TLabelImage >
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.
- ITK Sphinx Examples:
-
Definition at line 62 of file itkLabelStatisticsImageFilter.h.
|
| virtual::itk::LightObject::Pointer | CreateAnother () const |
| |
| BoundingBoxType | GetBoundingBox (LabelPixelType label) const |
| |
| MapSizeType | GetCount (LabelPixelType label) const |
| |
| HistogramPointer | GetHistogram (LabelPixelType label) const |
| |
| RealType | GetMaximum (LabelPixelType label) const |
| |
| RealType | GetMean (LabelPixelType label) const |
| |
| RealType | GetMedian (LabelPixelType label) const |
| |
| RealType | GetMinimum (LabelPixelType label) const |
| |
| virtual const char * | GetNameOfClass () const |
| |
| MapSizeType | GetNumberOfLabels () const |
| |
| MapSizeType | GetNumberOfObjects () const |
| |
| unsigned int | GetNumberOfStreamDivisions () const override |
| |
| RegionType | GetRegion (LabelPixelType label) const |
| |
| RealType | GetSigma (LabelPixelType label) const |
| |
| RealType | GetSum (LabelPixelType label) const |
| |
| virtual bool | GetUseHistograms () const |
| |
| virtual const ValidLabelValuesContainerType & | GetValidLabelValues () const |
| |
| RealType | GetVariance (LabelPixelType label) const |
| |
| bool | HasLabel (LabelPixelType label) const |
| |
| void | SetHistogramParameters (const int numBins, RealType lowerBound, RealType upperBound) |
| |
| void | SetNumberOfStreamDivisions (const unsigned int n) override |
| |
| virtual void | SetUseHistograms (bool _arg) |
| |
| virtual void | UseHistogramsOff () |
| |
| virtual void | UseHistogramsOn () |
| |
|
| | itkSetInputMacro (LabelInput, TLabelImage) |
| |
| | itkGetInputMacro (LabelInput, TLabelImage) |
| |
| virtual const InputImageType * | GetInput () const |
| |
| virtual const InputImageType * | GetInput (const DataObjectIdentifierType &key) const |
| |
| virtual const InputImageType * | GetInput (unsigned int idx) const |
| |
| virtual void | SetInput (const InputImageType *input) |
| |
| void | Update () override |
| |
| void | UpdateLargestPossibleRegion () override |
| |
| virtual void | SetCoordinateTolerance (double _arg) |
| |
| virtual double | GetCoordinateTolerance () const |
| |
| virtual void | SetDirectionTolerance (double _arg) |
| |
| virtual double | GetDirectionTolerance () const |
| |
| void | GenerateData () override |
| |
| virtual int | GetCurrentRequestNumber () const |
| |
| void | PropagateRequestedRegion (DataObject *output) override |
| |
| void | ResetPipeline () override |
| |
| void | UpdateOutputData (DataObject *output) override |
| |
| virtual void | AbortGenerateDataOff () |
| |
| virtual void | AbortGenerateDataOn () |
| |
| virtual void | EnlargeOutputRequestedRegion (DataObject *output) |
| |
| virtual const bool & | GetAbortGenerateData () const |
| |
| DataObjectPointerArray | GetIndexedInputs () |
| |
| DataObjectPointerArray | GetIndexedOutputs () |
| |
| NameArray | GetInputNames () const |
| |
| DataObjectPointerArray | GetInputs () |
| |
| MultiThreaderBase * | GetMultiThreader () const |
| |
| DataObjectPointerArraySizeType | GetNumberOfIndexedInputs () const |
| |
| DataObjectPointerArraySizeType | GetNumberOfIndexedOutputs () const |
| |
| DataObjectPointerArraySizeType | GetNumberOfInputs () const |
| |
| DataObjectPointerArraySizeType | GetNumberOfOutputs () const |
| |
| virtual DataObjectPointerArraySizeType | GetNumberOfValidRequiredInputs () const |
| |
| NameArray | GetOutputNames () const |
| |
| DataObjectPointerArray | GetOutputs () |
| |
| virtual float | GetProgress () const |
| |
| NameArray | GetRequiredInputNames () const |
| |
| bool | HasInput (const DataObjectIdentifierType &key) const |
| |
| bool | HasOutput (const DataObjectIdentifierType &key) const |
| |
| void | IncrementProgress (float increment) |
| |
| virtual DataObjectPointer | MakeOutput (const DataObjectIdentifierType &) |
| |
| virtual DataObjectPointer | MakeOutput (DataObjectPointerArraySizeType idx) |
| |
| virtual void | PrepareOutputs () |
| |
| virtual void | SetAbortGenerateData (bool _arg) |
| |
| void | SetMultiThreader (MultiThreaderBase *threader) |
| |
| virtual void | UpdateOutputInformation () |
| |
| void | UpdateProgress (float progress) |
| |
| virtual void | SetReleaseDataFlag (bool val) |
| |
| virtual bool | GetReleaseDataFlag () const |
| |
| void | ReleaseDataFlagOn () |
| |
| void | ReleaseDataFlagOff () |
| |
| virtual void | SetReleaseDataBeforeUpdateFlag (bool _arg) |
| |
| virtual const bool & | GetReleaseDataBeforeUpdateFlag () const |
| |
| virtual void | ReleaseDataBeforeUpdateFlagOn () |
| |
| virtual void | ReleaseDataBeforeUpdateFlagOff () |
| |
| | itkVirtualSetClampMacro (NumberOfWorkUnits, ThreadIdType, 1, ITK_MAX_THREADS) |
| |
| virtual const ThreadIdType & | GetNumberOfWorkUnits () const |
| |
| unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
| |
| unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
| |
| LightObject::Pointer | CreateAnother () const override |
| |
| virtual void | DebugOff () const |
| |
| virtual void | DebugOn () const |
| |
| Command * | GetCommand (unsigned long tag) |
| |
| bool | GetDebug () const |
| |
| MetaDataDictionary & | GetMetaDataDictionary () |
| |
| const MetaDataDictionary & | GetMetaDataDictionary () const |
| |
| virtual ModifiedTimeType | GetMTime () const |
| |
| virtual const TimeStamp & | GetTimeStamp () const |
| |
| bool | HasObserver (const EventObject &event) const |
| |
| void | InvokeEvent (const EventObject &) |
| |
| void | InvokeEvent (const EventObject &) const |
| |
| virtual void | Modified () const |
| |
| void | Register () const override |
| |
| void | RemoveAllObservers () |
| |
| void | RemoveObserver (unsigned long tag) const |
| |
| void | SetDebug (bool debugFlag) const |
| |
| void | SetReferenceCount (int) override |
| |
| void | UnRegister () const noexcept override |
| |
| void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
| |
| void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
| |
| virtual void | SetObjectName (std::string _arg) |
| |
| virtual const std::string & | GetObjectName () const |
| |
| Pointer | Clone () const |
| |
| virtual void | Delete () |
| |
| virtual int | GetReferenceCount () const |
| |
| void | Print (std::ostream &os, Indent indent=0) const |
| |
|
| void | AfterStreamedGenerateData () override |
| |
| void | BeforeStreamedGenerateData () override |
| |
| | LabelStatisticsImageFilter () |
| |
| void | PrintSelf (std::ostream &os, Indent indent) const override |
| |
| void | ThreadedStreamedGenerateData (const RegionType &) override |
| |
| | ~LabelStatisticsImageFilter () override=default |
| |
| virtual void | AllocateOutputs () |
| |
| void | GenerateNthInputRequestedRegion (unsigned int inputRequestedRegionNumber) override |
| |
| unsigned int | GetNumberOfInputRequestedRegions () override |
| |
| | ImageSink () |
| |
| | itkVirtualGetConstMacro (NumberOfStreamDivisions, unsigned int) |
| |
| | itkVirtualSetMacro (NumberOfStreamDivisions, unsigned int) |
| |
| void | StreamedGenerateData (unsigned int inputRequestedRegionNumber) override |
| |
| virtual void | ThreadedStreamedGenerateData (const InputImageRegionType &inputRegionForChunk)=0 |
| |
| void | VerifyInputInformation () const override |
| |
| | ~ImageSink () override=default |
| |
| virtual void | SetRegionSplitter (SplitterType *_arg) |
| |
| virtual SplitterType * | GetModifiableRegionSplitter () |
| |
| virtual const SplitterType * | GetRegionSplitter () const |
| |
| void | PrintSelf (std::ostream &os, Indent indent) const override |
| |
| | StreamingProcessObject () |
| |
| | ~StreamingProcessObject () override |
| |
| virtual void | AddInput (DataObject *input) |
| |
| void | AddOptionalInputName (const DataObjectIdentifierType &) |
| |
| void | AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
| |
| virtual void | AddOutput (DataObject *output) |
| |
| bool | AddRequiredInputName (const DataObjectIdentifierType &) |
| |
| bool | AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
| |
| virtual void | CacheInputReleaseDataFlags () |
| |
| virtual void | GenerateInputRequestedRegion () |
| |
| virtual void | GenerateOutputInformation () |
| |
| virtual void | GenerateOutputRequestedRegion (DataObject *output) |
| |
| DataObject * | GetInput (const DataObjectIdentifierType &key) |
| |
| const DataObject * | GetInput (const DataObjectIdentifierType &key) const |
| |
| virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredInputs () const |
| |
| virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredOutputs () const |
| |
| bool | IsIndexedInputName (const DataObjectIdentifierType &) const |
| |
| bool | IsIndexedOutputName (const DataObjectIdentifierType &) const |
| |
| bool | IsRequiredInputName (const DataObjectIdentifierType &) const |
| |
| DataObjectPointerArraySizeType | MakeIndexFromInputName (const DataObjectIdentifierType &name) const |
| |
| DataObjectPointerArraySizeType | MakeIndexFromOutputName (const DataObjectIdentifierType &name) const |
| |
| DataObjectIdentifierType | MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const |
| |
| DataObjectIdentifierType | MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const |
| |
| virtual void | PopBackInput () |
| |
| virtual void | PopFrontInput () |
| |
| | ProcessObject () |
| |
| virtual void | PropagateResetPipeline () |
| |
| virtual void | PushBackInput (const DataObject *input) |
| |
| virtual void | PushFrontInput (const DataObject *input) |
| |
| virtual void | ReleaseInputs () |
| |
| virtual void | RemoveInput (const DataObjectIdentifierType &key) |
| |
| virtual void | RemoveInput (DataObjectPointerArraySizeType) |
| |
| virtual void | RemoveOutput (const DataObjectIdentifierType &key) |
| |
| virtual void | RemoveOutput (DataObjectPointerArraySizeType idx) |
| |
| bool | RemoveRequiredInputName (const DataObjectIdentifierType &) |
| |
| virtual void | RestoreInputReleaseDataFlags () |
| |
| virtual void | SetInput (const DataObjectIdentifierType &key, DataObject *input) |
| |
| virtual void | SetNthInput (DataObjectPointerArraySizeType idx, DataObject *input) |
| |
| virtual void | SetNthOutput (DataObjectPointerArraySizeType idx, DataObject *output) |
| |
| void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
| |
| void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
| |
| virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
| |
| virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
| |
| virtual void | SetOutput (const DataObjectIdentifierType &name, DataObject *output) |
| |
| virtual void | SetPrimaryInput (DataObject *object) |
| |
| virtual void | SetPrimaryOutput (DataObject *object) |
| |
| void | SetRequiredInputNames (const NameArray &) |
| |
| virtual void | VerifyPreconditions () const |
| |
| | ~ProcessObject () override |
| |
| DataObject * | GetInput (DataObjectPointerArraySizeType idx) |
| |
| const DataObject * | GetInput (DataObjectPointerArraySizeType idx) const |
| |
| DataObject * | GetPrimaryInput () |
| |
| const DataObject * | GetPrimaryInput () const |
| |
| virtual void | SetPrimaryInputName (const DataObjectIdentifierType &key) |
| |
| virtual const char * | GetPrimaryInputName () const |
| |
| DataObject * | GetOutput (const DataObjectIdentifierType &key) |
| |
| const DataObject * | GetOutput (const DataObjectIdentifierType &key) const |
| |
| virtual void | SetPrimaryOutputName (const DataObjectIdentifierType &key) |
| |
| virtual const char * | GetPrimaryOutputName () const |
| |
| DataObject * | GetOutput (DataObjectPointerArraySizeType i) |
| |
| const DataObject * | GetOutput (DataObjectPointerArraySizeType i) const |
| |
| DataObject * | GetPrimaryOutput () |
| |
| const DataObject * | GetPrimaryOutput () const |
| |
| virtual bool | GetThreaderUpdateProgress () const |
| |
| virtual void | ThreaderUpdateProgressOn () |
| |
| virtual void | ThreaderUpdateProgressOff () |
| |
| virtual void | SetThreaderUpdateProgress (bool arg) |
| |
| | Object () |
| |
| bool | PrintObservers (std::ostream &os, Indent indent) const |
| |
| virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
| |
| | ~Object () override |
| |
| virtual LightObject::Pointer | InternalClone () const |
| |
| | LightObject () |
| |
| virtual void | PrintHeader (std::ostream &os, Indent indent) const |
| |
| virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
| |
| virtual | ~LightObject () |
| |