Creation of skeleton images. More...
#include <Skeleton.h>
Classes | |
class | ApplyVecDiffusionThreadParams |
class | InputParameters |
Skeleton input parameters. More... | |
class | OutputParameters |
Skeleton output parameters. More... | |
Public Member Functions | |
bool | execute (AlgorithmOutputParameters &outputParams) throw ( te::rp::Exception ) |
Executes the algorithm using the supplied parameters. More... | |
bool | initialize (const AlgorithmInputParameters &inputParams) throw ( te::rp::Exception ) |
Initialize the algorithm instance making it ready for execution. More... | |
bool | isInitialized () const |
Returns true if the algorithm instance is initialized and ready for execution. More... | |
void | reset () throw ( te::rp::Exception ) |
Clear all internal allocated objects and reset the algorithm to its initial state. More... | |
Skeleton () | |
~Skeleton () | |
Protected Member Functions | |
template<typename MatrixElementT > | |
bool | applyMeanSmooth (const te::rp::Matrix< MatrixElementT > &input, te::rp::Matrix< MatrixElementT > &output) const |
Apply a mean filter. More... | |
bool | applyVecDiffusion (const te::rp::Matrix< double > &inputX, const te::rp::Matrix< double > &inputY, te::rp::Matrix< double > const *const backgroundDataPtr, te::common::TaskProgress *progressPtr, te::rp::Matrix< double > &outputX, te::rp::Matrix< double > &outputY) const |
Apply a vector diffusion over the given vector field. More... | |
bool | createSkeletonStrengthMap (const te::rp::Matrix< double > &inputX, const te::rp::Matrix< double > &inputY, const te::rp::Matrix< double > &edgeStrengthMap, te::rp::Matrix< double > &skelMap) const |
Create a skeleton strength map. More... | |
void | createTifFromVecField (const te::rp::Matrix< double > &inputVecFieldX, const te::rp::Matrix< double > &inputVecFieldY, te::rp::Matrix< double > const *const backGroundMapPtr, const unsigned int vecPixelStep, const std::string &tifFileName) const |
Create a tiff file from a vector field. More... | |
bool | getEdgeStrengthMap (const te::rp::Matrix< double > &inputMap, te::rp::Matrix< double > &edgeStrengthMap) const |
Create an Edge strenght Map from the input data. More... | |
bool | getGradientMaps (const te::rp::Matrix< double > &inputData, const bool unitVectors, te::rp::Matrix< double > &gradXMap, te::rp::Matrix< double > &gradYMap) const |
Create an gradient maps from the input image. More... | |
template<typename MatrixElementT > | |
bool | getMagnitude (const te::rp::Matrix< double > &xMap, const te::rp::Matrix< double > &yMap, te::rp::Matrix< MatrixElementT > &magnitude) const |
Generate the magnitude map from the input vectors. More... | |
bool | loadData (te::rp::Matrix< double > &rasterData) const |
Load data from the input raster. More... | |
Static Protected Member Functions | |
static void | applyVecDiffusionThreadEntry (ApplyVecDiffusionThreadParams *paramsPtr) |
Vector diffusion thread entry. More... | |
Protected Attributes | |
Skeleton::InputParameters | m_inputParameters |
Input execution parameters. More... | |
bool | m_isInitialized |
Tells if this instance is initialized. More... | |
Creation of skeleton images.
The skeleton of a region may be defined via the media axis transformation MAT proposed by Blum [1967]. The MAT of a region R with border B is as follows: For each point p in R, we find its closest neightbor in B. If p has more than one such neighbor, it is said to belong to the medial axis (skeleton) of R.
Definition at line 70 of file Skeleton.h.
te::rp::Skeleton::Skeleton | ( | ) |
te::rp::Skeleton::~Skeleton | ( | ) |
|
inlineprotected |
Apply a mean filter.
input | The input data. |
output | The output data. |
Definition at line 247 of file Skeleton.h.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), and te::rp::Matrix< TemplateElementType >::reset().
|
protected |
Apply a vector diffusion over the given vector field.
inputX | The vector decomposed X component; |
inputY | The vector decomposed Y component; |
backGroundMapPtr | An optional background image (0 means no background image). |
progressPtr | A pointer to a progress interface or an NULL pointer. |
outputX | The diffused X component. |
outputX | The diffused Y component. |
|
staticprotected |
Vector diffusion thread entry.
paramsPtr | A pointer to the thread parameters. |
|
protected |
Create a skeleton strength map.
The skeleton strength map is a scalar map defined on every pixel and indicates the likelihood of each pixel being on the skeletons.
inputX | The vector decomposed X component; |
inputY | The vector decomposed Y component; |
edgeStrengthMap | The edge strength map (values between 0 and 1). |
skelSMap | The skeleton map (values between 0 and 1). |
|
protected |
Create a tiff file from a vector field.
inputVecFieldX | The vector decomposed X component; |
inputVecFieldY | The vector decomposed Y component; |
backGroundMapPtr | An optional background image (0 means no background image). |
vecPixelStep | The step between each vector. |
tifFileName | Tif file name. |
|
virtual |
Executes the algorithm using the supplied parameters.
outputParams | Output parameters. |
Implements te::rp::Algorithm.
|
protected |
Create an Edge strenght Map from the input data.
inputMap | The input map. |
edgeStrengthMap | The edge strength map (values between 0 and 1). |
The edge map have the property that the values are large near image boundaries and small within homogeneous regions.
|
protected |
Create an gradient maps from the input image.
inputData | The input data. |
unitVectors | If true, unit vectors will be created. |
gradXMap | The created gradient X vectors map. |
gradYMap | The created gradient Y vectors map. |
|
inlineprotected |
Generate the magnitude map from the input vectors.
xMap | The input data X component. |
yMap | The input data Y component. |
magnitude | The magnitude output data. |
Definition at line 313 of file Skeleton.h.
References te::rp::Matrix< TemplateElementType >::getColumnsNumber(), te::rp::Matrix< TemplateElementType >::getLinesNumber(), and te::rp::Matrix< TemplateElementType >::reset().
|
virtual |
Initialize the algorithm instance making it ready for execution.
inputParams | Input parameters. |
Implements te::rp::Algorithm.
|
virtual |
Returns true if the algorithm instance is initialized and ready for execution.
Implements te::rp::Algorithm.
|
protected |
Load data from the input raster.
rasterData | The loaded data buffer. |
|
virtual |
Clear all internal allocated objects and reset the algorithm to its initial state.
Implements te::rp::Algorithm.
|
protected |
Input execution parameters.
Definition at line 215 of file Skeleton.h.
|
protected |
Tells if this instance is initialized.
Definition at line 217 of file Skeleton.h.