Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

MDistanceFMM Class Reference

#include <MDistanceFMM.hpp>

Inheritance diagram for MDistanceFMM:

Inheritance graph
[legend]
Collaboration diagram for MDistanceFMM:

Collaboration graph
[legend]
List of all members.

Detailed Description

Multi front Distance based Fast Marching Method.

Author:
Bernard De Cuyper
Version:
0.05
Date:
15/06/2002
 
Purpose:        Define a Fast Marching Method applied for direct distance maps
                        and distance based data feeding. (e.g.: OUT/IN tactic, and more)
                        Extensions to three dimension is obvious. My computer is too small
                        for 3D.                                                 

Note:           We may inherit from AnImageOp, but we think there is much more
                        in the fast marching that simply filtering and distance maps.
                        It is simply a fantastic idea of Sethian & all.

Paper:          "Optimal Algorithm for Shape from Shading and Path Planning.", 
                        Ron Kimmel, James A. Sethian, Kluweer Academic Publishers 2001 , Netherlands.
                

Bug:
last pixel is not selected

@ Copyrights: Bernard De Cuyper & Eddy Fraiha 2002, Eggs & Pictures. MIT/Open BSD copyright model.


Public Methods

 MDistanceFMM (int amaskFlag=1)
virtual ~MDistanceFMM ()
virtual void setMaskActivity (int amaskFlag)
virtual double getDistance (int x, int y)
virtual int getFront (int x, int y)
virtual StatePsi getLabel (int x, int y)
virtual double getSpeedCoeff (int fronNumber)
virtual void setData (int w, int h, double v0, int x0, int y0, double v1, int x1, int y1)
 You may want to load the image part too, for advanced Fast Marching.

virtual void setData (int w, int h, int n, int *frontNum, double *v, int *xMask, int *yMask)
virtual void setData (int w, int h, int n0, double v0, int *xMask0, int *yMask0, int n1, double v1, int *xMask1, int *yMask1)
virtual void setData (AnImage *im)
virtual int getMaxIterations ()
virtual int numberOfIteration ()
virtual void setIteration (int i)
virtual bool iterate ()
 simple iteration

virtual bool iterate (int *x, int *y)
 iteration

virtual bool iterate (int *x, int *y, double *rate)
 iteration

virtual RImagecompute (RImage *dest=0)
 multiple FMM iterations

virtual void sortedArea (AnImage *mask, int *npoints, int **xposition, int **yposition, bool inside=true)
 sort all pixels from the border to inside the object area

virtual void sortedArea (AnImage *mask, int *npoints, int **xposition, int **yposition, double **rating, bool inside=true)
 sort all pixels from the border to inside the object area

virtual AnImagefilter (AnImage *mask, AnImage *dest=0)
 like an image op generate a variant of a distance map or more

virtual AnImageselectedFilter (AnImage *mask, AnImage *src, AnImage *dest=0)
 Local filtering in a mask area.

virtual RImagerfilter (AnImage *mask, RImage *dest=0)
 measures

virtual AnImagegreyLabelFilter (AnImage *src, AnImage *dest=0)
 need setData

virtual AnImagecolorLabelFilter (AnImage *src, AnImage *dest=0)
virtual AnImagebidirPath (AnImage *src, double v0, int x0, int y0, double v1, int x1, int y1, AnImage *dest=0)
virtual void report ()

Static Public Attributes

const int lookupTable [256][3]

Protected Methods

virtual double getPotential (int i, int j)
 return a local potential value

virtual MPsi2DValueselect ()
virtual void getSelectionNeighbour (int x, int y)
virtual void resolve (int x, int y)

Protected Attributes

int frontMax
double * speedFactor
int maskFlag
int iteration
double selectedDistance
double root2
double slowness
MNeigbourSetneigbourSet
MCandidateHeapListcandidateList
int iterMax
int width
int height
MDomainOfActiondmap
 kind of distance map

int xSelected
 current selected point position

int ySelected
 current selected point position

int currentFront
 current selected point position


Member Function Documentation

virtual double MDistanceFMM::getPotential int    i,
int    j
[inline, protected, virtual]
 

return a local potential value

Parameters:
i  is the x position
j  is the y position
Returns :
is local value like a distance, an edge strength, ...
A distance map increase always. Overload this function gives Wondering Power e..g: using edge indicators, images, ... ;-) MAGIC, Think now! DO NOT FORGET: for good result the returned value MUST BE > 0 all the time (in the tracked area)

virtual bool MDistanceFMM::iterate int *    x,
int *    y,
double *    rate
[inline, virtual]
 

iteration

Parameters:
x  is the x position selected FMM point
y  is the y position selected FMM point
rate  is the calculated value of the selected FMM point
Returns :
boolean , test succeeding iteration,
point tracking used for animation from border to ... :-) MAKE BURNING STUFF 0. MDistanceFMM outIn; 1. outIn.setData(...) 2. while( outIn.iterate(...) ){ <What you like> } or rc= MDistanceFMM.iterate(&x,&y); // n times

virtual bool MDistanceFMM::iterate int *    x,
int *    y
[inline, virtual]
 

iteration

Parameters:
x  is the x position selected FMM point
y  is the y position selected FMM point
Returns :
boolean , test succeeding iteration,
point tracking used for animation from border to ... :-) MAKE BURNING STUFF 0. MDistanceFMM outIn; 1. outIn.setData(...) 2. while( outIn.iterate(...) ){ <What you like> } or rc= MDistanceFMM.iterate(&x,&y); // n times

AnImage * MDistanceFMM::selectedFilter AnImage   mask,
AnImage   src,
AnImage   dest = 0
[virtual]
 

Local filtering in a mask area.

Parameters:
mask  is AnImage* is a ByteImage
src  is AnImage* is AnImage source channel
dest  is AnImage* is AnImage result/placeholder
Returns :
AnImage* as result,

Reimplemented from AnImageOp.


The documentation for this class was generated from the following files:
SourceForge.net Logo
Restoreinpaint sourceforge project `C++/Java Image Processing, Restoration, Inpainting Project'.

Bernard De Cuyper: Open Project Leader: Concept, design and development.
Bernard De Cuyper & Eddy Fraiha 2002, 2003. Bernard De Cuyper 2004. Open and free, for friendly usage only.
Modifications on Belgium ground of this piece of artistic work, by governement institutions or companies, must be notified to Bernard De Cuyper.
bern_bdc@hotmail.com