35 #ifndef __ImplicitSurface_h 36 #define __ImplicitSurface_h 71 #ifndef __gVirtualXRayConfig_h 109 typedef enum DensityFunctionTypeTag
212 const VEC3& aControlPoint);
224 const VEC3& aControlPoint1,
225 const VEC3& aControlPoint2);
249 float aParameter2 = 0.0);
255 float aParameter2 = 0.0);
285 const std::pair<VEC3, VEC3>&
getControlLine(
unsigned int anIndex)
const;
309 const VEC3& aVoxelSize,
310 unsigned char aVerboseLevel = 0);
324 const VEC3& aVoxelSize,
325 unsigned char aVerboseLevel = 0);
373 unsigned char aVerboseLevel = 0);
387 unsigned char aVerboseLevel = 0);
443 std::vector<std::pair<DensityFunctionParameterType, VEC3> >
459 #endif // __ImplicitSurface_h void addControlPoint(const DensityFunctionParameterType &aParameter, const VEC3 &aControlPoint)
Add a control point.
void writePolygonMesh(const char *aFileName)
Write the polygon data.
DensityFunctionType
Type of density function.
RATIONAL_NUMBER evaluateMetaBall(RATIONAL_NUMBER r, RATIONAL_NUMBER a, RATIONAL_NUMBER b) const
DensityFunctionParameterType(const DensityFunctionType aDensityFunctionType=BLOBBY_MOLECULE, RATIONAL_NUMBER a=1, RATIONAL_NUMBER b=1)
Default constructor.
void setControlPointParameters(unsigned int aPointID, DensityFunctionType aDentityFunction, float aParameter1, float aParameter2=0.0)
RATIONAL_NUMBER evaluateBlobbyMolecule(RATIONAL_NUMBER r, RATIONAL_NUMBER a, RATIONAL_NUMBER b) const
const VEC3 & getControlPoint(unsigned int anIndex) const
Accessor on a given control point.
void resetControlPoints()
Remove all the control points.
const std::pair< VEC3, VEC3 > & getControlLine(unsigned int anIndex) const
Accessor on a given control line.
void extractIsoSurface(const RATIONAL_NUMBER &aThreshold=0, unsigned char aVerboseLevel=0)
unsigned int getNumberOfControlLineSegments() const
Accessor on the number of control line segments.
Image< RATIONAL_NUMBER > m_volume
std::vector< std::pair< DensityFunctionParameterType, std::pair< VEC3, VEC3 > > > m_control_line_set
RATIONAL_NUMBER evaluateSphere(RATIONAL_NUMBER r) const
void voxelise(const Vec3ui &aNumberOfVoxels, const VEC3 &aCenter, const VEC3 &aVoxelSize, unsigned char aVerboseLevel=0)
Accessor on a given control line.
std::vector< std::pair< DensityFunctionParameterType, VEC3 > > m_control_point_set
PolygonMesh is a class to handle polygon (triangles) meshes.
void voxelize(const Vec3ui &aNumberOfVoxels, const VEC3 &aCenter, const VEC3 &aVoxelSize, unsigned char aVerboseLevel=0)
Accessor on a given control line.
RATIONAL_NUMBER evaluateSoftObject(RATIONAL_NUMBER r, RATIONAL_NUMBER a, RATIONAL_NUMBER b) const
float RATIONAL_NUMBER
Type of data used to store real numbers.
PolygonMesh & getPolygonMesh()
Accessor on the polygon data.
void resetControlLines()
Remove all the control lines.
void addControlLine(const DensityFunctionParameterType &aParameter, const VEC3 &aControlPoint1, const VEC3 &aControlPoint2)
Add a control line.
Class to handle a greyscale image.
void setControlLineSegmentParameters(unsigned int aLineSegmentID, DensityFunctionType aDentityFunction, float aParameter1, float aParameter2=0.0)
unsigned int getNumberOfControlPoints() const
Accessor on the number of control points.
Class to build 3D implicit surfaces. To know what implicit surfaces are, please visit Paul Bourke's t...
~ImplicitSurface()
Destructor.
ImplicitSurface()
Default constructor.
void writeVoxelData(const char *aFileName) const
Write the current voxel data into a file.
RATIONAL_NUMBER evaluate(RATIONAL_NUMBER r, const DensityFunctionParameterType &aParameter) const
Evaluate the density function for the distance r.
RATIONAL_NUMBER m_a
First parameter of the density function.
Type of density function parameter.
ImplicitSurface is a class to build 3D implicit surfaces.
const Image< RATIONAL_NUMBER > & getVolume() const
DensityFunctionType m_density_function
Type of density function.