In file levelsets/LevelSets2D.h:

class LevelSets2D : public Data2D, public DeformableModel2D

a 2D level set

Inheritance:


Public Methods

LevelSets2D (Scene2D *scene, unsigned int xdim, unsigned int ydim, Contour2D &contour, double vx = 1.0, double vy = 1.0, unsigned int narrowBandWidth = 0)
2D level set constructor
virtual ~LevelSets2D ()
destroy level set and associated isocontour
const Inrimage& getInrimage (void) const
returns buffer image
void setFirstNarrowBandWidth (const double _size)
set the size of the first narrow band
void setSecondNarrowBandWidth (const double _size)
set the size of the second narrow band
virtual void redraw (Camera2D *cam)
redraw method
virtual void updateCenter (Vec2& center, unsigned int& n)
Returns the graphic object center and weight
virtual double updateRadius (const Vec2& center)
returns the graphic object radius given its center
virtual double computeClosestDistance (MouseClick& mc) const
returns closest distance from mouse click
virtual void iterate (const unsigned int n)
routine that performs some deformation iterations on a deformable model
TclLevelSets2D* getInterface (void) const
returns object interface

Protected Fields

Inrimage* image
the main image where the level sets are defined
Inrimage* curvature
the curvature image
IsoLevel2D* isolevel
associated isocontour for visualization
double dt
the time step used during each iteration based on an explicit scheme
double firstNarrowBandWidth
the size in terms of distance of the first narrow band where the level set should always belong
double secondNarrowBandWidth
the size in terms of distance of the second narrow band where all voxels are updated
std::list <VoxelComputation *> firstNarrowBand
the first narrow band that contains the level set corresponding to the isovalue 0
std::list <VoxelComputation *> secondNarrowBand
the second narrow band where all voxels are updated
double balloon
balloon force coefficient
bool modified
does the 0 level set need to be recomputed for display
bool drawNarrowBand
whether to draw narrow band
bool narrowBandModified
whether narrow band chaged since last redraw

Private Methods

void initBufferFromContour (Contour2D &contour)
Sets each voxel to the signed distance to the closest vertex of a given contour
void buildNarrowBand ()
build level set narrow band once it has been initialized
void resetNarrowBand ()
reset narrow band after the level set crashes
void setTag (const char *tag)
change isocontour set graphic tag
static double getCurvatureTimesNorm (double ***src, unsigned int x, unsigned int y, unsigned int z)
compute curvature * |gradient(image)| in src image at voxel (x,y,z)
static double getCurvatureAndNorm (double ***src, unsigned int x, unsigned int y, unsigned int z, double &norm)
compute curvature in src image at voxel (x,y,z)
static double getExternal (double ***src, unsigned int x, unsigned int y, unsigned int z, double v)
compute v * |gradient(image)| using a stable scheme

Documentation

a 2D level set
class VoxelComputation
a narrow-band voxel

unsigned int row
the row index of the voxel

unsigned int col
the column index of the voxel

double& value
the reference of the voxel value in the double image

VoxelComputation(unsigned int r, unsigned int c, double &v)
builds a voxel from its location in image plane and value
Parameters:
r - voxel row (Y coordinate)
c - voxel column (X coordinate)
v - voxel value

unsigned int getRow() const
returns voxel row (Y coordinate)

unsigned int getColumn() const
returns voxel columne (X coordinate)

double getValue() const
returns voxel value (at create time)

Inrimage* image
the main image where the level sets are defined

Inrimage* curvature
the curvature image

IsoLevel2D* isolevel
associated isocontour for visualization

double dt
the time step used during each iteration based on an explicit scheme

double firstNarrowBandWidth
the size in terms of distance of the first narrow band where the level set should always belong

double secondNarrowBandWidth
the size in terms of distance of the second narrow band where all voxels are updated

std::list <VoxelComputation *> firstNarrowBand
the first narrow band that contains the level set corresponding to the isovalue 0.0

std::list <VoxelComputation *> secondNarrowBand
the second narrow band where all voxels are updated

double balloon
balloon force coefficient

bool modified
does the 0 level set need to be recomputed for display

bool drawNarrowBand
whether to draw narrow band

bool narrowBandModified
whether narrow band chaged since last redraw

LevelSets2D(Scene2D *scene, unsigned int xdim, unsigned int ydim, Contour2D &contour, double vx = 1.0, double vy = 1.0, unsigned int narrowBandWidth = 0)
2D level set constructor
Parameters:
scene - 2D scene to put level set in
xdim - level set buffer X dimension
xdim - level set buffer Y dimension
ratio - image voxel/level set sampling ratio
vx - X sampling frequency (X voxel size)
vy - Y sampling frequency (Y voxel size)
narrowBandWidth - narrow band width (0 = no narrow band)

virtual ~LevelSets2D()
destroy level set and associated isocontour

const Inrimage& getInrimage(void) const
returns buffer image

void setFirstNarrowBandWidth(const double _size)
set the size of the first narrow band

void setSecondNarrowBandWidth(const double _size)
set the size of the second narrow band

virtual void redraw(Camera2D *cam)
redraw method
Parameters:
cam - camera to redraw level set in

virtual void updateCenter(Vec2& center, unsigned int& n)
Returns the graphic object center and weight. The weight is a measure of the number of primitives to allow barycentric computation of the whole scene center.
Parameters:
center - returned center
n - returned weight

virtual double updateRadius(const Vec2& center)
returns the graphic object radius given its center
Returns:
object radius
Parameters:
object - center

virtual double computeClosestDistance(MouseClick& mc) const
returns closest distance from mouse click

virtual void iterate(const unsigned int n)
routine that performs some deformation iterations on a deformable model
Parameters:
n - the number of iterations to performed. Can be set to zero

TclLevelSets2D* getInterface(void) const
returns object interface

void initBufferFromContour(Contour2D &contour)
Sets each voxel to the signed distance to the closest vertex of a given contour
Parameters:
contour - a 2D contour corresponding to the initial level set

void buildNarrowBand()
build level set narrow band once it has been initialized

void resetNarrowBand()
reset narrow band after the level set crashes

void setTag(const char *tag)
change isocontour set graphic tag

static double getCurvatureTimesNorm(double ***src, unsigned int x, unsigned int y, unsigned int z)
compute curvature * |gradient(image)| in src image at voxel (x,y,z)
Parameters:
src - triple index array of an image buffer
x - voxel X coordinate
y - voxel Y coordinate
z - voxel Z coordinate

static double getCurvatureAndNorm(double ***src, unsigned int x, unsigned int y, unsigned int z, double &norm)
compute curvature in src image at voxel (x,y,z)
Parameters:
src - triple index array of an image buffer
x - voxel X coordinate
y - voxel Y coordinate
z - voxel Z coordinate
norm - returned norm value

static double getExternal(double ***src, unsigned int x, unsigned int y, unsigned int z, double v)
compute v * |gradient(image)| using a stable scheme
Parameters:
src - triple index array of an image buffer
x - voxel X coordinate
y - voxel Y coordinate
z - voxel Z coordinate
v - normal component value


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de