NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Computes the threshold required to separate an object or patient in the foreground of an image from a dark background. More...
Public Types | |
typedef ForegroundFromBackgroundImageThresholdCalculator | Self |
typedef Object | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef TInputImage | ImageType |
typedef TInputImage::Pointer | ImagePointer |
typedef TInputImage::ConstPointer | ImageConstPointer |
typedef TInputImage::PixelType | PixelType |
typedef TInputImage::IndexType | IndexType |
typedef TInputImage::RegionType | RegionType |
typedef itk::Statistics::ImageToHistogramFilter < TInputImage > | ImageToHistogramFilterType |
typedef ImageToHistogramFilterType::HistogramType | HistogramType |
typedef itk::Array< double > | ArrayType |
Public Member Functions | |
virtual const char * | GetClassName () const |
virtual void | SetImage (const ImageType *_arg) |
void | Compute (void) throw (ExceptionObject) |
virtual PixelType | GetThreshold () const |
void | SetRegion (const RegionType ®ion) |
void | SetVerbose (bool flag) |
void | SetVerboseOn (void) |
void | SetVerboseOff (void) |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
ForegroundFromBackgroundImageThresholdCalculator () | |
virtual | ~ForegroundFromBackgroundImageThresholdCalculator () |
void | PrintSelf (std::ostream &os, Indent indent) const override |
void | WriteHistogramToTextFile (std::string fileName, HistogramType *histogram) |
void | WriteDataToTextFile (std::string fileName, itk::Array< double > *x, itk::Array< double > *y) |
void | Normalise (itk::Array< double > *y) |
void | ComputeVariances (int iStart, int iInc, unsigned int nIntensities, PixelType firstIntensity) |
Protected Attributes | |
bool | m_FlgVerbose |
PixelType | m_Threshold |
ImageConstPointer | m_Image |
RegionType | m_Region |
bool | m_RegionSetByUser |
Computes the threshold required to separate an object or patient in the foreground of an image from a dark background.
This calculator computes a threshold to separate an object (i.e. the patient) from the background using the following criteria:
The threshold is therefore equal to:
( MaxIntensity - t )*( CDF( t ) - Variance( t )/Max_Variance )
where:
CDF( t ) is the cummulative distribution of intensities below t
Variance( t ) is the variance of intensities below t.
typedef itk::Array< double > itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::ArrayType |
Type definition for the arrays used
typedef SmartPointer< const Self > itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::ConstPointer |
typedef ImageToHistogramFilterType::HistogramType itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::HistogramType |
Type definition for the image histogram.
typedef TInputImage::ConstPointer itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::ImageConstPointer |
Const Pointer type for the image.
typedef TInputImage::Pointer itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::ImagePointer |
Pointer type for the image.
typedef itk::Statistics::ImageToHistogramFilter< TInputImage > itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::ImageToHistogramFilterType |
Type definition for the image histogram.
typedef TInputImage itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::ImageType |
Type definition for the input image.
typedef TInputImage::IndexType itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::IndexType |
Type definition for the input image index type.
typedef TInputImage::PixelType itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::PixelType |
Type definition for the input image pixel type.
typedef SmartPointer< Self > itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::Pointer |
typedef TInputImage::RegionType itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::RegionType |
Type definition for the input image region type.
typedef ForegroundFromBackgroundImageThresholdCalculator itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::Self |
Standard class typedefs.
typedef Object itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::Superclass |
|
protected |
|
inlineprotectedvirtual |
void itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::Compute | ( | void | ) | ||
throw | ( | ExceptionObject | |||
) |
Compute the threshold to separate the forground from the background.
|
protected |
|
virtual |
Run-time type information (and related methods).
|
virtual |
Return the threshold intensity value.
|
static |
Method for creation through the object factory.
|
protected |
|
overrideprotected |
|
virtual |
Set the input image.
void itk::ForegroundFromBackgroundImageThresholdCalculator< TInputImage >::SetRegion | ( | const RegionType & | region | ) |
Set the region over which the values will be computed
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |