ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage > Class Template Reference

#include <itkKappaSigmaThresholdImageCalculator.h>

+ Inheritance diagram for itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >:
+ Collaboration diagram for itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using InputImageConstPointer = typename InputImageType::ConstPointer
 
using InputImagePointer = typename InputImageType::Pointer
 
using InputImageType = TInputImage
 
using InputPixelType = typename InputImageType::PixelType
 
using MaskImageConstPointer = typename MaskImageType::ConstPointer
 
using MaskImagePointer = typename MaskImageType::Pointer
 
using MaskImageType = TMaskImage
 
using MaskPixelType = typename MaskImageType::PixelType
 
using Pointer = SmartPointer< Self >
 
using Self = KappaSigmaThresholdImageCalculator
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
virtual void SetImage (const InputImageType *_arg)
 
virtual void SetMask (const MaskImageType *_arg)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () 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)
 
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
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static constexpr unsigned int ImageDimension = TInputImage::ImageDimension
 
bool m_Valid { false }
 
MaskPixelType m_MaskValue
 
double m_SigmaFactor { 2 }
 
unsigned int m_NumberOfIterations { 2 }
 
InputPixelType m_Output
 
InputImageConstPointer m_Image
 
MaskImageConstPointer m_Mask
 
virtual void SetMaskValue (MaskPixelType _arg)
 
virtual MaskPixelType GetMaskValue () const
 
virtual void SetSigmaFactor (double _arg)
 
virtual double GetSigmaFactor () const
 
virtual void SetNumberOfIterations (unsigned int _arg)
 
virtual unsigned int GetNumberOfIterations () const
 
void Compute ()
 
const InputPixelTypeGetOutput () const
 
 KappaSigmaThresholdImageCalculator ()
 
 ~KappaSigmaThresholdImageCalculator () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 

Additional Inherited Members

- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
- Protected Member Functions inherited from itk::LightObject
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 ()
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TInputImage, typename TMaskImage>
class itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >

Computes a Kappa-Sigma-Clipping threshold for an image.

When an image is mostly composed of background pixels, most of the automatic thresholding methods fail to produce a relevant threshold. This is mainly because one mode (e.g the background) is over-represented in the histogram. The basic idea of Kappa-Sigma-Clipping is to find the properties of the over-represented mode and re-compute a threshold with only the pre-thresholded pixels (thus rejecting significantly different pixels iteratively). This algorithm does not converge to a specific value, hence a number of iterations must be provided.

On each iteration, the new threshold [t_(i+1)] is computed as follows (using only pixels thresholded with [t_i]):

t_(i+1) = Mean_(i+1) + Kappa * Sigma_(i+1)

Author
Gaetan Lehmann
Note
This class was taken from the Insight Journal paper: https://hdl.handle.net/1926/367

Definition at line 52 of file itkKappaSigmaThresholdImageCalculator.h.

Member Typedef Documentation

◆ ConstPointer

template<typename TInputImage , typename TMaskImage >
using itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::ConstPointer = SmartPointer<const Self>

Definition at line 61 of file itkKappaSigmaThresholdImageCalculator.h.

◆ InputImageConstPointer

template<typename TInputImage , typename TMaskImage >
using itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::InputImageConstPointer = typename InputImageType::ConstPointer

Definition at line 78 of file itkKappaSigmaThresholdImageCalculator.h.

◆ InputImagePointer

template<typename TInputImage , typename TMaskImage >
using itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::InputImagePointer = typename InputImageType::Pointer

Standard image type pointer within this class.

Definition at line 77 of file itkKappaSigmaThresholdImageCalculator.h.

◆ InputImageType

template<typename TInputImage , typename TMaskImage >
using itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::InputImageType = TInputImage

Standard image type within this class.

Definition at line 73 of file itkKappaSigmaThresholdImageCalculator.h.

◆ InputPixelType

template<typename TInputImage , typename TMaskImage >
using itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::InputPixelType = typename InputImageType::PixelType

Definition at line 82 of file itkKappaSigmaThresholdImageCalculator.h.

◆ MaskImageConstPointer

template<typename TInputImage , typename TMaskImage >
using itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::MaskImageConstPointer = typename MaskImageType::ConstPointer

Definition at line 80 of file itkKappaSigmaThresholdImageCalculator.h.

◆ MaskImagePointer

template<typename TInputImage , typename TMaskImage >
using itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::MaskImagePointer = typename MaskImageType::Pointer

Definition at line 79 of file itkKappaSigmaThresholdImageCalculator.h.

◆ MaskImageType

template<typename TInputImage , typename TMaskImage >
using itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::MaskImageType = TMaskImage

Definition at line 74 of file itkKappaSigmaThresholdImageCalculator.h.

◆ MaskPixelType

template<typename TInputImage , typename TMaskImage >
using itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::MaskPixelType = typename MaskImageType::PixelType

Definition at line 83 of file itkKappaSigmaThresholdImageCalculator.h.

◆ Pointer

template<typename TInputImage , typename TMaskImage >
using itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::Pointer = SmartPointer<Self>

Definition at line 60 of file itkKappaSigmaThresholdImageCalculator.h.

◆ Self

template<typename TInputImage , typename TMaskImage >
using itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::Self = KappaSigmaThresholdImageCalculator

Standard class type aliases.

Definition at line 58 of file itkKappaSigmaThresholdImageCalculator.h.

◆ Superclass

template<typename TInputImage , typename TMaskImage >
using itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::Superclass = Object

Definition at line 59 of file itkKappaSigmaThresholdImageCalculator.h.

Constructor & Destructor Documentation

◆ KappaSigmaThresholdImageCalculator()

template<typename TInputImage , typename TMaskImage >
itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::KappaSigmaThresholdImageCalculator ( )
protected

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

◆ ~KappaSigmaThresholdImageCalculator()

template<typename TInputImage , typename TMaskImage >
itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::~KappaSigmaThresholdImageCalculator ( )
overrideprotecteddefault

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

Member Function Documentation

◆ Compute()

template<typename TInputImage , typename TMaskImage >
void itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::Compute ( )

Run and compute threshold.

◆ CreateAnother()

template<typename TInputImage , typename TMaskImage >
virtual::itk::LightObject::Pointer itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

◆ GetMaskValue()

template<typename TInputImage , typename TMaskImage >
virtual MaskPixelType itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::GetMaskValue ( ) const
virtual

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

◆ GetNameOfClass()

template<typename TInputImage , typename TMaskImage >
virtual const char* itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Object.

◆ GetNumberOfIterations()

template<typename TInputImage , typename TMaskImage >
virtual unsigned int itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::GetNumberOfIterations ( ) const
virtual

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

◆ GetOutput()

template<typename TInputImage , typename TMaskImage >
const InputPixelType& itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::GetOutput ( ) const

Get the computed threshold.

◆ GetSigmaFactor()

template<typename TInputImage , typename TMaskImage >
virtual double itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::GetSigmaFactor ( ) const
virtual

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

◆ New()

template<typename TInputImage , typename TMaskImage >
static Pointer itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

template<typename TInputImage , typename TMaskImage >
void itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

Reimplemented from itk::Object.

◆ SetImage()

template<typename TInputImage , typename TMaskImage >
virtual void itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::SetImage ( const InputImageType _arg)
virtual

Set the input image.

◆ SetMask()

template<typename TInputImage , typename TMaskImage >
virtual void itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::SetMask ( const MaskImageType _arg)
virtual

Set an optional input mask to only consider in the computation pixels with a specific mask value (MaskValue). If no mask is set (default), the entire image will be considered.

◆ SetMaskValue()

template<typename TInputImage , typename TMaskImage >
virtual void itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::SetMaskValue ( MaskPixelType  _arg)
virtual

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

◆ SetNumberOfIterations()

template<typename TInputImage , typename TMaskImage >
virtual void itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::SetNumberOfIterations ( unsigned int  _arg)
virtual

Set the number of rejection passes.

◆ SetSigmaFactor()

template<typename TInputImage , typename TMaskImage >
virtual void itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::SetSigmaFactor ( double  _arg)
virtual

Set the Sigma multiplier (Kappa) to adjust the pixel rejection rate.

Member Data Documentation

◆ ImageDimension

template<typename TInputImage , typename TMaskImage >
constexpr unsigned int itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::ImageDimension = TInputImage::ImageDimension
staticconstexpr

Extract the dimension of the image.

Definition at line 70 of file itkKappaSigmaThresholdImageCalculator.h.

◆ m_Image

template<typename TInputImage , typename TMaskImage >
InputImageConstPointer itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::m_Image
private

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

Definition at line 131 of file itkKappaSigmaThresholdImageCalculator.h.

◆ m_Mask

template<typename TInputImage , typename TMaskImage >
MaskImageConstPointer itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::m_Mask
private

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

Definition at line 132 of file itkKappaSigmaThresholdImageCalculator.h.

◆ m_MaskValue

template<typename TInputImage , typename TMaskImage >
MaskPixelType itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::m_MaskValue
private

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

Definition at line 126 of file itkKappaSigmaThresholdImageCalculator.h.

◆ m_NumberOfIterations

template<typename TInputImage , typename TMaskImage >
unsigned int itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::m_NumberOfIterations { 2 }
private

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

Definition at line 128 of file itkKappaSigmaThresholdImageCalculator.h.

◆ m_Output

template<typename TInputImage , typename TMaskImage >
InputPixelType itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::m_Output
private

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

Definition at line 129 of file itkKappaSigmaThresholdImageCalculator.h.

◆ m_SigmaFactor

template<typename TInputImage , typename TMaskImage >
double itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::m_SigmaFactor { 2 }
private

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

Definition at line 127 of file itkKappaSigmaThresholdImageCalculator.h.

◆ m_Valid

template<typename TInputImage , typename TMaskImage >
bool itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::m_Valid { false }
private

Set the mask value used to select which pixels will be considered in the computation (e.g. only pixels which satisfy (m_Mask->GetPixel(Index()) == m_MaskValue) are considered).

Definition at line 125 of file itkKappaSigmaThresholdImageCalculator.h.


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