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

DistanceFMM1 Class Reference

#include <DistanceFMM1.hpp>

Inheritance diagram for DistanceFMM1:

Inheritance graph
[legend]
Collaboration diagram for DistanceFMM1:

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:          "A Fast Marching Level Set Method for Monotonic Advancing Fronts.", 
                        James A. Sethian, 1995, Report University of Mathematics, Berkeley, California.

                        "A second-order fast marching eikonal solver."
                        James Rickett and Sergey Fomel, Stanford Exploration Project, November 2000.
                

Bug:
last pixel is not selected

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


Public Methods

 DistanceFMM1 ()
virtual ~DistanceFMM1 ()
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 AnImagesinglePath (AnImage *src, int x0, int y0, int x1, int y1, AnImage *dest=0)
 euclidian path

virtual void report ()

Protected Methods

int getOrder (int x, int y, int dimension, int back_forward)
 determine order supported for resolution

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

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

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