3Depict
|
#include "spatial.h"
#include "../filterCommon.h"
#include <gsl/gsl_sf_gamma.h>
#include <qhull/qhull_a.h>
Enumerations | |
enum | PointDir { POINTDIR_TOGETHER =0, POINTDIR_IN_COMMON, POINTDIR_APART } |
Functions | |
unsigned int | vectorPointDir (const Point3D &pA, const Point3D &pB, const Point3D &vC, const Point3D &vD) |
Check which way vectors attached to two 3D points "point",. More... | |
float | distanceToSegment (const Point3D &fA, const Point3D &fB, const Point3D &p) |
Returns the shortest distance between a line segment and a given point. More... | |
float | distanceToFacet (const Point3D &fA, const Point3D &fB, const Point3D &fC, const Point3D &p, const Point3D &normal) |
Find the distance between a point, and a triangular facet – may be positive or negative. More... | |
unsigned int | GetReducedHullPts (const vector< Point3D > &points, float reductionDim, unsigned int *progress, ATOMIC_BOOL &wantAbort, vector< Point3D > &pointResult) |
Returns a subset of points guaranteed to lie at least reductionDim inside hull of input points. More... | |
unsigned int | generateNNHist (const vector< Point3D > &pointList, const K3DTree &tree, unsigned int nnMax, unsigned int numBins, vector< vector< size_t > > &histogram, float *binWidth, unsigned int *progressPtr, ATOMIC_BOOL &wantAbort) |
Generate an NN histogram using NN-max cutoffs. More... | |
unsigned int | generate1DAxialDistHist (const vector< Point3D > &pointList, const K3DTreeMk2 &tree, const Point3D &axisDir, unsigned int *histogram, float distMax, unsigned int numBins, unsigned int *progressPtr, ATOMIC_BOOL &wantAbort) |
unsigned int | generate1DAxialNNHist (const vector< Point3D > &pointList, const K3DTreeMk2 &tree, const Point3D &axisDir, unsigned int *histogram, float &binWidth, unsigned int nnMax, unsigned int numBins, unsigned int *progressPtr, ATOMIC_BOOL &wantAbort) |
unsigned int | generateDistHist (const vector< Point3D > &pointList, const K3DTree &tree, unsigned int *histogram, float distMax, unsigned int numBins, unsigned int &warnBiasCount, unsigned int *progressPtr, ATOMIC_BOOL &wantAbort) |
Generate an NN histogram using distance max cutoffs. Input histogram must be zeroed,. More... | |
void | generateKnnTheoreticalDist (const std::vector< float > &radii, float density, unsigned int nn, std::vector< float > &nnDist) |
unsigned int | generate1DAxialDistHistSweep (const std::vector< Point3D > &pointList, K3DTreeMk2 &tree, float distMax, float dTheta, float dPhi, unsigned int &prog, std::vector< std::vector< std::vector< unsigned int > > > &histogram) |
bool | qhullTest () |
Variables | |
const unsigned int | CALLBACK_REDUCE =5000 |
const unsigned int | MAX_NN_DISTS = 0x8000000 |
enum PointDir |
float distanceToFacet | ( | const Point3D & | fA, |
const Point3D & | fB, | ||
const Point3D & | fC, | ||
const Point3D & | p, | ||
const Point3D & | normal | ||
) |
Find the distance between a point, and a triangular facet – may be positive or negative.
References ASSERT, distanceToSegment(), POINTDIR_APART, Point3D::sqrDist(), Point3D::sqrMag(), and vectorPointDir().
Referenced by GetReducedHullPts().
Returns the shortest distance between a line segment and a given point.
References Point3D::crossProd(), POINTDIR_TOGETHER, Point3D::sqrDist(), Point3D::sqrMag(), and vectorPointDir().
Referenced by distanceToFacet().
unsigned int generate1DAxialDistHist | ( | const vector< Point3D > & | pointList, |
const K3DTreeMk2 & | tree, | ||
const Point3D & | axisDir, | ||
unsigned int * | histogram, | ||
float | distMax, | ||
unsigned int | numBins, | ||
unsigned int * | progressPtr, | ||
ATOMIC_BOOL & | wantAbort | ||
) |
References ASSERT, CALLBACK_REDUCE, Point3D::dotProd(), EQ_TOL, K3DTreeMk2::getPtRef(), K3DTreeMk2::ptsInSphere(), RDF_ABORT_FAIL, and Point3D::sqrMag().
Referenced by SpatialAnalysisFilter::setPropFromBinding().
unsigned int generate1DAxialDistHistSweep | ( | const std::vector< Point3D > & | pointList, |
K3DTreeMk2 & | tree, | ||
float | distMax, | ||
float | dTheta, | ||
float | dPhi, | ||
unsigned int & | prog, | ||
std::vector< std::vector< std::vector< unsigned int > > > & | histogram | ||
) |
unsigned int generate1DAxialNNHist | ( | const vector< Point3D > & | pointList, |
const K3DTreeMk2 & | tree, | ||
const Point3D & | axisDir, | ||
unsigned int * | histogram, | ||
float & | binWidth, | ||
unsigned int | nnMax, | ||
unsigned int | numBins, | ||
unsigned int * | progressPtr, | ||
ATOMIC_BOOL & | wantAbort | ||
) |
References ASSERT, CALLBACK_REDUCE, Point3D::dotProd(), EQ_TOL, K3DTreeMk2::findNearestWithSkip(), K3DTreeMk2::getPtRef(), RDF_ABORT_FAIL, RDF_ERR_INSUFFICIENT_INPUT_POINTS, BoundCube::setBounds(), and Point3D::sqrMag().
Referenced by SpatialAnalysisFilter::setPropFromBinding().
unsigned int generateDistHist | ( | const vector< Point3D > & | pointList, |
const K3DTree & | tree, | ||
unsigned int * | histogram, | ||
float | distMax, | ||
unsigned int | numBins, | ||
unsigned int & | warnBiasCount, | ||
unsigned int * | progressPtr, | ||
ATOMIC_BOOL & | wantAbort | ||
) |
Generate an NN histogram using distance max cutoffs. Input histogram must be zeroed,.
References ASSERT, CALLBACK_REDUCE, K3DTree::findNearest(), RDF_ABORT_FAIL, BoundCube::setBounds(), and Point3D::sqrDist().
Referenced by SpatialAnalysisFilter::setPropFromBinding().
void generateKnnTheoreticalDist | ( | const std::vector< float > & | radii, |
float | density, | ||
unsigned int | nn, | ||
std::vector< float > & | nnDist | ||
) |
Referenced by SpatialAnalysisFilter::setPropFromBinding().
unsigned int generateNNHist | ( | const vector< Point3D > & | pointList, |
const K3DTree & | tree, | ||
unsigned int | nnMax, | ||
unsigned int | numBins, | ||
vector< vector< size_t > > & | histogram, | ||
float * | binWidth, | ||
unsigned int * | progressPtr, | ||
ATOMIC_BOOL & | wantAbort | ||
) |
Generate an NN histogram using NN-max cutoffs.
Generate the NN histogram specified up to a given NN.
References ASSERT, CALLBACK_REDUCE, K3DTree::findKNearest(), RDF_ABORT_FAIL, RDF_ERR_INSUFFICIENT_INPUT_POINTS, and BoundCube::setBounds().
Referenced by SpatialAnalysisFilter::setPropFromBinding().
unsigned int GetReducedHullPts | ( | const std::vector< Point3D > & | pts, |
float | reductionDim, | ||
unsigned int * | progress, | ||
ATOMIC_BOOL & | wantAbort, | ||
std::vector< Point3D > & | returnIons | ||
) |
Returns a subset of points guaranteed to lie at least reductionDim inside hull of input points.
Calculates the hull of the input ions and then scales the hull such that the smallest distance between the scaled hull and the original hull is exactly reductionDim
References ASSERT, computeConvexHull(), distanceToFacet(), dotProduct(), freeConvexHull(), pyramidVol(), and RDF_ERR_NEGATIVE_SCALE_FACT.
Referenced by SpatialAnalysisFilter::setPropFromBinding().
bool qhullTest | ( | ) |
References COMPILE_ASSERT.
unsigned int vectorPointDir | ( | const Point3D & | pA, |
const Point3D & | pB, | ||
const Point3D & | vC, | ||
const Point3D & | vD | ||
) |
Check which way vectors attached to two 3D points "point",.
Two vectors may point "together", /__\ "apart" __/ or "In common" /__/ or __\
References ASSERT, POINTDIR_APART, POINTDIR_IN_COMMON, and POINTDIR_TOGETHER.
Referenced by distanceToFacet(), and distanceToSegment().
const unsigned int CALLBACK_REDUCE =5000 |
Referenced by generate1DAxialDistHist(), generate1DAxialNNHist(), generateDistHist(), and generateNNHist().
const unsigned int MAX_NN_DISTS = 0x8000000 |