![]() |
gVirtualXRay
2.0.10
VirtualX-RayImagingLibraryonGPU
|
ImplicitSurface is a class to build 3D implicit surfaces. More...
#include <ImplicitSurface.h>
Data Structures | |
class | DensityFunctionParameterType |
Type of density function parameter. More... | |
Public Types | |
enum | DensityFunctionType { SPHERE, BLOBBY_MOLECULE, META_BALL, SOFT_OBJECT } |
Type of density function. More... | |
Public Member Functions | |
ImplicitSurface () | |
Default constructor. More... | |
~ImplicitSurface () | |
Destructor. More... | |
RATIONAL_NUMBER | evaluate (RATIONAL_NUMBER r, const DensityFunctionParameterType &aParameter) const |
Evaluate the density function for the distance r. More... | |
void | resetControlPoints () |
Remove all the control points. More... | |
void | resetControlLines () |
Remove all the control lines. More... | |
void | addControlPoint (const DensityFunctionParameterType &aParameter, const VEC3 &aControlPoint) |
Add a control point. More... | |
void | addControlLine (const DensityFunctionParameterType &aParameter, const VEC3 &aControlPoint1, const VEC3 &aControlPoint2) |
Add a control line. More... | |
unsigned int | getNumberOfControlPoints () const |
Accessor on the number of control points. More... | |
unsigned int | getNumberOfControlLineSegments () const |
Accessor on the number of control line segments. More... | |
void | setControlPointParameters (unsigned int aPointID, DensityFunctionType aDentityFunction, float aParameter1, float aParameter2=0.0) |
void | setControlLineSegmentParameters (unsigned int aLineSegmentID, DensityFunctionType aDentityFunction, float aParameter1, float aParameter2=0.0) |
const VEC3 & | getControlPoint (unsigned int anIndex) const |
Accessor on a given control point. More... | |
VEC3 & | getControlPoint (unsigned int anIndex) |
Accessor on a given control point. More... | |
const std::pair< VEC3, VEC3 > & | getControlLine (unsigned int anIndex) const |
Accessor on a given control line. More... | |
std::pair< VEC3, VEC3 > & | getControlLine (unsigned int anIndex) |
Accessor on a given control line. More... | |
void | voxelise (const Vec3ui &aNumberOfVoxels, const VEC3 &aCenter, const VEC3 &aVoxelSize, unsigned char aVerboseLevel=0) |
Accessor on a given control line. More... | |
void | voxelize (const Vec3ui &aNumberOfVoxels, const VEC3 &aCenter, const VEC3 &aVoxelSize, unsigned char aVerboseLevel=0) |
Accessor on a given control line. More... | |
void | writeVoxelData (const char *aFileName) const |
Write the current voxel data into a file. More... | |
void | writeVoxelData (const std::string &aFileName) const |
Write the current voxel data into a file. More... | |
void | writePolygonMesh (const char *aFileName) |
Write the polygon data. More... | |
void | writePolygonMesh (const std::string &aFileName) |
Write the polygon data. More... | |
void | extractIsoSurface (const RATIONAL_NUMBER &aThreshold=0, unsigned char aVerboseLevel=0) |
void | extractIsoSurface (const RATIONAL_NUMBER &aLowerThreshold, const RATIONAL_NUMBER &anUpperThreshold, unsigned char aVerboseLevel=0) |
PolygonMesh & | getPolygonMesh () |
Accessor on the polygon data. More... | |
const PolygonMesh & | getPolygonMesh () const |
Accessor on the polygon data. More... | |
const Image< RATIONAL_NUMBER > & | getVolume () const |
Image< RATIONAL_NUMBER > & | getVolume () |
Protected Member Functions | |
RATIONAL_NUMBER | evaluateSphere (RATIONAL_NUMBER r) const |
RATIONAL_NUMBER | evaluateBlobbyMolecule (RATIONAL_NUMBER r, RATIONAL_NUMBER a, RATIONAL_NUMBER b) const |
RATIONAL_NUMBER | evaluateMetaBall (RATIONAL_NUMBER r, RATIONAL_NUMBER a, RATIONAL_NUMBER b) const |
RATIONAL_NUMBER | evaluateSoftObject (RATIONAL_NUMBER r, RATIONAL_NUMBER a, RATIONAL_NUMBER b) const |
Protected Attributes | |
Image< RATIONAL_NUMBER > | m_volume |
PolygonMesh | m_mesh_data |
VEC3 | m_centre |
std::vector< std::pair< DensityFunctionParameterType, VEC3 > > | m_control_point_set |
std::vector< std::pair< DensityFunctionParameterType, std::pair< VEC3, VEC3 > > > | m_control_line_set |
ImplicitSurface is a class to build 3D implicit surfaces.
Definition at line 101 of file ImplicitSurface.h.
Type of density function.
Definition at line 109 of file ImplicitSurface.h.
gVirtualXRay::ImplicitSurface::ImplicitSurface | ( | ) |
Default constructor.
gVirtualXRay::ImplicitSurface::~ImplicitSurface | ( | ) |
Destructor.
|
inline |
Add a control line.
aParameter | the parameter of the density function |
aControlPoint1 | the first point that defines the line segment |
aControlPoint2 | the second point that defines the line segment |
Definition at line 136 of file ImplicitSurface.inl.
|
inline |
Add a control point.
aParameter | the parameter of the density function |
aControlPoint | the control point to add |
Definition at line 127 of file ImplicitSurface.inl.
|
inline |
Evaluate the density function for the distance r.
r | the distance |
aParameter | the parameter of the density function |
Definition at line 86 of file ImplicitSurface.inl.
|
inlineprotected |
Definition at line 341 of file ImplicitSurface.inl.
|
inlineprotected |
Definition at line 358 of file ImplicitSurface.inl.
|
inlineprotected |
Definition at line 379 of file ImplicitSurface.inl.
|
inlineprotected |
Definition at line 326 of file ImplicitSurface.inl.
void gVirtualXRay::ImplicitSurface::extractIsoSurface | ( | const RATIONAL_NUMBER & | aThreshold = 0 , |
unsigned char | aVerboseLevel = 0 |
||
) |
Extract the surface from the voxel data corresponding to a given iso-value.
aThreshold | the threshold value |
aVerboseLevel | the level of statements in the standard output. For no output, use 0 (default value: 0) |
void gVirtualXRay::ImplicitSurface::extractIsoSurface | ( | const RATIONAL_NUMBER & | aLowerThreshold, |
const RATIONAL_NUMBER & | anUpperThreshold, | ||
unsigned char | aVerboseLevel = 0 |
||
) |
Extract the surface from the voxel data corresponding to a given iso-value.
aLowerThreshold | the lower threshold value |
anUpperThreshold | the upper threshold value |
aVerboseLevel | the level of statements in the standard output. For no output, use 0 (default value: 0) |
|
inline |
Accessor on a given control line.
anIndex | the index of the control point |
Definition at line 224 of file ImplicitSurface.inl.
|
inline |
Accessor on a given control line.
anIndex | the index of the control point |
Definition at line 237 of file ImplicitSurface.inl.
|
inline |
Accessor on a given control point.
anIndex | the index of the control point |
Definition at line 198 of file ImplicitSurface.inl.
|
inline |
Accessor on a given control point.
anIndex | the index of the control point |
Definition at line 211 of file ImplicitSurface.inl.
|
inline |
Accessor on the number of control line segments.
Definition at line 154 of file ImplicitSurface.inl.
|
inline |
Accessor on the number of control points.
Definition at line 146 of file ImplicitSurface.inl.
|
inline |
Accessor on the polygon data.
Definition at line 294 of file ImplicitSurface.inl.
|
inline |
Accessor on the polygon data.
Definition at line 302 of file ImplicitSurface.inl.
|
inline |
Definition at line 310 of file ImplicitSurface.inl.
|
inline |
Definition at line 318 of file ImplicitSurface.inl.
|
inline |
Remove all the control lines.
Definition at line 119 of file ImplicitSurface.inl.
|
inline |
Remove all the control points.
Definition at line 111 of file ImplicitSurface.inl.
|
inline |
Definition at line 180 of file ImplicitSurface.inl.
|
inline |
Definition at line 162 of file ImplicitSurface.inl.
void gVirtualXRay::ImplicitSurface::voxelise | ( | const Vec3ui & | aNumberOfVoxels, |
const VEC3 & | aCenter, | ||
const VEC3 & | aVoxelSize, | ||
unsigned char | aVerboseLevel = 0 |
||
) |
Accessor on a given control line.
aNumberOfVoxels | the number of voxels |
aCenter | the 3D position of the centre of the dataset |
aVoxelSize | the size of voxels |
aVerboseLevel | the level of statements in the standard output. For no output, use 0 (default value: 0) |
|
inline |
Accessor on a given control line.
aNumberOfVoxels | the number of voxels |
aCenter | the 3D position of the centre of the dataset |
aVoxelSize | the size of voxels |
aVerboseLevel | the level of statements in the standard output. For no output, use 0 (default value: 0) |
Definition at line 250 of file ImplicitSurface.inl.
void gVirtualXRay::ImplicitSurface::writePolygonMesh | ( | const char * | aFileName | ) |
Write the polygon data.
aFileName | the name of the file where to save the polygon data |
|
inline |
Write the polygon data.
aFileName | the name of the file where to save the polygon data |
Definition at line 269 of file ImplicitSurface.inl.
void gVirtualXRay::ImplicitSurface::writeVoxelData | ( | const char * | aFileName | ) | const |
Write the current voxel data into a file.
aFileName | the name of the file where to save the voxel data |
|
inline |
Write the current voxel data into a file.
aFileName | the name of the file where to save the voxel data |
Definition at line 261 of file ImplicitSurface.inl.
|
protected |
Definition at line 440 of file ImplicitSurface.h.
|
protected |
Definition at line 448 of file ImplicitSurface.h.
|
protected |
Definition at line 444 of file ImplicitSurface.h.
|
protected |
Definition at line 437 of file ImplicitSurface.h.
|
protected |
Definition at line 434 of file ImplicitSurface.h.