FlowEngine 7.530
Photogrammetry Software Development Kit
Loading...
Searching...
No Matches
FlowEngine::StereoPointCloudInterface Class Referenceabstract

Stores a simple Dense Point Cloud object for the FlowEngine interface. More...

#include <StereoPointCloudInterface.h>

Inheritance diagram for FlowEngine::StereoPointCloudInterface:
FlowEngine::NamedObjectInterface

Public Member Functions

virtual FLE_DLL ~StereoPointCloudInterface ()=default
 Default virtual destructor.
 
virtual FLE_DLL Index getPointCount () const =0
 
virtual FLE_DLL Index getSeedPointCount () const =0
 
virtual FLE_DLL Result getPointPosition (Index idx, Point3 &outPosition) const =0
 
virtual FLE_DLL Result getPointNormal (Index idx, Normal &outNormal) const =0
 
virtual FLE_DLL Result getPointColor (Index idx, Color &outColor) const =0
 
virtual FLE_DLL Index getPointVisibilityCount (Index pointIndex) const =0
 
virtual FLE_DLL Result getPointVisibility (Index pointIndex, Index visibilityIndex, CameraInterface &outCamera) const =0
 
virtual FLE_DLL double getMeanPointDistance () const =0
 
virtual FLE_DLL Result mergeWith (ConstBuffer< StereoPointCloudInterface * > others, bool lastMerge=true)=0
 
virtual FLE_DLL Result copyFrom (const StereoPointCloudInterface &inStereoPoints)=0
 
virtual FLE_DLL Result reset (Size vertexCount)=0
 
virtual FLE_DLL Result reset (ConstBuffer< Point3 > vertexData, ConstBuffer< Color > colorData, ConstBuffer< Normal > normalData)=0
 
virtual FLE_DLL Result replaceVisibility (ConstBuffer< CameraInterface * > cameras)=0
 
virtual FLE_DLL Result setPointPosition (Index idx, const Point3 &position)=0
 
virtual FLE_DLL Result setPointNormal (Index idx, const Normal &normal)=0
 
virtual FLE_DLL Result setPointColor (Index idx, const Color &color)=0
 
virtual FLE_DLL Result transform (ConstBuffer< double > transform)=0
 
virtual FLE_DLL Result initializeSeeds (LogListenerInterface &logListener, Index seedPoints, Buffer< CameraInterface * > bubbleViewCameras)=0
 
virtual FLE_DLL Result removePoint (Index index)=0
 
virtual FLE_DLL Result removePoints (ConstBuffer< Index > indexes)=0
 
virtual FLE_DLL Result copyPointsPositions (Buffer< Point3 > outData) const =0
 
virtual FLE_DLL Result saveToPly (ConstStringBuffer filePath, bool saveColors=true, bool saveNormals=true, bool useBinaryEncoding=true) const =0
 Save the point cloud to PLY file.
 
virtual FLE_DLL Result loadFromPly (ConstStringBuffer filePath)=0
 
virtual FLE_DLL Result decimateByMaxPointCount (int targetPointCount)=0
 
virtual FLE_DLL Result decimateByMaxPointCountOctree (unsigned int maxPointCount)=0
 
virtual FLE_DLL Result decimateByPointsDistance (double distance)=0
 
virtual FLE_DLL Result densificateByMaxPointCount (int targetPointCount)=0
 
virtual FLE_DLL Result projectOnRegularGrid (double gridSpacing, double radius, StandardAxis axis)=0
 
- Public Member Functions inherited from FlowEngine::NamedObjectInterface
virtual FLE_DLL ~NamedObjectInterface ()=default
 Default virtual destructor.
 
virtual FLE_DLL Size getNameLength () const =0
 
virtual FLE_DLL Result getName (StringBuffer outName) const =0
 
virtual FLE_DLL Result setName (ConstStringBuffer name)=0
 

Detailed Description

Stores a simple Dense Point Cloud object for the FlowEngine interface.

Nothing needed in input. Everything will be filled by FlowEngine during MVS Computation.

Constructor & Destructor Documentation

◆ ~StereoPointCloudInterface()

virtual FLE_DLL FlowEngine::StereoPointCloudInterface::~StereoPointCloudInterface ( )
virtualdefault

Default virtual destructor.

Member Function Documentation

◆ copyFrom()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::copyFrom ( const StereoPointCloudInterface inStereoPoints)
pure virtual

Copy data from another Stereo Point cloud.

Parameters
[in]inStereoPointsthe stereo point cloud in input
Returns
One of the following result codes:

◆ copyPointsPositions()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::copyPointsPositions ( Buffer< Point3 outData) const
pure virtual

Copy all point positions. This function is not available in the free version of the SDK.

Parameters
[in,out]outDataa buffer large enough to countain getPointCount() elements of Point3

◆ decimateByMaxPointCount()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::decimateByMaxPointCount ( int  targetPointCount)
pure virtual

Decimates the point cloud to reach a certain amount of points.

Parameters
[in]targetPointCountthe number of points the point cloud will have after the decimation. If the targetPointCount is >= getPointCount() the function does nothing.
Returns
One of the following result codes:

◆ decimateByMaxPointCountOctree()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::decimateByMaxPointCountOctree ( unsigned int  maxPointCount)
pure virtual

Decimates the point cloud by supplying a maximum point count (using octree)

Parameters
[in]maxPointCountthe number of points the point cloud will have after the decimation. If the targetPointCount is >= getPointCount() the function does nothing.
Returns
One of the following result codes:

◆ decimateByPointsDistance()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::decimateByPointsDistance ( double  distance)
pure virtual

Decimates the point cloud by supplying the points maximum distance.

Parameters
[in]distancethe maximum distance allowed between points.
Returns
One of the following result codes:

◆ densificateByMaxPointCount()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::densificateByMaxPointCount ( int  targetPointCount)
pure virtual

Densificates the point cloud up to the specified point count

Precondition
the object must have valid visibility
Parameters
[in]targetPointCountthe number of points the point cloud will have after the densification. If the targetPointCount is < getPointCount() the function does nothing.
Returns
One of the following result codes:

◆ getMeanPointDistance()

virtual FLE_DLL double FlowEngine::StereoPointCloudInterface::getMeanPointDistance ( ) const
pure virtual
Returns
the mean point distance in the point cloud.

◆ getPointColor()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::getPointColor ( Index  idx,
Color outColor 
) const
pure virtual

Returns the color of the point at index idx. This function is not available in the free version of the SDK.

Parameters
[in]idxthe index of the position to retrieve. Must be in the range [0, getPointCount())
[out]outColorthe retrieved point color

◆ getPointCount()

virtual FLE_DLL Index FlowEngine::StereoPointCloudInterface::getPointCount ( ) const
pure virtual
Returns
the number of points in this stereo point cloud

◆ getPointNormal()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::getPointNormal ( Index  idx,
Normal outNormal 
) const
pure virtual

Returns the position of the point at index idx. This function is not available in the free version of the SDK.

Parameters
[in]idxthe index of the position to retrieve. Must be in the range [0, getPointCount())
[out]outNormalthe retrieved point normal

◆ getPointPosition()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::getPointPosition ( Index  idx,
Point3 outPosition 
) const
pure virtual

Returns the position of the point at index idx. This function is not available in the free version of the SDK.

Parameters
[in]idxthe index of the position to retrieve. Must be in the range [0, getPointCount())
[out]outPositionthe retrieved point position

◆ getPointVisibility()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::getPointVisibility ( Index  pointIndex,
Index  visibilityIndex,
CameraInterface outCamera 
) const
pure virtual

Query visibility information about a point.

Parameters
[in]pointIndexthe point to query for visibility info. Must be in the range [0, getPointCount())
[in]visibilityIndexthe index of the visibility entry. Must be in the range [0, getPointVisibilityCount( pointIndex ))
[in,out]outCamerathe Camera object to fill with the information,
Returns
One of the following result codes:
  • Result::Success – if outCamera is filled with the visibility information queried.
  • Result::InvalidArgument
    • if outCamera is not a valid Camera object.
    • if pointIndex is not in the valid range.
    • if visibilityInfo is not in the valid range.
  • Result::FeatureNotAvailable – if this method is called by the free version of the SDK.
Note
This function is not available in the free version of the SDK.

◆ getPointVisibilityCount()

virtual FLE_DLL Index FlowEngine::StereoPointCloudInterface::getPointVisibilityCount ( Index  pointIndex) const
pure virtual

Query the number of visibility information present in a point.

Parameters
[in]pointIndexthe index of the point to query for visibility count. Must be in the range [0, getPointCount())
Returns
the number of visibility entries for the point at index pointIndex.

◆ getSeedPointCount()

virtual FLE_DLL Index FlowEngine::StereoPointCloudInterface::getSeedPointCount ( ) const
pure virtual
Returns
the number of seed points in this stereo point cloud

◆ initializeSeeds()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::initializeSeeds ( LogListenerInterface logListener,
Index  seedPoints,
Buffer< CameraInterface * >  bubbleViewCameras 
)
pure virtual

Initialize an externally imported point cloud and perform the following internal operation: Seed Points setting, points reindexing, duplicate points removal, and hidden bubble view visibility setting (optional).

Parameters
[in]logListenerlog interface for log output
[in]seedPointsNumber of seeds points. If zero, keeps the existing number (likely all the points)
[in]bubbleViewCameras(optional) bubble view camera list. The vector can be empty.
Returns
One of the following result codes:
  • Result::Success – if the stereo point cloud was initialized successfully.
  • Result::InvalidArgument – if provided cameras are not bubble view cameras
  • Result::Error – if an error occurs

◆ loadFromPly()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::loadFromPly ( ConstStringBuffer  filePath)
pure virtual

Load the point cloud from a PLY file

Parameters
[in]filePatha string buffer containing the UTF-8 encoded path to the PLY file.
Returns
One of the following result codes:

◆ mergeWith()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::mergeWith ( ConstBuffer< StereoPointCloudInterface * >  others,
bool  lastMerge = true 
)
pure virtual

Merge this point cloud data with others. All dense point clouds involved in the process must have valid visibility. Other stereo point clouds are left untouched.

Parameters
[in]othersa buffer of StereoPointCloudInterface
[in]lastMergeset to true on the last merge operation to close a merging sequence. Forgetting to set lastMerge to true on the last merge operation will leave the StereoPointCloud to an undefined state.
Returns
One of the following result codes:
  • Result::Success – if this point cloud has been successfully merged with all others.
  • Result::InvalidArgument
    • if others is not a valid buffer or contains invalid instances.
    • if this point cloud has not valid visibility.
    • if any other point cloud has not valid visibility.
  • Result::OutOfMemoryError – if the system ran out of memory.
  • Result::GenericError – if any other error occurred. Check the log for more information.

◆ projectOnRegularGrid()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::projectOnRegularGrid ( double  gridSpacing,
double  radius,
StandardAxis  axis 
)
pure virtual

Projects the points on a regular grid,

Parameters
gridSpacingthe length of a grid side. Must be greater than 0.
radiusthe neighbor searching limit. Specify 0 for no limit.
axisthe grid up vector.
Returns
One of the following result codes:

◆ removePoint()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::removePoint ( Index  index)
pure virtual

Removes one point from this stereo point cloud.

Parameters
[in]indexthe index of the point to be removed. Must be in the range [0, getPointCount()).
Note
This method is not available in the free version of the SDK.
Returns
One of the following result codes:

◆ removePoints()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::removePoints ( ConstBuffer< Index indexes)
pure virtual

Removes one or more points from this stereo point cloud.

Parameters
[in]indexesa buffer of point indexes to be removed. Each index must be in the range [0, getPointCount()).
Note
This method is not available in the free version of the SDK.
Returns
One of the following result codes:

◆ replaceVisibility()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::replaceVisibility ( ConstBuffer< CameraInterface * >  cameras)
pure virtual

Replaces this stereo point cloud visibility.

Parameters
[in]camerasa buffer of Camera(s) that will replace the internal ones. New cameras should match the number, the name and the dimensions of the current ones in this object.
Note
  1. This function is not available in the free version of the SDK.
Returns
One of the following result codes:

◆ reset() [1/2]

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::reset ( ConstBuffer< Point3 vertexData,
ConstBuffer< Color colorData,
ConstBuffer< Normal normalData 
)
pure virtual

Reset this stereo point cloud object. All the properties will be invalidated.

Parameters
[in]vertexDataa buffer of Point3(s). Must contain at least 3 points.
[in]colorData(optional) buffer of Color(s). When not specified or its length differs from vertexData's, points are colored white (255, 255, 255) and can be recomputed with FlowEngineInterface::recomputeVisibility.
[in]normalData(optional) buffer of Normal(s). Can be recomputed with FlowEngineInterface::recomputeVisibility.
Note
  1. After this operation, this object will not have valid visibility. You can recompute visibility data using FlowEngineInterface. See FlowEngineInterface::recomputeVisibility.
  2. This function is not available in the free version of the SDK.
Returns
One of the following result codes:

◆ reset() [2/2]

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::reset ( Size  vertexCount)
pure virtual

Reset the stereo point cloud. All the properties will be invalidated, and you must refill the vector with the manual set functions.

Parameters
[in]vertexCountthe number of vertices
Note
  1. After this operation, the object will not have a valid visibility. You can recompute the visibility using FlowEngineInterface.

◆ saveToPly()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::saveToPly ( ConstStringBuffer  filePath,
bool  saveColors = true,
bool  saveNormals = true,
bool  useBinaryEncoding = true 
) const
pure virtual

Save the point cloud to PLY file.

◆ setPointColor()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::setPointColor ( Index  idx,
const Color color 
)
pure virtual

Change the color of a point

Parameters
[in]idxthe point index. Must be in the range [0, getPointCount())
[in]colorthe new point color
Returns
One of the following result codes:

◆ setPointNormal()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::setPointNormal ( Index  idx,
const Normal normal 
)
pure virtual

Change the normal of a point

Parameters
[in]idxthe point index. Must be in the range [0, getPointCount())
[in]normalthe new point normal
Returns
One of the following result codes:

◆ setPointPosition()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::setPointPosition ( Index  idx,
const Point3 position 
)
pure virtual

Change the position of a point

Parameters
[in]idxthe point index. Must be in the range [0, getPointCount())
[in]positionthe new point position
Returns
One of the following result codes:

◆ transform()

virtual FLE_DLL Result FlowEngine::StereoPointCloudInterface::transform ( ConstBuffer< double >  transform)
pure virtual

Transforms every point in the point cloud with a SRT matrix.

Parameters
[in]transforma buffer of doubles representing the 4x4 transform matrix that will be applied to every point.
Returns
One of the following result codes: