44 inPlaceFilter(output);
54 throw InvalidField(
"IncidenceAngleDataPointsFilter: Error, cannot find normals in descriptors.");
56 throw InvalidField(
"IncidenceAngleDataPointsFilter: Error, cannot find observation directions in descriptors.");
63 assert(normals.rows() == observationDirections.rows());
67 for (
unsigned int i = 0; i < nbPts; ++i)
70 const Vector vecP = observationDirections.col(i).normalized();
71 const Vector vecN = normals.col(i);
72 angles(0,i) = acos(vecP.dot(vecN));
void allocateDescriptor(const std::string &name, const unsigned dim)
Makes sure a descriptor of a given name exists, if present, check its dimensions. ...
ConstView getDescriptorViewByName(const std::string &name) const
Get a const view on a descriptor by name, throw an exception if it does not exist.
PointMatcher< T >::Vector Vector
unsigned getNbPoints() const
Return the number of points contained in the point cloud.
virtual void inPlaceFilter(DataPoints &cloud)
Apply these filters to a point cloud without copying.
bool descriptorExists(const std::string &name) const
Look if a descriptor with a given name exist.
virtual DataPoints filter(const DataPoints &input)
Apply filters to input point cloud. This is the non-destructive version and returns a copy...
An exception thrown when one tries to access features or descriptors unexisting or of wrong dimension...
Incidence angle, compute the incidence angle of a surface normal with the observation direction...