#include <ParticlesToLevelSet.h>
Constructor & Destructor Documentation
Main constructor using a default interrupter.
- Parameters
-
grid | contains the grid in which particles are rasterized |
interrupt | callback to interrupt a long-running process |
- Note
- The width in voxel units of the generated narrow band level set is given by 2*background/dx, where background is the background value stored in the grid, and dx is the voxel size derived from the transform stored in the grid. Also note that -background corresponds to the constant value inside the generated narrow band level sets. Finally the default NullInterrupter should compile out interruption checks during optimization, thus incurring no run-time overhead.
Copy constructor called by tbb.
Member Function Documentation
int getGrainSize |
( |
| ) |
const |
|
inline |
- Returns
- the grain-size used for multi-threading
RealT getHalfWidth |
( |
| ) |
const |
|
inline |
- Returns
- Half-width (in voxle units) of the narrow band level set
size_t getMaxCount |
( |
| ) |
const |
|
inline |
- Returns
- number of large particles that were ignore due to Rmax
size_t getMinCount |
( |
| ) |
const |
|
inline |
- Returns
- number of small particles that were ignore due to Rmin
- Returns
- the largest radius allowed in voxel units
- Returns
- the smallest radius allowed in voxel units
RealT getVoxelSize |
( |
| ) |
const |
|
inline |
- Returns
- Voxel size in world units
bool ignoredParticles |
( |
| ) |
const |
|
inline |
- Returns
- true if any particles were ignored due to their size
Method called by tbb::parallel_reduce threads.
- Note
- Do not call this method directly!
void operator() |
( |
const tbb::blocked_range< size_t > & |
r | ) |
|
|
inline |
Non-const functor called by tbb::parallel_reduce threads.
- Note
- Do not call this method directly!
void rasterizeSpheres |
( |
const ParticleListT & |
pa | ) |
|
|
inline |
Rasterize a sphere per particle derived from their position and radius. All spheres are CSG unioned.
- Parameters
-
pa | particles with position, radius and velocity. |
void rasterizeTrails |
( |
const ParticleListT & |
pa, |
|
|
Real |
delta = 1.0 |
|
) |
| |
|
inline |
Rasterize a trail per particle derived from their position, radius and velocity. Each trail is generated as CSG unions of sphere instances with decreasing radius.
- Parameters
-
pa | particles with position, radius and velocity. |
delta | controls distance between sphere instances (default=1). Be careful not to use too small values since this can lead to excessive computation per trail (which the interrupter can't stop). |
- Note
- The direction of a trail is inverse to the direction of the velocity vector, and the length is given by |V|. The radius at the head of the trail is given by the radius of the particle and the radius at the tail of the trail is Rmin voxel units which has a default value of 1.5 corresponding to the Nyquist frequency!
void setGrainSize |
( |
int |
grainSize | ) |
|
|
inline |
Set the grain-size used for multi-threading.
- Note
- A grainsize of 0 or less disables multi-threading!
void setRmax |
( |
RealT |
Rmax | ) |
|
|
inline |
set the largest radius allowed in voxel units
void setRmin |
( |
RealT |
Rmin | ) |
|
|
inline |
set the smallest radius allowed in voxel units
The documentation for this class was generated from the following file: