Display::SmoothMask4D Class Reference

#include <smoothmask4d.h>

List of all members.


Detailed Description

Display an smoothed mesh for a 4D mask.

Display a mesh for a mask. It is an isosurface whose isovalue represents the boundary of the mask.

This classes uses a binary mask of any type. Possible values of the masks are 0 and anything but 0.

For better results use the following OpenGL initialization:

   glShadeModel(GL_SMOOTH);
   glEnable(GL_DEPTH_TEST);
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

To use it, use:

   unsigned char* volume; // e.g., [512*512*512*10] volume
   unsigned char* mask;   // e.g., [512*512*512*10] fill mask
   Display::SmoothMask4D displayMask;

   displayMask.update(volume, mask, 512,512,512,10);

   glColor3f(0.8,0,0); // color of the mask
   displayMask.display();

Public Member Functions

 SmoothMask4D ()
 ~SmoothMask4D ()
template<typename DataType, typename MaskType>
void update (const DataType *data, const MaskType *mask, unsigned int width, unsigned int height, unsigned int depth, unsigned int nb_frames)
void setFrame (unsigned int frame)
void display () const
void clear ()

Classes

struct  GRIDCELL
struct  TRIANGLE
struct  XYZ

Constructor & Destructor Documentation

Display::SmoothMask4D::SmoothMask4D (  ) 

Display::SmoothMask4D::~SmoothMask4D (  ) 


Member Function Documentation

template<typename DataType, typename MaskType>
void Display::SmoothMask4D::update ( const DataType *  data,
const MaskType *  mask,
unsigned int  width,
unsigned int  height,
unsigned int  depth,
unsigned int  nb_frames 
) [inline]

update the visualizer with a new mask internally creates or update the display list

Parameters:
data volume data (we will get its gradient for the surface normal
mask binary mask (either 0 or else)

void Display::SmoothMask4D::setFrame ( unsigned int  frame  ) 

set the frame number to display

void Display::SmoothMask4D::display (  )  const

display the display list

void Display::SmoothMask4D::clear (  ) 

clear the 4D mask, remove any display list


The documentation for this class was generated from the following file:

Generated on Tue Aug 4 17:57:43 2009 for libvd by  doxygen 1.5.5