![]() |
aimsalgo
5.1.2
Neuroimaging image processing
|
#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 carto::rc_ptr< carto::Volume< short > > &thing) |
| void | doit (const carto::rc_ptr< carto::Volume< short > > &thing, const std::string &name, const std::string &mode="binar") |
| void | doit (const aims::BucketMap< Void > &thing, const std::string &name, const std::string &mode="binar") |
| void | doit (const carto::rc_ptr< carto::Volume< short > > &thing, std::map< size_t, std::list< AimsSurfaceTriangle > > &surface) |
| void | doit (const aims::BucketMap< Void > &thing, std::map< size_t, std::list< AimsSurfaceTriangle > > &surface) |
| void | getBrain (const carto::rc_ptr< carto::Volume< short > > &thing, AimsSurfaceTriangle &surface, bool insideinterface=false) |
| void | getBrain (const aims::BucketMap< Void > &thing, AimsSurfaceTriangle &surface, bool insideinterface=false) |
| void | getWhite (const carto::rc_ptr< carto::Volume< short > > &thing, AimsSurfaceTriangle &surface) |
| void | getWhite (const aims::BucketMap< Void > &thing, AimsSurfaceTriangle &surface) |
| void | getSingleLabel (const carto::rc_ptr< carto::Volume< short > > &thing, AimsSurfaceTriangle &surface) |
| void | getMeshFromMapOfFacet (const carto::rc_ptr< carto::Volume< short > > &thing, AimsSurfaceTriangle &surface, MapOfFacet &mof) |
| void | setSmoothing (SmoothingType smoothType, int smoothIt, float smoothRate) |
| Smoothing. More... | |
| void | setSmoothingLaplacian (float smoothFeatureAngle) |
| void | setSmoothingSpring (float smoothForce) |
| void | unsetSmoothing () |
| void | smooth (AimsSurfaceTriangle &surface) |
| void | setDecimation (float deciReductionRate, float deciMaxClearance, float deciMaxError, float deciFeatureAngle) |
| Decimation. More... | |
| 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 carto::rc_ptr< carto::Volume< short > > &thing, std::map< size_t, std::list< std::map< short, std::list< AimsSurfaceTriangle > > > > &surface) |
| void | doit (const aims::BucketMap< Void > &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 carto::rc_ptr< carto::Volume< 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) |
Static Protected Member Functions | |
| static carto::VolumeRef< int16_t > | reshapedVolume (const carto::VolumeRef< int16_t > in_vol) |
| reshape (if needed) the input volume to add a border filled with -1 More... | |
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 |
|
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).
|
protected |
| void Mesher::doit | ( | const aims::BucketMap< Void > & | thing, |
| const std::string & | name, | ||
| const std::string & | mode = "binar" |
||
| ) |
| void Mesher::doit | ( | const aims::BucketMap< Void > & | thing, |
| std::map< size_t, std::list< AimsSurfaceTriangle > > & | surface | ||
| ) |
| void Mesher::doit | ( | const aims::BucketMap< Void > & | thing, |
| std::map< size_t, std::list< std::map< short, std::list< AimsSurfaceTriangle > > > > & | surface | ||
| ) |
| void Mesher::doit | ( | const carto::rc_ptr< carto::Volume< short > > & | thing, |
| const std::string & | name, | ||
| const std::string & | mode = "binar" |
||
| ) |
Referenced by aims::ClusterArgMaker::make().
| void Mesher::doit | ( | const carto::rc_ptr< carto::Volume< short > > & | thing, |
| std::map< size_t, std::list< AimsSurfaceTriangle > > & | surface | ||
| ) |
| void Mesher::doit | ( | const carto::rc_ptr< carto::Volume< short > > & | thing, |
| std::map< size_t, std::list< std::map< short, std::list< AimsSurfaceTriangle > > > > & | surface | ||
| ) |
| void Mesher::getBrain | ( | const aims::BucketMap< Void > & | thing, |
| AimsSurfaceTriangle & | surface, | ||
| bool | insideinterface = false |
||
| ) |
| void Mesher::getBrain | ( | const carto::rc_ptr< carto::Volume< short > > & | thing, |
| AimsSurfaceTriangle & | surface, | ||
| bool | insideinterface = false |
||
| ) |
|
protected |
|
protected |
|
protected |
|
protected |
| void Mesher::getInterface | ( | std::map< size_t, std::list< MapOfFacet > > & | interface, |
| const carto::rc_ptr< carto::Volume< short > > & | thing | ||
| ) |
| void Mesher::getMeshFromMapOfFacet | ( | const carto::rc_ptr< carto::Volume< short > > & | thing, |
| AimsSurfaceTriangle & | surface, | ||
| MapOfFacet & | mof | ||
| ) |
|
protected |
|
protected |
| void Mesher::getSingleLabel | ( | const carto::rc_ptr< carto::Volume< short > > & | thing, |
| AimsSurfaceTriangle & | surface | ||
| ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| void Mesher::getWhite | ( | const aims::BucketMap< Void > & | thing, |
| AimsSurfaceTriangle & | surface | ||
| ) |
| void Mesher::getWhite | ( | const carto::rc_ptr< carto::Volume< short > > & | thing, |
| AimsSurfaceTriangle & | surface | ||
| ) |
|
staticprotected |
reshape (if needed) the input volume to add a border filled with -1
| void Mesher::setDecimation | ( | float | deciReductionRate, |
| float | deciMaxClearance, | ||
| float | deciMaxError, | ||
| float | deciFeatureAngle | ||
| ) |
Decimation.
default : deciReductionRate = 99.0 % deciMaxClearance = 3.0 deciMaxError = 0.2 deciFeatureAngle = 180.0 deg
Referenced by aims::ClusterArgMaker::make().
|
inline |
|
inline |
|
inline |
Definition at line 185 of file mesher.h.
References _triOutputFlag.
|
inline |
Definition at line 189 of file mesher.h.
References _minFacetNumber.
Referenced by aims::ClusterArgMaker::make().
|
inline |
Definition at line 174 of file mesher.h.
References _minSurface.
| void Mesher::setSmoothing | ( | SmoothingType | smoothType, |
| int | smoothIt, | ||
| float | smoothRate | ||
| ) |
Smoothing.
default : smoothType = LOWPASS (other values are LAPLACIAN, SIMPLESPRING, POLYGONSPRING) smoothIt = 30 smoothRate in 0.0;1.0 smoothForce in 0.0;1.0
Referenced by aims::ClusterArgMaker::make().
| void Mesher::setSmoothingLaplacian | ( | float | smoothFeatureAngle | ) |
Referenced by aims::ClusterArgMaker::make().
| void Mesher::setSmoothingSpring | ( | float | smoothForce | ) |
| void Mesher::setSplitting | ( | ) |
|
inline |
OBSOLETE - specify extension in the output filename of setMeshOutputFile() or doit()
Definition at line 181 of file mesher.h.
References _triOutputFlag.
|
inline |
| void Mesher::smooth | ( | AimsSurfaceTriangle & | surface | ) |
|
protected |
| float Mesher::surfaceOfInterface | ( | const AimsSurfaceTriangle & | surface | ) |
| void Mesher::unsetDecimation | ( | ) |
| void Mesher::unsetSmoothing | ( | ) |
| void Mesher::unsetSplitting | ( | ) |
|
protected |
Definition at line 211 of file mesher.h.
Referenced by setLabelInf().
|
protected |
Definition at line 212 of file mesher.h.
Referenced by setLabelSup().
|
protected |
Definition at line 218 of file mesher.h.
Referenced by setMinFacetNumber().
|
protected |
Definition at line 214 of file mesher.h.
Referenced by setMinSurface().
|
protected |
|
protected |
Definition at line 216 of file mesher.h.
Referenced by setMeshOutputFile(), and setTriOutputFile().
|
protected |
Definition at line 220 of file mesher.h.
Referenced by setVerbose(), and verbose().