Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Bial::Cell Class Reference

The Cell class is used in MarchingCubes algorithm to describe a single marching cube data. More...

#include <MarchingCubes.hpp>

Collaboration diagram for Bial::Cell:
Collaboration graph

Public Member Functions

void calcIdx (float isolevel)
 Calculates the cell index (idx) based on the vertex positions and values.
The cell index can be represented as a 8-bit number, each vertex is represented by one bit. More...
 
void printIdx ()
 Simple function to print the index to console. More...
 
void set (size_t idx, float v, int dir, const Vector3D &pos)
 Function to set the attributes related to each vertex. More...
 

Public Attributes

std::array< Vector3D, 8 > p
 Position of each cell vertex. More...
 
std::array< float, 8 > val
 Intensity of each cell vertex. More...
 
std::array< int, 8 > dir
 Normal of each cell vertex. More...
 
unsigned char idx
 Cell index. More...
 

Detailed Description

The Cell class is used in MarchingCubes algorithm to describe a single marching cube data.

Definition at line 28 of file MarchingCubes.hpp.

Member Function Documentation

void Bial::Cell::calcIdx ( float  isolevel)

Calculates the cell index (idx) based on the vertex positions and values.
The cell index can be represented as a 8-bit number, each vertex is represented by one bit.

Parameters
Isolevelis used to determine if the vertex is positive or negative.
void Bial::Cell::printIdx ( )

Simple function to print the index to console.

void Bial::Cell::set ( size_t  idx,
float  v,
int  dir,
const Vector3D pos 
)

Function to set the attributes related to each vertex.

Parameters
idxVertex index ( It's not the cell index )
vIntensity at vertex[idx]
dirNormal at vertex[idx]
posPosition at vertex[idx]

Member Data Documentation

std::array< int, 8 > Bial::Cell::dir

Normal of each cell vertex.

Definition at line 42 of file MarchingCubes.hpp.

unsigned char Bial::Cell::idx

Cell index.

Definition at line 46 of file MarchingCubes.hpp.

std::array< Vector3D, 8 > Bial::Cell::p

Position of each cell vertex.

Definition at line 34 of file MarchingCubes.hpp.

std::array< float, 8 > Bial::Cell::val

Intensity of each cell vertex.

Definition at line 38 of file MarchingCubes.hpp.


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