ITK
4.13.0
Insight Segmentation and Registration Toolkit
|
#include <itkKappaSigmaThresholdImageCalculator.h>
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)
Definition at line 51 of file itkKappaSigmaThresholdImageCalculator.h.
Public Types | |
typedef SmartPointer< const Self > | ConstPointer |
typedef InputImageType::ConstPointer | InputImageConstPointer |
typedef InputImageType::Pointer | InputImagePointer |
typedef TInputImage | InputImageType |
typedef InputImageType::PixelType | InputPixelType |
typedef MaskImageType::ConstPointer | MaskImageConstPointer |
typedef MaskImageType::Pointer | MaskImagePointer |
typedef TMaskImage | MaskImageType |
typedef MaskImageType::PixelType | MaskPixelType |
typedef SmartPointer< Self > | Pointer |
typedef KappaSigmaThresholdImageCalculator | Self |
typedef Object | Superclass |
Public Types inherited from itk::Object | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef Object | Self |
typedef LightObject | Superclass |
Public Types inherited from itk::LightObject | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef LightObject | Self |
Public Member Functions | |
void | Compute () |
virtual ::itk::LightObject::Pointer | CreateAnother () const |
virtual const char * | GetNameOfClass () const |
const InputPixelType & | GetOutput () const |
virtual void | SetImage (const InputImageType *_arg) |
virtual void | SetMask (const MaskImageType *_arg) |
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 |
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 |
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 |
virtual void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) |
void | SetDebug (bool debugFlag) const |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
virtual void | SetReferenceCount (int) override |
virtual void | UnRegister () const noexceptoverride |
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 const unsigned int | ImageDimension = TInputImage::ImageDimension |
Protected Member Functions | |
KappaSigmaThresholdImageCalculator () | |
virtual void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual | ~KappaSigmaThresholdImageCalculator () override |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
virtual void | SetTimeStamp (const TimeStamp &time) |
virtual | ~Object () override |
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 () |
Private Attributes | |
InputImageConstPointer | m_Image |
MaskImageConstPointer | m_Mask |
MaskPixelType | m_MaskValue |
unsigned int | m_NumberOfIterations |
InputPixelType | m_Output |
double | m_SigmaFactor |
bool | m_Valid |
Additional Inherited Members | |
Protected Attributes inherited from itk::LightObject | |
AtomicInt< int > | m_ReferenceCount |
typedef SmartPointer< const Self > itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::ConstPointer |
Definition at line 58 of file itkKappaSigmaThresholdImageCalculator.h.
typedef InputImageType::ConstPointer itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::InputImageConstPointer |
Definition at line 76 of file itkKappaSigmaThresholdImageCalculator.h.
typedef InputImageType::Pointer itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::InputImagePointer |
Standard image type pointer within this class.
Definition at line 75 of file itkKappaSigmaThresholdImageCalculator.h.
typedef TInputImage itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::InputImageType |
Standard image type within this class.
Definition at line 71 of file itkKappaSigmaThresholdImageCalculator.h.
typedef InputImageType::PixelType itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::InputPixelType |
Definition at line 80 of file itkKappaSigmaThresholdImageCalculator.h.
typedef MaskImageType::ConstPointer itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::MaskImageConstPointer |
Definition at line 78 of file itkKappaSigmaThresholdImageCalculator.h.
typedef MaskImageType::Pointer itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::MaskImagePointer |
Definition at line 77 of file itkKappaSigmaThresholdImageCalculator.h.
typedef TMaskImage itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::MaskImageType |
Definition at line 72 of file itkKappaSigmaThresholdImageCalculator.h.
typedef MaskImageType::PixelType itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::MaskPixelType |
Definition at line 81 of file itkKappaSigmaThresholdImageCalculator.h.
typedef SmartPointer< Self > itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::Pointer |
Definition at line 57 of file itkKappaSigmaThresholdImageCalculator.h.
typedef KappaSigmaThresholdImageCalculator itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::Self |
Standard class typedefs.
Definition at line 55 of file itkKappaSigmaThresholdImageCalculator.h.
typedef Object itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::Superclass |
Definition at line 56 of file itkKappaSigmaThresholdImageCalculator.h.
|
protected |
|
inlineoverrideprotectedvirtual |
Definition at line 116 of file itkKappaSigmaThresholdImageCalculator.h.
void itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::Compute | ( | ) |
Run and compute threshold.
|
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.
|
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).
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::Object.
|
virtual |
Set the number of rejection passes.
const InputPixelType& itk::KappaSigmaThresholdImageCalculator< TInputImage, TMaskImage >::GetOutput | ( | ) | const |
Get the computed threshold.
|
virtual |
Set the Sigma multiplier (Kappa) to adjust the pixel rejection rate.
|
static |
Method for creation through the object factory.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::Object.
|
virtual |
Set the input image.
|
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.
|
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).
|
virtual |
Set the number of rejection passes.
|
virtual |
Set the Sigma multiplier (Kappa) to adjust the pixel rejection rate.
|
static |
Extract the dimension of the image.
Definition at line 68 of file itkKappaSigmaThresholdImageCalculator.h.
|
private |
Definition at line 128 of file itkKappaSigmaThresholdImageCalculator.h.
|
private |
Definition at line 129 of file itkKappaSigmaThresholdImageCalculator.h.
|
private |
Definition at line 123 of file itkKappaSigmaThresholdImageCalculator.h.
|
private |
Definition at line 125 of file itkKappaSigmaThresholdImageCalculator.h.
|
private |
Definition at line 126 of file itkKappaSigmaThresholdImageCalculator.h.
|
private |
Definition at line 124 of file itkKappaSigmaThresholdImageCalculator.h.
|
private |
Definition at line 120 of file itkKappaSigmaThresholdImageCalculator.h.