A.I.M.S algorithms


Mesher Class Reference

#include <aims/mesh/mesher.h>

Public Types

enum  SmoothingType { LAPLACIAN, SIMPLESPRING, POLYGONSPRING, LOWPASS }
 

Public Member Functions

 Mesher ()
 
virtual ~Mesher ()
 
void getInterface (std::map< size_t, std::list< MapOfFacet > > &interface, const AimsData< short > &thing)
 
void doit (const AimsData< short > &thing, const std::string &name, const std::string &mode="binar")
 
void doit (const AimsData< short > &thing, std::map< size_t, std::list< AimsSurfaceTriangle > > &surface)
 
void getBrain (const AimsData< short > &thing, AimsSurfaceTriangle &surface, bool insideinterface=false)
 
void getWhite (const AimsData< short > &thing, AimsSurfaceTriangle &surface)
 
void getSingleLabel (const AimsData< short > &thing, AimsSurfaceTriangle &surface)
 
void getMeshFromMapOfFacet (const AimsData< short > &thing, AimsSurfaceTriangle &surface, MapOfFacet &mof)
 
void setSmoothing (SmoothingType smoothType, int smoothIt, float smoothRate)
 
void setSmoothingLaplacian (float smoothFeatureAngle)
 
void setSmoothingSpring (float smoothForce)
 
void unsetSmoothing ()
 
void smooth (AimsSurfaceTriangle &surface)
 
void setDecimation (float deciReductionRate, float deciMaxClearance, float deciMaxError, float deciFeatureAngle)
 
void unsetDecimation ()
 
float decimate (AimsSurfaceTriangle &surface)
 
float decimate (AimsSurfaceTriangle &surface, const std::vector< float > &precthresholds, const TimeTexture< float > &precisionmap)
 Decimation using a precision texture map. More...
 
void doit (const AimsData< short > &thing, std::map< size_t, std::list< std::map< short, std::list< AimsSurfaceTriangle > > > > &surface)
 
void setSplitting ()
 
void unsetSplitting ()
 
void setLabelInf (int labelInf)
 
void setLabelSup (int labelSup)
 
void setMinSurface (float minSurface)
 
float surfaceOfInterface (const AimsSurfaceTriangle &surface)
 
void setTriOutputFile () __attribute__((__deprecated__("specify extension in the output filename ""of setMeshOutputFile() or doit()")))
 OBSOLETE - specify extension in the output filename of setMeshOutputFile() or doit() More...
 
void setMeshOutputFile ()
 
void setMinFacetNumber (uint m)
 
bool verbose () const
 
void setVerbose (bool x)
 

Protected Member Functions

void getReducedNeighOutwardCycles (MapOfFacet &thing)
 
void getExtendedNeighOfFacet (MapOfFacet &thing)
 
void getVertices (const std::vector< Facet * > &vfac, std::vector< Point3df > &vertex, float sizeX, float sizeY, float sizeZ)
 
void getSmoothedVertices (const std::vector< Facet * > &vfac, AimsSurfaceTriangle &surface, float rate)
 
void getSmoothedLaplacian (const std::vector< Facet * > &vfac, AimsSurfaceTriangle &surface, float featureAngle, int nIteration, float rate)
 
void getSmoothedSimpleSpring (const std::vector< Facet * > &vfac, AimsSurfaceTriangle &surface, float force, int nIteration, float rate)
 
void getSmoothedPolygonSpring (const std::vector< Facet * > &vfac, AimsSurfaceTriangle &surface, float force, int nIteration, float rate)
 
void getSmoothedLowPassFilter (const std::vector< Facet * > &vfac, AimsSurfaceTriangle &surface, int nIteration, float rate)
 
void getDecimatedVertices (std::vector< Facet * > &vfac, std::vector< Point3df > &vertex, float reductionRatePercent, float maxClearanceMm, float maxErrorMm, float minFeatureEdgeAngleDegree)
 
void getDecimatedVertices (std::vector< Facet * > &vfac, std::vector< Point3df > &vertex, float reductionRatePercent, float maxClearanceMm, float maxErrorMm, float minFeatureEdgeAngleDegree, const std::vector< float > &thresholds, const TimeTexture< float > *precisionmap=0)
 
float decimate (AimsSurfaceTriangle &surface, const std::vector< float > &thresholds, const TimeTexture< float > *precisionmap)
 
void getNormals (const std::vector< Facet * > &vfac, const std::vector< Point3df > &vertex, std::vector< Point3df > &normal)
 
void getTriangles (const std::vector< Facet * > &vfac, std::vector< AimsVector< uint, 3 > > &triangle)
 
void splitting (const AimsData< short > &thing, const std::vector< Facet * > &vfac, const AimsSurfaceTriangle &surface, std::map< short, std::list< AimsSurfaceTriangle > > &splitted)
 
void getFacet (const AimsSurfaceTriangle &surface, std::vector< Facet * > &vfac)
 
void clear (std::map< size_t, std::list< MapOfFacet > > &interface)
 

Protected Attributes

bool _smoothFlag
 
int _smoothIt
 
float _smoothRate
 
float _smoothFeatureAngle
 
float _smoothForce
 
SmoothingType _smoothType
 
bool _deciFlag
 
float _deciReductionRate
 
float _deciMaxClearance
 
float _deciMaxError
 
float _deciFeatureAngle
 
bool _splittingFlag
 
int _labelInf
 
int _labelSup
 
float _minSurface
 
bool _triOutputFlag
 
uint _minFacetNumber
 
bool _verbose
 

Detailed Description

Definition at line 51 of file mesher.h.

Member Enumeration Documentation

Enumerator
LAPLACIAN 
SIMPLESPRING 
POLYGONSPRING 
LOWPASS 

Definition at line 54 of file mesher.h.

Constructor & Destructor Documentation

Mesher::Mesher ( )
inline

Definition at line 62 of file mesher.h.

virtual Mesher::~Mesher ( )
inlinevirtual

Definition at line 76 of file mesher.h.

Member Function Documentation

void Mesher::clear ( std::map< size_t, std::list< MapOfFacet > > &  interface)
protected
float Mesher::decimate ( AimsSurfaceTriangle surface)
float Mesher::decimate ( AimsSurfaceTriangle surface,
const std::vector< float > &  precthresholds,
const TimeTexture< float > &  precisionmap 
)

Decimation using a precision texture map.

In this mode, the texture values are checked according to the precision thresholds, and vertices above the threshold are not removed. A time texture may be provided if a step-by-step evolution is needed. Similarly, the thresholds may evolve with decimation timesteps. precisionmap and thresholds may have differing sizes (they are clamped if overrun).

float Mesher::decimate ( AimsSurfaceTriangle surface,
const std::vector< float > &  thresholds,
const TimeTexture< float > *  precisionmap 
)
protected
void Mesher::doit ( const AimsData< short > &  thing,
const std::string &  name,
const std::string &  mode = "binar" 
)
void Mesher::doit ( const AimsData< short > &  thing,
std::map< size_t, std::list< AimsSurfaceTriangle > > &  surface 
)
void Mesher::doit ( const AimsData< short > &  thing,
std::map< size_t, std::list< std::map< short, std::list< AimsSurfaceTriangle > > > > &  surface 
)
void Mesher::getBrain ( const AimsData< short > &  thing,
AimsSurfaceTriangle surface,
bool  insideinterface = false 
)
void Mesher::getDecimatedVertices ( std::vector< Facet * > &  vfac,
std::vector< Point3df > &  vertex,
float  reductionRatePercent,
float  maxClearanceMm,
float  maxErrorMm,
float  minFeatureEdgeAngleDegree 
)
protected
void Mesher::getDecimatedVertices ( std::vector< Facet * > &  vfac,
std::vector< Point3df > &  vertex,
float  reductionRatePercent,
float  maxClearanceMm,
float  maxErrorMm,
float  minFeatureEdgeAngleDegree,
const std::vector< float > &  thresholds,
const TimeTexture< float > *  precisionmap = 0 
)
protected
void Mesher::getExtendedNeighOfFacet ( MapOfFacet thing)
protected
void Mesher::getFacet ( const AimsSurfaceTriangle surface,
std::vector< Facet * > &  vfac 
)
protected
void Mesher::getInterface ( std::map< size_t, std::list< MapOfFacet > > &  interface,
const AimsData< short > &  thing 
)
void Mesher::getMeshFromMapOfFacet ( const AimsData< short > &  thing,
AimsSurfaceTriangle surface,
MapOfFacet mof 
)
void Mesher::getNormals ( const std::vector< Facet * > &  vfac,
const std::vector< Point3df > &  vertex,
std::vector< Point3df > &  normal 
)
protected
void Mesher::getReducedNeighOutwardCycles ( MapOfFacet thing)
protected
void Mesher::getSingleLabel ( const AimsData< short > &  thing,
AimsSurfaceTriangle surface 
)
void Mesher::getSmoothedLaplacian ( const std::vector< Facet * > &  vfac,
AimsSurfaceTriangle surface,
float  featureAngle,
int  nIteration,
float  rate 
)
protected
void Mesher::getSmoothedLowPassFilter ( const std::vector< Facet * > &  vfac,
AimsSurfaceTriangle surface,
int  nIteration,
float  rate 
)
protected
void Mesher::getSmoothedPolygonSpring ( const std::vector< Facet * > &  vfac,
AimsSurfaceTriangle surface,
float  force,
int  nIteration,
float  rate 
)
protected
void Mesher::getSmoothedSimpleSpring ( const std::vector< Facet * > &  vfac,
AimsSurfaceTriangle surface,
float  force,
int  nIteration,
float  rate 
)
protected
void Mesher::getSmoothedVertices ( const std::vector< Facet * > &  vfac,
AimsSurfaceTriangle surface,
float  rate 
)
protected
void Mesher::getTriangles ( const std::vector< Facet * > &  vfac,
std::vector< AimsVector< uint, 3 > > &  triangle 
)
protected
void Mesher::getVertices ( const std::vector< Facet * > &  vfac,
std::vector< Point3df > &  vertex,
float  sizeX,
float  sizeY,
float  sizeZ 
)
protected
void Mesher::getWhite ( const AimsData< short > &  thing,
AimsSurfaceTriangle surface 
)
void Mesher::setDecimation ( float  deciReductionRate,
float  deciMaxClearance,
float  deciMaxError,
float  deciFeatureAngle 
)
void Mesher::setLabelInf ( int  labelInf)
inline

Definition at line 149 of file mesher.h.

void Mesher::setLabelSup ( int  labelSup)
inline

Definition at line 150 of file mesher.h.

void Mesher::setMeshOutputFile ( )
inline

Definition at line 165 of file mesher.h.

void Mesher::setMinFacetNumber ( uint  m)
inline

Definition at line 169 of file mesher.h.

Referenced by aims::ClusterArgMaker::make().

void Mesher::setMinSurface ( float  minSurface)
inline

Definition at line 154 of file mesher.h.

void Mesher::setSmoothing ( SmoothingType  smoothType,
int  smoothIt,
float  smoothRate 
)
void Mesher::setSmoothingLaplacian ( float  smoothFeatureAngle)
void Mesher::setSmoothingSpring ( float  smoothForce)
void Mesher::setSplitting ( )
void Mesher::setTriOutputFile ( )
inline

OBSOLETE - specify extension in the output filename of setMeshOutputFile() or doit()

Definition at line 161 of file mesher.h.

void Mesher::setVerbose ( bool  x)
inline

Definition at line 172 of file mesher.h.

void Mesher::smooth ( AimsSurfaceTriangle surface)
void Mesher::splitting ( const AimsData< short > &  thing,
const std::vector< Facet * > &  vfac,
const AimsSurfaceTriangle surface,
std::map< short, std::list< AimsSurfaceTriangle > > &  splitted 
)
protected
float Mesher::surfaceOfInterface ( const AimsSurfaceTriangle surface)
void Mesher::unsetDecimation ( )
void Mesher::unsetSmoothing ( )
void Mesher::unsetSplitting ( )
bool Mesher::verbose ( ) const
inline

Definition at line 171 of file mesher.h.

Member Data Documentation

float Mesher::_deciFeatureAngle
protected

Definition at line 187 of file mesher.h.

bool Mesher::_deciFlag
protected

Definition at line 183 of file mesher.h.

float Mesher::_deciMaxClearance
protected

Definition at line 185 of file mesher.h.

float Mesher::_deciMaxError
protected

Definition at line 186 of file mesher.h.

float Mesher::_deciReductionRate
protected

Definition at line 184 of file mesher.h.

int Mesher::_labelInf
protected

Definition at line 191 of file mesher.h.

int Mesher::_labelSup
protected

Definition at line 192 of file mesher.h.

uint Mesher::_minFacetNumber
protected

Definition at line 198 of file mesher.h.

float Mesher::_minSurface
protected

Definition at line 194 of file mesher.h.

float Mesher::_smoothFeatureAngle
protected

Definition at line 179 of file mesher.h.

bool Mesher::_smoothFlag
protected

Definition at line 176 of file mesher.h.

float Mesher::_smoothForce
protected

Definition at line 180 of file mesher.h.

int Mesher::_smoothIt
protected

Definition at line 177 of file mesher.h.

float Mesher::_smoothRate
protected

Definition at line 178 of file mesher.h.

SmoothingType Mesher::_smoothType
protected

Definition at line 181 of file mesher.h.

bool Mesher::_splittingFlag
protected

Definition at line 189 of file mesher.h.

bool Mesher::_triOutputFlag
protected

Definition at line 196 of file mesher.h.

bool Mesher::_verbose
protected

Definition at line 200 of file mesher.h.


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