Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

MorphologicalOperators.hpp File Reference

#include <ImLib3D/ImageProcessor.hpp>
#include <map>
#include <ImLib3D/MorphologicalOperators.hxx>

Include dependency graph for MorphologicalOperators.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  IP3D

Enumerations

enum  StructureElementType {
  MORPHO_CUSTOM, MORPHO_FORWARD, MORPHO_BACKWARD, MORPHO_ALLDIRECTIONS,
  MORPHO_Cubic27, MORPHO_Cross7, MORPHO_Planar19, MORPHO_Corner9,
  MORPHO_Pts81, MORPHO_Pts14, MORPHO_Pts4, MORPHO_Pts10,
  MORPHO_Pts5, MORPHO_Pts41, MORPHO_XYCross5, MORPHO_XZCross5,
  MORPHO_YZCross5, MORPHO_SphereR3, MORPHO_SphereR4
}
 Neighborhoods for morphological operations. More...

Functions

template<class ImageType>
void MedianFilter (const ImageType &src, const StructureElement &mask, ImageType &res)
template<class ImageType>
void SharpeningFilter (const ImageType &src, const StructureElement &mask, ImageType &res)
template<class ImageType>
void Erosion (const ImageType &src, const StructureElement &mask, ImageType &res)
template<class ImageType>
void Dilation (const ImageType &src, const StructureElement &mask, ImageType &res)
template<class ImageType>
void Opening (const ImageType &src, const StructureElement &mask, ImageType &res)
template<class ImageType>
void Closing (const ImageType &src, const StructureElement &mask, ImageType &res)
void DistanceTransform (const Mask3D &src, const StructureElement &mask, Image3Df &res, bool borderExtend=false)
template<class ImageType>
void ConnectedComponentLabelling (const ImageType &src, const StructureElement &mask0, LabelImage3D &res, typename ImageType::value_type *background0=NULL)
template<class ImageType>
pair< bool, typename ImageType::value_type > DefaultBackground ()
template<>
pair< bool, byte > DefaultBackground< Mask3D > ()
void FillHoles (const Mask3D &src, const StructureElement &mask, Mask3D &res)
template<class ImageType>
void MakeValueList (const ImageType &src, ImageValues< typename ImageType::value_type > &res)
void LargestConnectedComponent (const Mask3D &src, Mask3D &res)


Detailed Description

Definition in file MorphologicalOperators.hpp.


Enumeration Type Documentation

enum StructureElementType
 

Neighborhoods for morphological operations.

These are several values used for creating neighborhoods for morphological operations

Enumeration values:
MORPHO_CUSTOM  User defined neighborhood.
MORPHO_FORWARD  For internal dist-transform use (all points in mask before reaching center, in scan order).
MORPHO_BACKWARD  For internal dist-transform use (all points in mask after reaching center, in scan order).
MORPHO_ALLDIRECTIONS  For internal dist-transform use.
MORPHO_Cubic27  Cas du voisinage cube.
MORPHO_Cross7  Cas du voisinage croix.
MORPHO_Planar19  Cas du voisinage plans.
MORPHO_Corner9  Cas du voisinage coin.
MORPHO_XZCross5  Planar xy.
MORPHO_YZCross5  Planar xz.
MORPHO_SphereR3  Planar yz.
MORPHO_SphereR4  Sphere with radius 4.

Definition at line 30 of file MorphologicalOperators.hpp.


Function Documentation

template<class ImageType>
void IP3D::MedianFilter const ImageType &  src,
const StructureElement mask,
ImageType &  res
 

#&MedianFilter&# Median filter. Replaces each voxel by the median value of all of it's neighbors. Neighbors are defined by structure element argument. Ignores masks.

Source image type:ImageType StructureElement type:StructureElement Result image type:ImageType ~

template<class ImageType>
void IP3D::SharpeningFilter const ImageType &  src,
const StructureElement mask,
ImageType &  res
 

#&SharpeningFilter&# Sharpening filter. Replaces each voxel by the min or max value of all of it's neighbors, whichever value is closer. If both are equivalent, leaves voxel untouched. Neighbors are defined by structure element argument. Ignores masks.

Source image type:ImageType StructureElement type:StructureElement Result image type:ImageType ~

template<class ImageType>
void IP3D::Erosion const ImageType &  src,
const StructureElement mask,
ImageType &  res
 

#&Erosion&# Morphological erosion. Replaces each voxel by the minimum value of all of it's neighbors. Ignores masks.

Source image type:ImageType StructureElement type:StructureElement Result image type:ImageType ~

Referenced by IP3D::BSCode(), IP3D::Closing(), and IP3D::Opening().

template<class ImageType>
void IP3D::Dilation const ImageType &  src,
const StructureElement mask,
ImageType &  res
 

#&Dilation&# Morphological dilation. Replaces each voxel by the maximum value of all of it's neighbors. Ignores masks.

Source image type:ImageType StructureElement type:StructureElement Result image type:ImageType ~

Referenced by IP3D::Closing(), and IP3D::Opening().

template<class ImageType>
void IP3D::Opening const ImageType &  src,
const StructureElement mask,
ImageType &  res
 

#&Opening&# Morphological opening. Succesively applies an erosion and a dilation.

Source image type:ImageType StructureElement type:StructureElement Result image type:ImageType ~

Definition at line 370 of file MorphologicalOperators.hpp.

References IP3D::Dilation(), and IP3D::Erosion().

template<class ImageType>
void IP3D::Closing const ImageType &  src,
const StructureElement mask,
ImageType &  res
 

#&Closing&# Morphological closing. Succesively applies an dilation and a erosion.

Source image 1 type:ImageType StructureElement type:StructureElement Result image type:ImageType ~

Definition at line 388 of file MorphologicalOperators.hpp.

References IP3D::Dilation(), and IP3D::Erosion().

void IP3D::DistanceTransform const Mask3D src,
const StructureElement mask,
Image3Df res,
bool  borderExtend = false
 

#&DistanceTransform&# Distance to closest non zero point. Approximate distance within set, from inside outside of set. This is a fast, two pass algorithm. The StructureElement contains coefficients that define the distance to each neighbor. FIXME: These coeficients are currently not optimal, and give a slightly biased distance. By default outside of image is considered outside of shape. If border extend is true, outside of image ignored

Source image type:Mask3D StructureElement type:StructureElement Result image type:Image3Df border extend type:bool ~

template<class ImageType>
void IP3D::ConnectedComponentLabelling const ImageType &  src,
const StructureElement mask0,
LabelImage3D res,
typename ImageType::value_type *  background0 = NULL
 

#&ConnectedComponentLabelling&# Creates an integer valued image where each set of connected neighbors of source image has a seperate value. Result values go from 0 to n. Where n is the total number of separate connected components in the image. Definition of neighbors uses StructureElement.

Source image type:Mask3D StructureElement type:StructureElement Result image type:Image3Dlinear<int> ~

Referenced by SkeletonExtraction::CreateClusters().

void IP3D::FillHoles const Mask3D src,
const StructureElement mask,
Mask3D res
 

#&FillHoles&# Sets to 1 all points that are not connected to the outside of the source image. Definition of neighbors uses StructureElement. Algorithm simply uses ConnectedComponentLabelling of an enlarged image.

Source image type:Mask3D StructureElement type:StructureElement Result image type:Mask3D ~

template<class ImageType>
void IP3D::MakeValueList const ImageType &  src,
ImageValues< typename ImageType::value_type > &  res
 

#&MakeValueList&# Maps value to size, used for getting largest connected component... Needs name cleanup, will be renamed. Ignores masks.

Source image type:ImageType Maps value to size type:ImageValues ~

void IP3D::LargestConnectedComponent const Mask3D src,
Mask3D res
 

#&LargestConnectedComponent&# Selects the largest connected component. Usefull after thresholding. Uses ConnectedComponentLabelling

Source image type:Mask3D Result image type:Mask3D ~


Generated on Fri Jun 17 13:36:15 2005 for ImLib3D by  doxygen 1.4.2