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

Stores a simple stereo mesh object for the FlowEngine interface. More...

#include <StereoMeshInterface.h>

Inheritance diagram for FlowEngine::StereoMeshInterface:
FlowEngine::NamedObjectInterface

Public Member Functions

virtual FLE_DLL ~StereoMeshInterface ()=default
 Default virtual destructor.
 
virtual FLE_DLL Index getPointCount () const =0
 
virtual FLE_DLL Index getTriangleCount () const =0
 
virtual FLE_DLL Result getPointPosition (Index idx, Point3 &outPosition) const =0
 
virtual FLE_DLL Result getPointColor (Index idx, Color &outColor) const =0
 
virtual FLE_DLL Result getTriangle (Index idx, Triangle &outTriangle) 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 Result copyFrom (const StereoMeshInterface &inStereoMesh)=0
 
virtual FLE_DLL Result reset (Size vertexCount, Size triangleCount)=0
 
virtual FLE_DLL Result reset (ConstBuffer< Point3 > vertexData, ConstBuffer< Triangle > triangleData, ConstBuffer< Color > colorData)=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 setPointColor (Index idx, const Color &color)=0
 
virtual FLE_DLL Result setTriangle (Index idx, const Triangle &triangle)=0
 
virtual FLE_DLL Result transform (ConstBuffer< double > transform)=0
 
virtual FLE_DLL Result removePoint (Index index)=0
 
virtual FLE_DLL Result removePoints (ConstBuffer< Index > indexes)=0
 
virtual FLE_DLL Result decimate (Size targetVertices, bool preserveBoundaries=false, SettingsInterface *settings=nullptr)=0
 
virtual FLE_DLL Result densify (Size targetVertices, SettingsInterface *settings=nullptr)=0
 
virtual FLE_DLL Result remesh (double factor, int iterations, SettingsInterface *settings=nullptr)=0
 
virtual FLE_DLL Result laplacianSmoothing (int iterations, SettingsInterface *settings=nullptr)=0
 
virtual FLE_DLL Result bilateralSmoothing (int iterations, double sigma, SettingsInterface *settings=nullptr)=0
 
virtual FLE_DLL Result computeWatertightMesh (SettingsInterface *settings=nullptr)=0
 
virtual FLE_DLL Result computeVolume (double &outVolume) const =0
 
virtual FLE_DLL Result computeArea (double &outArea) const =0
 
virtual FLE_DLL Result loadFromPly (ConstStringBuffer filePath)=0
 
virtual FLE_DLL Result saveToPly (ConstStringBuffer filePath, bool useBinaryEncoding=true) const =0
 
virtual FLE_DLL Result loadFromObj (ConstStringBuffer filePath)=0
 
virtual FLE_DLL Result saveToObj (ConstStringBuffer filePath, bool saveColor=false) const =0
 
virtual FLE_DLL Result extractStereoMesh (StereoPointCloudInterface &outStereoPoints) const =0
 Kept for compatibility. See extractStereoPointCloud.
 
virtual FLE_DLL Result extractStereoPointCloud (StereoPointCloudInterface &outStereoPoints) const =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 stereo mesh object for the FlowEngine interface.

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

Constructor & Destructor Documentation

◆ ~StereoMeshInterface()

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

Default virtual destructor.

Member Function Documentation

◆ bilateralSmoothing()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::bilateralSmoothing ( int  iterations,
double  sigma,
SettingsInterface settings = nullptr 
)
pure virtual

Applies a bilateral smoothing filtering to this mesh. This filter reduces noise by improving and emphasizing edges where possible.

Parameters
[in]iterationsthe number of iterations. Must be in the range [1, 50]
[in]sigmathe smoothing strength. Must be in the range (0, 1].
[in]settings(optional) pointer to a settings object. It will be used to query for available CUDA devices.
Returns
One of the following result codes:

◆ computeArea()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::computeArea ( double &  outArea) const
pure virtual

Computes the are of this mesh.

Parameters
[out]outAreathe area of the mesh.

◆ computeVolume()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::computeVolume ( double &  outVolume) const
pure virtual

Computes the volume of this mesh.

Parameters
[out]outVolumethe volume of the mesh.

◆ computeWatertightMesh()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::computeWatertightMesh ( SettingsInterface settings = nullptr)
pure virtual

Computes a watertight mesh by closing all the holes in this mesh.

Parameters
[in]settings(optional) pointer to a settings object. It will be used to query for available CUDA devices.
Returns
One of the following result codes:

◆ copyFrom()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::copyFrom ( const StereoMeshInterface inStereoMesh)
pure virtual

Copies data from another Stereo Mesh.

Parameters
[in]inStereoMeshthe stereo textured mesh in input
Returns
One of the following result codes:

◆ decimate()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::decimate ( Size  targetVertices,
bool  preserveBoundaries = false,
SettingsInterface settings = nullptr 
)
pure virtual

Decimates a mesh to the desired target number of vertices.

Parameters
[in]targetVerticesthe target number of vertices. Must be less than the current number of points, i.e. getPointCount().
[in]preserveBoundarieswhen true, boundary triangles will not be decimated.
[in]settings(optional) pointer to a settings object. It will be used to query for available CUDA devices.
Returns
One of the following result codes:

◆ densify()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::densify ( Size  targetVertices,
SettingsInterface settings = nullptr 
)
pure virtual

Densifies a mesh to the desired target number of vertices.

Parameters
[in]targetVerticesthe target number of vertices. Must be greater than the current number of points, i.e. getPointCount().
[in]settings(optional) pointer to a settings object. It will be used to query for available CUDA devices.
Returns
One of the following result codes:

◆ extractStereoMesh()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::extractStereoMesh ( StereoPointCloudInterface outStereoPoints) const
pure virtual

Kept for compatibility. See extractStereoPointCloud.

◆ extractStereoPointCloud()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::extractStereoPointCloud ( StereoPointCloudInterface outStereoPoints) const
pure virtual

Extracts a stereo point cloud from the current stereo mesh object.

Parameters
[out]outStereoPointsthe stereo point cloud in output
Returns
One of the following result codes:
Note
  1. The created stereo point cloud will have the same visibility of the input stereo mesh.

◆ getPointColor()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::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 Returns Must be in the range [0, getPointCount())
[out]outColorthe retrieved color

◆ getPointCount()

virtual FLE_DLL Index FlowEngine::StereoMeshInterface::getPointCount ( ) const
pure virtual
Returns
the number of points in this mesh.

◆ getPointPosition()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::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 Returns. Must be in the range [0, getPointCount())
[out]outPositionthe retrieved point position

◆ getPointVisibility()

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

Queries 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::StereoMeshInterface::getPointVisibilityCount ( Index  pointIndex) const
pure virtual

Queries 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.

◆ getTriangle()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::getTriangle ( Index  idx,
Triangle outTriangle 
) const
pure virtual

Returns the index at index idx. A triangle is a triplet of indexes that reference points in this Stereo mesh object. This function is not available in the free version of the SDK.

Parameters
[in]idxthe index of the triangle to Returns Must be in the range [0, getTriangleCount())
[out]outTrianglethe Returnsd triangle

◆ getTriangleCount()

virtual FLE_DLL Index FlowEngine::StereoMeshInterface::getTriangleCount ( ) const
pure virtual
Returns
the number of triangles in this mesh.

◆ laplacianSmoothing()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::laplacianSmoothing ( int  iterations,
SettingsInterface settings = nullptr 
)
pure virtual

Applies a laplacian smoothing filtering to this mesh.

Parameters
[in]iterationsnumber of iterations
[in]settings(optional) pointer to a settings object. It will be used to query for available CUDA devices.
Returns
One of the following result codes:

◆ loadFromObj()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::loadFromObj ( ConstStringBuffer  filePath)
pure virtual

Loads the mesh from a OBJ file.

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

◆ loadFromPly()

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

Loads the mesh 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:

◆ remesh()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::remesh ( double  factor,
int  iterations,
SettingsInterface settings = nullptr 
)
pure virtual

Applies an isotropic remeshing to this mesh.

Parameters
[in]factorremesh factor. A factor of 2 will approximately double the mesh vertices, while a factor of 0.5 will approximately halve the mesh vertices. Must be greater than 0.
[in]iterationsnumber of iterations.
[in]settings(optional) pointer to a settings object. It will be used to query for available CUDA devices.
Returns
One of the following result codes:

◆ removePoint()

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

Removes one point from this stereo mesh. Triangles will be updated automatically.

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::StereoMeshInterface::removePoints ( ConstBuffer< Index indexes)
pure virtual

Removes one or more points from this stereo mesh. Triangles will be updated automatically.

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::StereoMeshInterface::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::StereoMeshInterface::reset ( ConstBuffer< Point3 vertexData,
ConstBuffer< Triangle triangleData,
ConstBuffer< Color colorData 
)
pure virtual

Reset this Stereo Mesh object. All properties will be invalidated.

Parameters
[in]vertexDataa buffer of Point3(s). Its length must be at least 3.
[in]triangleDataa buffer of Triangle(s). Its length must be at least 1.
[in]colorDataa (optional) buffer of Color(s). When not specified or its length differs from vertexData's, the mesh is colored white (255, 255, 255).
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::StereoMeshInterface::reset ( Size  vertexCount,
Size  triangleCount 
)
pure virtual

Reset this Stereo Mesh object. All the properties will be invalidated, and you must fill the mesh data with the manual set functions.

Parameters
[in]vertexCountthe new number of vertices. There should be at least 3 unique vertexes in a mesh.
[in]triangleCountthe new number of triangles. There should be at least 1 triangle in a mesh.
Note
  1. After this operation, the object will not have a valid visibility. You can recompute the visibility using FlowEngineInterface.
  2. This function is not available in the free version of the SDK.
Returns
One of the following result codes:

◆ saveToObj()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::saveToObj ( ConstStringBuffer  filePath,
bool  saveColor = false 
) const
pure virtual

Saves this mesh to a file in OBJ+Material format.

Parameters
[in]filePathstring buffer that contains the UTF-8 file path where the mesh will be saved to.
[in]saveColor(default false). when true, color information will be included in the obj. Note: the OBJ format does not officially support this feature, but some programs can read this information.
Returns
One of the following result codes:
Note
  1. This function is not available in the free version of the SDK.
  2. More than 1 file will be produced by this method in order to store OBJ materials.

◆ saveToPly()

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

Saves this mesh to a file in PLY format.

Parameters
[in]filePathstring buffer that contains the UTF-8 file path where the mesh will be saved to.
[in]useBinaryEncoding(default: yes) use binary encoding when saving instead of plain ASCII.
Returns
One of the following result codes:
Note
  1. This function is not available in the free version of the SDK.

◆ setPointColor()

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

Changes the color of a point.

Parameters
[in]idxthe point index. Must be in the range [0, getPointCount())
[in]colorthe new point color

◆ setPointPosition()

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

Changes the position of a point.

Parameters
[in]idxthe point index. Must be in the range [0, getPointCount())
[in]positionthe new point position

◆ setTriangle()

virtual FLE_DLL Result FlowEngine::StereoMeshInterface::setTriangle ( Index  idx,
const Triangle triangle 
)
pure virtual

Changes the triangle indexes of a triangle.

Parameters
[in]idxthe triangle index. Must be in the range [0, getTriangleCount())
[in]trianglethe triangle indexes. Indexes must be in range [0, getPointCount())

◆ transform()

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

Transforms every point in the mesh 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: