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

DistanceFMM_O2 Class Reference

#include <DistanceFMM_O2.hpp>

Inheritance diagram for DistanceFMM_O2:

Inheritance graph
[legend]
Collaboration diagram for DistanceFMM_O2:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

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

virtual void setData (int w, int h, int n, int *xMask, int *yMask)
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 AnImagesinglePath (AnImage *src, int x0, int y0, int x1, int y1, AnImage *dest=0)
 euclidian path

virtual void report ()

Protected Methods

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

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

Protected Attributes

int maskFlag
int iteration
double selectedDistance
double root2
double slowness
NeigbourSetneigbourSet
CandidateHeapListcandidateList
int iterMax
int width
int height
DomainOfActiondmap
 kind of distance map

int xSelected
 current selected point position

int ySelected
 current selected point position


Member Function Documentation

virtual double DistanceFMM_O2::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 DistanceFMM_O2::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. DistanceFMM_O2 outIn; 1. outIn.setData(...) 2. while( outIn.iterate(...) ){ <What you like> } or rc= DistanceFMM_O2.iterate(&x,&y); // n times

virtual bool DistanceFMM_O2::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. DistanceFMM_O2 outIn; 1. outIn.setData(...) 2. while( outIn.iterate(...) ){ <What you like> } or rc= DistanceFMM_O2.iterate(&x,&y); // n times

AnImage * DistanceFMM_O2::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