MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
mds::img::CWatershedTransform< I > Class Template Reference

Class providing watershed transform. More...

#include <mdsWatershedTransform.h>

Inheritance diagram for mds::img::CWatershedTransform< I >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { TEMPLATE_PARAMETER_IS_NOT_IMAGE = I::CLASS_IMAGE }
 Check that I is an image. More...
typedef I::tImage tImage
 Input image type.
typedef I::tPixel tPixel
 Input image pixel type.
typedef CImage32 tRegionImage
 Output image containing labels of found image regions.
typedef CImage32::tPixel tRegionNumber
 Output image pixel type.

Public Member Functions

CHasOptionsaddOption (int Flag)
 Adds a given flag using bitwise OR operation.
bool checkAllOptions (int Flags) const
 Checks if all specified flags are set.
bool checkAnyOption (int Flags) const
 Checks if any of specified flags is set.
int checkOption (int Flag) const
 Checks if a single flag is set.
CHasOptionsclearOption (int Flag)
 Removes a given flag.
 CWatershedTransform (int Flags=WatershedTransform::BASINS)
 Constructor.
int getNumOfRegions () const
 Returns the final number of regions.
int getOptions () const
 Returns all flags.
bool operator() (const tImage &SrcImage, tRegionImage &DstImage)
 Estimates watershed transform of a given edge image.
CHasOptionssetOption (int Flag)
 Adds a given flag using bitwise OR operation.
CHasOptionssetOptions (int Flags)
 Sets complete flags.
 ~CWatershedTransform ()
 Destructor.

Protected Types

typedef CImage16::tPixel tDistance
 Distance from a region minimum.
typedef CImage16 tDistanceImage
 Helper distance image.
typedef std::vector< tQueuetHistogram
 Image histogram.
typedef std::pair< tSize, tSizetPixelInfo
 Histogram (queue) item.
typedef std::deque< tPixelInfotQueue
 Image histogram column.

Protected Member Functions

void assignRegionNumber (const tPixelInfo &Point, tQueue &Fifo, tDistance CurrentDistance)
 V z�vislosti na ��slech okoln�ch region� je nastaveno ��slo regionu aktu�ln�ho pixelu.
bool checkNewMinima (tQueue &Fifo, int Level)
 Zkou�� naj�t nov� lok�ln� minima na �rovn� dan� parametrem level.
void clearBorderPixels (tRegionImage &Image)
 Copies data from the internal helper segmented image.
void clearHistogram ()
 Clears the histogram.
void createHistogram (const tImage &SrcImage)
 Prepares the image histogram.
void makeBorderPixels (tRegionImage &Image)
 Copies data from the internal helper segmented image.
void preparePixels (tQueue &Fifo, int Level)
 Prepares all pixels whose intensity is equal to a given level for further processing.

Protected Attributes

tRegionNumber m_CurrentRegion
 Number of regions.
tDistanceImage m_DistanceImage
 Helper distance image.
tHistogram m_Histogram
 Input image histogram.
int m_Options
 Optional flags.
tRegionImage m_RegionImage
 Labeled image.

Detailed Description

template<class I>
class mds::img::CWatershedTransform< I >

Class providing watershed transform.


Member Typedef Documentation

template<class I >
typedef CImage16::tPixel mds::img::CWatershedTransform< I >::tDistance [protected]

Distance from a region minimum.

template<class I >
typedef CImage16 mds::img::CWatershedTransform< I >::tDistanceImage [protected]

Helper distance image.

template<class I >
typedef std::vector<tQueue> mds::img::CWatershedTransform< I >::tHistogram [protected]

Image histogram.

template<class I >
typedef I::tImage mds::img::CWatershedTransform< I >::tImage

Input image type.

template<class I >
typedef I::tPixel mds::img::CWatershedTransform< I >::tPixel

Input image pixel type.

template<class I >
typedef std::pair<tSize, tSize> mds::img::CWatershedTransform< I >::tPixelInfo [protected]

Histogram (queue) item.

template<class I >
typedef std::deque<tPixelInfo> mds::img::CWatershedTransform< I >::tQueue [protected]

Image histogram column.

template<class I >
typedef CImage32 mds::img::CWatershedTransform< I >::tRegionImage

Output image containing labels of found image regions.

Output image pixel type.


Member Enumeration Documentation

template<class I >
anonymous enum

Check that I is an image.

You will see name of this enum somewhere in compiler error message if the type I is not image.

Enumerator:
TEMPLATE_PARAMETER_IS_NOT_IMAGE 

Constructor & Destructor Documentation

Constructor.

template<class I >
mds::img::CWatershedTransform< I >::~CWatershedTransform ( )

Destructor.


Member Function Documentation

Adds a given flag using bitwise OR operation.

template<class I >
void CWatershedTransform::assignRegionNumber ( const tPixelInfo Point,
tQueue Fifo,
tDistance  CurrentDistance 
) [protected]

V z�vislosti na ��slech okoln�ch region� je nastaveno ��slo regionu aktu�ln�ho pixelu.

  • Sousedn� pixely,kter� maj� ��slo regionu MASK a vzd�lenost od povod� 0, p�id� do fronty k dal��mu zpracov�n� a nastav� jim novou vzd�lenost od povod�.
bool mds::base::CHasOptions::checkAllOptions ( int  Flags) const [inherited]

Checks if all specified flags are set.

bool mds::base::CHasOptions::checkAnyOption ( int  Flags) const [inherited]

Checks if any of specified flags is set.

template<class I >
bool CWatershedTransform::checkNewMinima ( tQueue Fifo,
int  Level 
) [protected]

Zkou�� naj�t nov� lok�ln� minima na �rovn� dan� parametrem level.

  • Pokud je nov� minimum nalezeno pokou�� se o jeho zv�t�en�/rozta�en� testov�n�m a p�id�v�n�m okoln�ch bod�
int mds::base::CHasOptions::checkOption ( int  Flag) const [inherited]

Checks if a single flag is set.

  • Returns zero on false.
template<class I >
void CWatershedTransform::clearBorderPixels ( tRegionImage Image) [protected]

Copies data from the internal helper segmented image.

Labels all border pixels (watersheds) with respect to the neighbouring regions.

template<class I >
void CWatershedTransform::clearHistogram ( ) [protected]

Clears the histogram.

Removes a given flag.

template<class I >
void CWatershedTransform::createHistogram ( const tImage SrcImage) [protected]

Prepares the image histogram.

template<class I >
int mds::img::CWatershedTransform< I >::getNumOfRegions ( ) const

Returns the final number of regions.

int mds::base::CHasOptions::getOptions ( ) const [inherited]

Returns all flags.

template<class I >
void CWatershedTransform::makeBorderPixels ( tRegionImage Image) [protected]

Copies data from the internal helper segmented image.

Marks all border pixels.

template<class I >
bool CWatershedTransform::operator() ( const tImage SrcImage,
tRegionImage DstImage 
)

Estimates watershed transform of a given edge image.

  • Produces a label image whose image pixels represent indexes of image regions.
template<class I >
void CWatershedTransform::preparePixels ( tQueue Fifo,
int  Level 
) [protected]

Prepares all pixels whose intensity is equal to a given level for further processing.

  • All pixels marked using the MASK value are going to be flooded.

Adds a given flag using bitwise OR operation.

Sets complete flags.


Member Data Documentation

template<class I >
tRegionNumber mds::img::CWatershedTransform< I >::m_CurrentRegion [protected]

Number of regions.

template<class I >
tDistanceImage mds::img::CWatershedTransform< I >::m_DistanceImage [protected]

Helper distance image.

template<class I >
tHistogram mds::img::CWatershedTransform< I >::m_Histogram [protected]

Input image histogram.

int mds::base::CHasOptions::m_Options [protected, inherited]

Optional flags.

template<class I >
tRegionImage mds::img::CWatershedTransform< I >::m_RegionImage [protected]

Labeled image.


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