Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage > Class Template Reference

Compute min. max, variance and mean of an (masked) Image. More...

#include <itkMaskedStatisticsImageFilter.h>

Inheritance diagram for itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >:
Collaboration diagram for itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >:

Public Types

typedef MaskedStatisticsImageFilter Self
 
typedef ImageToImageFilter< TInputImage, TInputImage > Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::InputImageType InputImageType
 
typedef Superclass::InputImagePointer InputImagePointer
 
typedef TInputImage::RegionType RegionType
 
typedef TInputImage::SizeType SizeType
 
typedef TInputImage::IndexType IndexType
 
typedef TInputImage::PixelType PixelType
 
typedef NumericTraits< PixelType >::RealType RealType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef SimpleDataObjectDecorator< RealTypeRealObjectType
 
typedef SimpleDataObjectDecorator< PixelTypePixelObjectType
 
typedef TMaskImage MaskImageType
 
typedef MaskImageType::ConstPointer MaskImageConstPointer
 
typedef MaskImageType::RegionType MaskImageRegionType
 
typedef ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
 

Public Member Functions

virtual const char * GetClassName () const
 
 itkStaticConstMacro (ImageDimension, unsigned int, TInputImage::ImageDimension)
 
PixelType GetMinimum () const
 
PixelObjectTypeGetMinimumOutput ()
 
const PixelObjectTypeGetMinimumOutput () const
 
PixelType GetMaximum () const
 
PixelObjectTypeGetMaximumOutput ()
 
const PixelObjectTypeGetMaximumOutput () const
 
RealType GetMean () const
 
RealObjectTypeGetMeanOutput ()
 
const RealObjectTypeGetMeanOutput () const
 
RealType GetSigma () const
 
RealObjectTypeGetSigmaOutput ()
 
const RealObjectTypeGetSigmaOutput () const
 
RealType GetVariance () const
 
RealObjectTypeGetVarianceOutput ()
 
const RealObjectTypeGetVarianceOutput () const
 
RealType GetSum () const
 
RealObjectTypeGetSumOutput ()
 
const RealObjectTypeGetSumOutput () const
 
DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
virtual void SetMask (const MaskImageType *_arg)
 
virtual const MaskImageTypeGetMask ()
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 MaskedStatisticsImageFilter ()
 
 ~MaskedStatisticsImageFilter () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void AllocateOutputs () override
 
void BeforeThreadedGenerateData () override
 
void AfterThreadedGenerateData () override
 
void ThreadedGenerateData (const RegionType &outputRegionForThread, ThreadIdType threadId) override
 
void GenerateInputRequestedRegion () override
 
void EnlargeOutputRequestedRegion (DataObject *data) override
 

Detailed Description

template<typename TInputImage, typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
class itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >

Compute min. max, variance and mean of an (masked) Image.

MaskedStatisticsImageFilter computes the minimum, maximum, sum, mean, variance sigma of an image. 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.

The filter passes its input through unmodified. The filter is threaded. It computes statistics in each thread then combines them in its AfterThreadedGenerate method.

Remarks
This filter differs from itk::StatisticsImageFilter by the fact that you can specify an mask image. If set, only pixels within the mask (mask value > 0) are taken into account for the statistics.

Definition at line 49 of file itkMaskedStatisticsImageFilter.h.

Member Typedef Documentation

◆ ConstPointer

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef SmartPointer< const Self > itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::ConstPointer

Definition at line 57 of file itkMaskedStatisticsImageFilter.h.

◆ DataObjectPointer

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef DataObject::Pointer itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::DataObjectPointer

Smart Pointer type to a DataObject.

Definition at line 82 of file itkMaskedStatisticsImageFilter.h.

◆ DataObjectPointerArraySizeType

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef ProcessObject::DataObjectPointerArraySizeType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::DataObjectPointerArraySizeType

Make a DataObject of the correct type to be used as the specified output.

Definition at line 136 of file itkMaskedStatisticsImageFilter.h.

◆ IndexType

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef TInputImage::IndexType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::IndexType

Definition at line 71 of file itkMaskedStatisticsImageFilter.h.

◆ InputImagePointer

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef Superclass::InputImagePointer itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::InputImagePointer

Definition at line 67 of file itkMaskedStatisticsImageFilter.h.

◆ InputImageType

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef Superclass::InputImageType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::InputImageType

Image related typedefs.

Definition at line 63 of file itkMaskedStatisticsImageFilter.h.

◆ MaskImageConstPointer

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef MaskImageType::ConstPointer itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::MaskImageConstPointer

Definition at line 89 of file itkMaskedStatisticsImageFilter.h.

◆ MaskImageRegionType

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef MaskImageType::RegionType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::MaskImageRegionType

Definition at line 90 of file itkMaskedStatisticsImageFilter.h.

◆ MaskImageType

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef TMaskImage itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::MaskImageType

Definition at line 88 of file itkMaskedStatisticsImageFilter.h.

◆ PixelObjectType

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef SimpleDataObjectDecorator< PixelType > itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::PixelObjectType

Definition at line 86 of file itkMaskedStatisticsImageFilter.h.

◆ PixelType

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef TInputImage::PixelType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::PixelType

Definition at line 72 of file itkMaskedStatisticsImageFilter.h.

◆ Pointer

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef SmartPointer< Self > itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::Pointer

Definition at line 56 of file itkMaskedStatisticsImageFilter.h.

◆ RealObjectType

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef SimpleDataObjectDecorator< RealType > itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::RealObjectType

Type of DataObjects used for scalar outputs

Definition at line 85 of file itkMaskedStatisticsImageFilter.h.

◆ RealType

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef NumericTraits< PixelType >::RealType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::RealType

Type to use for computations.

Definition at line 79 of file itkMaskedStatisticsImageFilter.h.

◆ RegionType

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef TInputImage::RegionType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::RegionType

Definition at line 69 of file itkMaskedStatisticsImageFilter.h.

◆ Self

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef MaskedStatisticsImageFilter itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::Self

Standard Self typedef

Definition at line 54 of file itkMaskedStatisticsImageFilter.h.

◆ SizeType

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef TInputImage::SizeType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::SizeType

Definition at line 70 of file itkMaskedStatisticsImageFilter.h.

◆ Superclass

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
typedef ImageToImageFilter< TInputImage, TInputImage > itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::Superclass

Definition at line 55 of file itkMaskedStatisticsImageFilter.h.

Constructor & Destructor Documentation

◆ MaskedStatisticsImageFilter()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::MaskedStatisticsImageFilter ( )
protected

◆ ~MaskedStatisticsImageFilter()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::~MaskedStatisticsImageFilter ( )
inlineoverrideprotected

Definition at line 152 of file itkMaskedStatisticsImageFilter.h.

Member Function Documentation

◆ AfterThreadedGenerateData()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
void itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::AfterThreadedGenerateData ( )
overrideprotected

Do final mean and variance computation from data accumulated in threads.

◆ AllocateOutputs()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
void itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::AllocateOutputs ( )
overrideprotected

Pass the input through unmodified. Do this by Grafting in the AllocateOutputs method.

◆ BeforeThreadedGenerateData()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
void itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::BeforeThreadedGenerateData ( )
overrideprotected

Initialize some accumulators before the threads run.

◆ EnlargeOutputRequestedRegion()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
void itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::EnlargeOutputRequestedRegion ( DataObject *  data)
overrideprotected

◆ GenerateInputRequestedRegion()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
void itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GenerateInputRequestedRegion ( )
overrideprotected

◆ GetClassName()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
virtual const char* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetClassName ( ) const
virtual

Runtime information support.

◆ GetMask()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
virtual const MaskImageType* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetMask ( )
virtual

◆ GetMaximum()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
PixelType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetMaximum ( ) const
inline

◆ GetMaximumOutput() [1/2]

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
PixelObjectType* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetMaximumOutput ( )

◆ GetMaximumOutput() [2/2]

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
const PixelObjectType* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetMaximumOutput ( ) const

◆ GetMean()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
RealType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetMean ( ) const
inline

◆ GetMeanOutput() [1/2]

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
RealObjectType* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetMeanOutput ( )

◆ GetMeanOutput() [2/2]

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
const RealObjectType* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetMeanOutput ( ) const

◆ GetMinimum()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
PixelType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetMinimum ( ) const
inline

◆ GetMinimumOutput() [1/2]

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
PixelObjectType* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetMinimumOutput ( )

◆ GetMinimumOutput() [2/2]

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
const PixelObjectType* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetMinimumOutput ( ) const

◆ GetSigma()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
RealType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetSigma ( ) const
inline

Return the computed Standard Deviation.

Definition at line 114 of file itkMaskedStatisticsImageFilter.h.

References itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetSigmaOutput().

◆ GetSigmaOutput() [1/2]

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
RealObjectType* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetSigmaOutput ( )

◆ GetSigmaOutput() [2/2]

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
const RealObjectType* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetSigmaOutput ( ) const

◆ GetSum()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
RealType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetSum ( ) const
inline

◆ GetSumOutput() [1/2]

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
RealObjectType* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetSumOutput ( )

◆ GetSumOutput() [2/2]

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
const RealObjectType* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetSumOutput ( ) const

◆ GetVariance()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
RealType itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetVariance ( ) const
inline

◆ GetVarianceOutput() [1/2]

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
RealObjectType* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetVarianceOutput ( )

◆ GetVarianceOutput() [2/2]

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
const RealObjectType* itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::GetVarianceOutput ( ) const

◆ itkStaticConstMacro()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::itkStaticConstMacro ( ImageDimension  ,
unsigned int  ,
TInputImage::ImageDimension   
)

Image related typedefs.

◆ MakeOutput()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
DataObjectPointer itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::MakeOutput ( DataObjectPointerArraySizeType  idx)
override

◆ New()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
static Pointer itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
void itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotected

◆ SetMask()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
virtual void itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::SetMask ( const MaskImageType _arg)
virtual

◆ ThreadedGenerateData()

template<typename TInputImage , typename TMaskImage = ::itk::Image<unsigned char, TInputImage::ImageDimension>>
void itk::MaskedStatisticsImageFilter< TInputImage, TMaskImage >::ThreadedGenerateData ( const RegionType outputRegionForThread,
ThreadIdType  threadId 
)
overrideprotected

Multi-thread version GenerateData.


The documentation for this class was generated from the following file: