In file isosurface/Isocontour.h:

class Isocontour : public GeneralFormat, public Sliceable

an isocontour class that can be used as range data

Inheritance:


Public Classes

enum EDGE_TYPE
the type of intersection that tells if the vertex lies on a row edge or a column edge and its orientation

Public Methods

unsigned int getNbRows () const
return the number of rows of the isocontour
unsigned int getNbColumns () const
return the number of columns of the isocontour
unsigned int getSliceNumber () const
return the
void clean (void)
delete any IsoscontourPixel (empty isocontour)
SegmentIterator getFirstSegment ()
returns an iterator on the segment list
TclIsocontour* getInterface () const
returns isocontour interface
void getLineColor (float &r, float &g, float &b) const
Returns the display color of lines
void getVertexColor (float &r, float &g, float &b) const
Returns the display color of vertices
float getLineWidth () const
Returns the width of a line
float getVertexSize () const
Returns the size of a displayed vertex
bool getDisplayVertex () const
Returns the vertex display mode
bool getDisplayIsocontour () const
Returns the isocontour display mode
void setLineColor (const float r, const float g, const float b)
Sets the display color of lines
void setVertexColor (const float r, const float g, const float b)
Sets the display color of vertices
void setLineWidth (const float w)
Sets the width of a line
void setVertexSize (const float s)
Sets the size of a displayed vertex
virtual void translate (const Vec2 &t)
translate the isocontour
virtual void rotate (const Rotation2D &r)
rotate the isocontour
virtual void scale (const double s)
scale the isocontour
virtual void redraw (Camera2D *cam)
the redraw function
virtual double updateRadius (const Vec2& center)
returns the isocontour radius given its center
virtual void updateCenter (Vec2& center, unsigned int& n)
Returns the isocontour center and weight
void computeCenter ()
compute the isocontour center
void computeRadius ()
compute the isocontour radius
virtual double computeClosestDistance (MouseClick& mc) const
returns closest distance from mouse click
virtual void recompute (SliceCamera *cam)
callback called when slice shown by the slice-camera has changed

Public

constructor
Isocontour (Scene2D *scene, Inrimage *inr, double _threshold, SliceCamera::SLICE_ORIENTATION orientation, unsigned int sliceNumber)
Create an Isocontour based on a slice of a volumetric image and a threshold
Destructor
virtual ~Isocontour ()
deallocates isocontour

Protected Fields

std::hash_map IsocontourVertex *, hash, equal_to > vertexHashTable
the temporary hash table to store
unsigned int nrows
the number of rows
unsigned int ncols
the number of columns
unsigned int sliceNumber
return the slice Number of the isocontour
SliceCamera::SLICE_ORIENTATION orientation
the orientation of the slice
static const double defaultHashTableRatio
ratio defining the size of the hash table as the percentage of the number of pixels
std::hash_map IsocontourPixel *, hash, equal_to > hashTable
the hash table used to store isocontour pixels
Vec2 * positionArray
the array of vertex position
unsigned int nbGlobalVertices
the number of global vertices
float lineColor [3]
the current color of a line
static const float defaultLineColor [3]
the default color of a line
float lineWidth
the current line width for the display of all lines
static const float defaultLineWidth
the default line width for the display of all lines
float vertexSize
the current vertex size for the display of all vertices
static const float defaultVertexSize
the deafult vertex size for the display of all vertices
float vertexColor [3]
the current color of a vertex
static const float defaultVertexColor [3]
the default color of a vertex
bool displayVertex
Should the vertices be displayed
bool displayIsocontour
Should the isocontour be displayed

Protected Methods

void initGraphics ()
init the graphics variables and parameters
virtual const char* getTag (void) const
returns object tag
Isocontour (Scene2D *scene)
creates an empty isocontour object
void build (Inrimage *inr, double threshold)
build the isocontour from an inrimage
template void scanImage (Inrimage *inr, double threshold)
scan image voxels and create isocontour vertices

Private Methods

void findIsocontourIntersections ()
find the isocontour intersection and store then in the hash table

Documentation

an isocontour class that can be used as range data
class IsocontourSegment
the basic item of an isocontour : a line segment joining two vertices. The normal vector is used for range information

Isocontour* getClient(void) const
set getClient() to return a Isocontour instead of a Contour2D

TclScene2D* getScene(void) const
returns the TclScene2D associated with the TclIsocontour object

static int list(TclModule *m, int d, char **a)
raise ambiguity on list() function

int vertex[2]
The two indices of the line segment. If the vertex[i]<0, then the vertex position is (IsocontourPixel *ic1)->vertex_position[-vertex[i]-1]; If vertex[i]>=0 Then the vertex position is given by (Isocontour *ic1)->vertex_position[vertex[i]]

Vec2 normal
the normal vector at the segment

constructor

IsocontourSegment(int v1, int v2, Vec2 &_normal)
Build a segment of an isocontour given its vertices and normal vector
Parameters:
v1 - the index of the first vertex : this index may be negative if the vertex belong to a isocontour pixel
v2 - the index of the second vertex : this index may be negative if the vertex belong to a isocontour pixel
normal - the normal vector of the segment

IsocontourSegment()
Build with no information : used for array initialization

destructor

virtual ~IsocontourSegment()
empty destructor

Vec2 getNormal() const
returns the normal vector of the segment

int getFirstVertex() const
returns the normal vector of the segment

class IsocontourPixel
a class that store all isocontour line segments located in a pixel

unsigned int row
row index of the pixel

unsigned int col
cilumn index of the pixel

unsigned int nbSegments
the number of line segments stored in this pixel

IsocontourSegment* segmentArray
the list of isocontour lines

unsigned int nbVertices
the number of vertices that are local to this pixel

Vec2 * vertexArray
the array of vertices that are local to this pixel (with negative indices)

constructor

IsocontourPixel(unsigned int _row=0, unsigned int _col=0, unsigned int _nSegments=0, IsocontourSegment *arrayS=0, unsigned int _nVertices=0, Vec2 *arrayV=0)
build a isocontour pixel given its row and column and the array of line segments. An isocontour pixel includes all line segments that are located inside this pixel
Parameters:
_row - the row index of the pixel
_col - the column index of the pixel
_nSegments - the number of isocontour segment located in the pixel
array - the array of isocontour segments

destructor

virtual ~IsocontourPixel()
delete vertices and segment arrays

unsigned int getRow() const
return the row index

unsigned int getCol() const
return the col index

class SegmentIterator
an iterator over isocontour segments

std::hash_map IsocontourPixel *> ::iterator itPixel
iterator on a pixel

unsigned int segmentIndex
index of the current segment

Isocontour* isocontour
Isocontour where the iterator operates

constructor

SegmentIterator(Isocontour *_isocontour)
build a SegmentIterator given an isocontour
Parameters:
_isocontour - the isocontour on which the iterator is defined

destructor

virtual ~SegmentIterator()
empty destructor

void first(void)
set iterator to first segment

bool isAtEnd(void) const
is iterator at end of segment list

IsocontourSegment* operator)(void)
returns current segment

IsocontourSegment* operator++(void)
set iterator on next segment and returns it

IsocontourSegment* operator++(int)
returns current segment then set iterator on next one

IsocontourSegment* operator--(void)
set iterator on previous segment and returns it

IsocontourSegment* operator--(int)
returns current segment then set iterator on previous one

enum EDGE_TYPE
the type of intersection that tells if the vertex lies on a row edge or a column edge and its orientation

class IsocontourVertex
a class that contains the basic information concerning the intersection of the isocontour extracted from an image with the edges of that image. This is a temporary storage of such information

unsigned int row
the row index of the vertex

unsigned int col
the column index of the vertex

Isocontour::EDGE_TYPE edgeType
the type of isocontour vertex intersection

Vec2 position
the intersection position

unsigned int index
index in the global list of vertices

constructor

IsocontourVertex(unsigned int _row, unsigned int _col, Isocontour::EDGE_TYPE _edgeType, Vec2 _position)
Create an Isocontour vertex
Parameters:
_row - the row index of the vertex
_col - the column index of the vertex
_edgeType - on which type of edge the vertex lies on
_position - subpixel position of the vertex

Destructor

virtual ~IsocontourVertex()
deallocates isocontour vertex

std::hash_map IsocontourVertex *, hash, equal_to > vertexHashTable
the temporary hash table to store

unsigned int nrows
the number of rows

unsigned int ncols
the number of columns

unsigned int sliceNumber
return the slice Number of the isocontour

SliceCamera::SLICE_ORIENTATION orientation
the orientation of the slice

static const double defaultHashTableRatio
ratio defining the size of the hash table as the percentage of the number of pixels

std::hash_map IsocontourPixel *, hash, equal_to > hashTable
the hash table used to store isocontour pixels

Vec2 * positionArray
the array of vertex position

unsigned int nbGlobalVertices
the number of global vertices

unsigned int getNbRows() const
return the number of rows of the isocontour

unsigned int getNbColumns() const
return the number of columns of the isocontour

unsigned int getSliceNumber() const
return the

constructor

Isocontour(Scene2D *scene, Inrimage *inr, double _threshold, SliceCamera::SLICE_ORIENTATION orientation, unsigned int sliceNumber)
Create an Isocontour based on a slice of a volumetric image and a threshold
Parameters:
scene - the 2D scene where the isocontour should be stored
inr - the volumetric image
_threshold - the threshold of the isocontour
the - orientation of the image slice
the - index of the image slice

Destructor

virtual ~Isocontour()
deallocates isocontour

void clean(void)
delete any IsoscontourPixel (empty isocontour)

SegmentIterator getFirstSegment()
returns an iterator on the segment list

TclIsocontour* getInterface() const
returns isocontour interface

float lineColor[3]
the current color of a line

static const float defaultLineColor[3]
the default color of a line

float lineWidth
the current line width for the display of all lines

static const float defaultLineWidth
the default line width for the display of all lines

float vertexSize
the current vertex size for the display of all vertices

static const float defaultVertexSize
the deafult vertex size for the display of all vertices

float vertexColor[3]
the current color of a vertex

static const float defaultVertexColor[3]
the default color of a vertex

bool displayVertex
Should the vertices be displayed

bool displayIsocontour
Should the isocontour be displayed

void getLineColor(float &r, float &g, float &b) const
Returns the display color of lines

void getVertexColor(float &r, float &g, float &b) const
Returns the display color of vertices

float getLineWidth() const
Returns the width of a line

float getVertexSize() const
Returns the size of a displayed vertex

bool getDisplayVertex() const
Returns the vertex display mode

bool getDisplayIsocontour() const
Returns the isocontour display mode

void setLineColor(const float r, const float g, const float b)
Sets the display color of lines

void setVertexColor(const float r, const float g, const float b)
Sets the display color of vertices

void setLineWidth(const float w)
Sets the width of a line

void setVertexSize(const float s)
Sets the size of a displayed vertex

virtual void translate(const Vec2 &t)
translate the isocontour

virtual void rotate(const Rotation2D &r)
rotate the isocontour

virtual void scale(const double s)
scale the isocontour

virtual void redraw(Camera2D *cam)
the redraw function

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

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

void computeCenter()
compute the isocontour center

void computeRadius()
compute the isocontour radius

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

virtual void recompute(SliceCamera *cam)
callback called when slice shown by the slice-camera has changed
Parameters:
cam - camera whose slice changed

void initGraphics()
init the graphics variables and parameters

virtual const char* getTag(void) const
returns object tag

void findIsocontourIntersections()
find the isocontour intersection and store then in the hash table

Isocontour(Scene2D *scene)
creates an empty isocontour object
Parameters:
scene - the 2D scene where the isocontour should be stored

void build(Inrimage *inr, double threshold)
build the isocontour from an inrimage
Parameters:
inr - source image
threshold - contour isovalue

template void scanImage(Inrimage *inr, double threshold)
scan image voxels and create isocontour vertices
Parameters:
inr - source image
threshold - contour isovalue


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