isl-org / isl-org/Open3D

Compatibility with PoissonRecon

Open
#5,479 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### Describe the issue

Failed to compile [SurfaceReconstructionPoisson.cpp](https://github.com/isl-org/Open3D/blob/master/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp) with current [PoissonRecon](https://github.com/mkazhdan/PoissonRecon)

### Steps to reproduce the bug

```python
Just build **Open3D** from source
```

### Error message

```console
[ 90%] Built target visualization
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:107:14: error: no template named 'InputPointStreamWithData'
: public InputPointStreamWithData {
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:267:36: error: no template named 'InputPointStream'; did you mean 'InputDataStream'?
XForm GetPointXForm(InputPointStream& stream,
^~~~~~~~~~~~~~~~
InputDataStream
/usr/local/include/PoissonRecon/Src/VertexStream.h:37:7: note: 'InputDataStream' declared here
class InputDataStream
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:267:36: error: too many template arguments for class template 'InputDataStream'
XForm GetPointXForm(InputPointStream& stream,
^ ~~~~
/usr/local/include/PoissonRecon/Src/VertexStream.h:37:7: note: template is declared here
class InputDataStream
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:277:36: error: no template named 'InputPointStream'; did you mean 'InputDataStream'?
XForm GetPointXForm(InputPointStream& stream,
^~~~~~~~~~~~~~~~
InputDataStream
/usr/local/include/PoissonRecon/Src/VertexStream.h:37:7: note: 'InputDataStream' declared here
class InputDataStream
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:277:36: error: too many template arguments for class template 'InputDataStream'
XForm GetPointXForm(InputPointStream& stream,
^ ~~~~
/usr/local/include/PoissonRecon/Src/VertexStream.h:37:7: note: template is declared here
class InputDataStream
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:471:21: error: no matching function for call to 'GetPointXForm'
xForm = GetPointXForm(pointStream, (Real)width,
^~~~~~~~~~~~~~~~~~~~~~~~
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:774:14: note: in instantiation of function template specialization 'open3d::geometry::poisson::Execute' requested here
poisson::Execute(pcd, mesh, densities, static_cast(depth),
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:476:33: error: no matching function for call to 'GetPointXForm'
xForm = scale > 0 ? GetPointXForm(pointStream,
^~~~~~~~~~~~~~~~~~~~~~~~
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:498:30: error: no matching function for call to 'Initialize'
pointCount = FEMTreeInitializer::template Initialize<
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/PoissonRecon/Src/FEMTree.h:2624:16: note: candidate function template not viable: no known conversion from 'Open3DPointStream' to 'typename InputPointStream::StreamType &' (aka 'InputDataStream, open3d::geometry::poisson::Open3DData>> &') for 2nd argument
static size_t Initialize( FEMTreeNode& root , typename InputPointStream< Data >::StreamType &pointStream , int maxDepth , std::vector< PointSample >& samplePoints , std::vector< typename InputPointStream< Data >::DataType > &sampleData , bool mergeNodeSamples , Allocator< FEMTreeNode >* nodeAllocator , std::function< void ( FEMTreeNode& ) > NodeInitializer , std::function< Real ( const Point< Real , Dim > & , typename InputPointStream< Data >::DataType & ) > ProcessData = []( const Point< Real , Dim > & , typename InputPointStream< Data >::DataType & ){ return (Real)1.; } );
^
/usr/local/include/PoissonRecon/Src/FEMTree.h:2670:16: note: candidate function template not viable: requires at most 8 arguments, but 9 were provided
static size_t Initialize( FEMTreeNode& root , ConstPointer( Data ) values , ConstPointer( int ) labels , int resolution[Dim] , std::vector< NodeSample< Dim , _Data > > derivatives[Dim] , Allocator< FEMTreeNode >* nodeAllocator , std::function< void ( FEMTreeNode& ) > NodeInitializer , std::function< _Data ( const Data& ) > DataConverter = []( const Data& d ){ return (_Data)d; } );
^
/usr/local/include/PoissonRecon/Src/FEMTree.h:2622:16: note: candidate function template not viable: requires 6 arguments, but 9 were provided
static size_t Initialize( FEMTreeNode& root , typename InputPointStream< Data >::StreamType &pointStream , int maxDepth , std::vector< PointSample >& samplePoints , Allocator< FEMTreeNode >* nodeAllocator , std::function< void ( FEMTreeNode& ) > NodeInitializer );
^
/usr/local/include/PoissonRecon/Src/FEMTree.h:2672:22: note: candidate function template not viable: requires 5 arguments, but 9 were provided
static unsigned int Initialize( FEMTreeNode& root , DerivativeStream< Data >& dStream , std::vector< NodeSample< Dim , Data > > derivatives[Dim] , Allocator< FEMTreeNode >* nodeAllocator , std::function< void ( FEMTreeNode& ) > NodeInitializer );
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:504:30: error: no matching function for call to 'Initialize'
pointCount = FEMTreeInitializer::template Initialize<
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/PoissonRecon/Src/FEMTree.h:2624:16: note: candidate function template not viable: no known conversion from 'Open3DPointStream' to 'typename InputPointStream::StreamType &' (aka 'InputDataStream, open3d::geometry::poisson::Open3DData>> &') for 2nd argument
static size_t Initialize( FEMTreeNode& root , typename InputPointStream< Data >::StreamType &pointStream , int maxDepth , std::vector< PointSample >& samplePoints , std::vector< typename InputPointStream< Data >::DataType > &sampleData , bool mergeNodeSamples , Allocator< FEMTreeNode >* nodeAllocator , std::function< void ( FEMTreeNode& ) > NodeInitializer , std::function< Real ( const Point< Real , Dim > & , typename InputPointStream< Data >::DataType & ) > ProcessData = []( const Point< Real , Dim > & , typename InputPointStream< Data >::DataType & ){ return (Real)1.; } );
^
/usr/local/include/PoissonRecon/Src/FEMTree.h:2670:16: note: candidate function template not viable: requires at most 8 arguments, but 9 were provided
static size_t Initialize( FEMTreeNode& root , ConstPointer( Data ) values , ConstPointer( int ) labels , int resolution[Dim] , std::vector< NodeSample< Dim , _Data > > derivatives[Dim] , Allocator< FEMTreeNode >* nodeAllocator , std::function< void ( FEMTreeNode& ) > NodeInitializer , std::function< _Data ( const Data& ) > DataConverter = []( const Data& d ){ return (_Data)d; } );
^
/usr/local/include/PoissonRecon/Src/FEMTree.h:2622:16: note: candidate function template not viable: requires 6 arguments, but 9 were provided
static size_t Initialize( FEMTreeNode& root , typename InputPointStream< Data >::StreamType &pointStream , int maxDepth , std::vector< PointSample >& samplePoints , Allocator< FEMTreeNode >* nodeAllocator , std::function< void ( FEMTreeNode& ) > NodeInitializer );
^
/usr/local/include/PoissonRecon/Src/FEMTree.h:2672:22: note: candidate function template not viable: requires 5 arguments, but 9 were provided
static unsigned int Initialize( FEMTreeNode& root , DerivativeStream< Data >& dStream , std::vector< NodeSample< Dim , Data > > derivatives[Dim] , Allocator< FEMTreeNode >* nodeAllocator , std::function< void ( FEMTreeNode& ) > NodeInitializer );
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:528:14: error: no matching member function for call to 'resetNodeIndices'
tree.resetNodeIndices();
~~~~~^~~~~~~~~~~~~~~~
/usr/local/include/PoissonRecon/Src/FEMTree.h:2520:18: note: candidate function not viable: requires single argument 'flagsToClear', but no arguments were provided
node_index_type resetNodeIndices( char flagsToClear ){ return resetNodeIndices( flagsToClear , std::make_tuple() ); }
^
/usr/local/include/PoissonRecon/Src/FEMTree.h:2493:18: note: candidate function template not viable: requires 2 arguments, but 0 were provided
node_index_type resetNodeIndices( char flagsToClear , std::tuple< DenseOrSparseNodeData *... > data )
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:533:37: error: no matching member function for call to 'setDensityEstimator'
density = tree.template setDensityEstimator(
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/PoissonRecon/Src/FEMTree.h:2204:64: note: candidate function template not viable: requires 3 arguments, but 4 were provided
typename FEMTree::template DensityEstimator< DensityDegree >* setDensityEstimator( const std::vector< PointSample >& samples , LocalDepth splatDepth , Real samplesPerNode );
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:574:36: error: no member named 'setDataField' in 'FEMTree<3, float>'
*normalInfo = tree.setDataField(
~~~~ ^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:597:27: error: no matching member function for call to 'finalizeForMultigrid'
tree.template finalizeForMultigrid(
~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/PoissonRecon/Src/FEMTree.h:2218:201: note: candidate function template not viable: requires 5 arguments, but 4 were provided
template< unsigned int MaxDegree , unsigned int SystemDegree , typename HasDataFunctor , typename IsDirichletLeafFunctor , typename ... InterpolationInfos > void finalizeForMultigrid( LocalDepth baseDepth , LocalDepth fullDepth , const HasDataFunctor hasData , const IsDirichletLeafFunctor isDirichletLeaf , std::tuple< InterpolationInfos *... > interpolationInfos ){ finalizeForMultigrid< MaxDegree , SystemDegree , HasDataFunctor >( baseDepth , fullDepth , hasData , isDirichletLeaf , interpolationInfos , std::make_tuple() ); }
^
/usr/local/include/PoissonRecon/Src/FEMTree.h:2217:201: note: candidate function template not viable: requires 6 arguments, but 4 were provided
template< unsigned int MaxDegree , unsigned int SystemDegree , typename HasDataFunctor , typename IsDirichletLeafFunctor , typename ... InterpolationInfos , typename ... DenseOrSparseNodeData > void finalizeForMultigrid( LocalDepth baseDepth , LocalDepth fullDepth , const HasDataFunctor hasData , const IsDirichletLeafFunctor isDirichletLeaf , std::tuple< InterpolationInfos *... > interpolationInfos , std::tuple< DenseOrSparseNodeData *... > data );
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:661:18: error: no matching member function for call to 'addInterpolationConstraints'
tree.addInterpolationConstraints(constraints, solveDepth, *iInfo);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/PoissonRecon/Src/FEMTree.h:2281:7: note: candidate template ignored: could not match 'tuple' against 'InterpolationInfo'
void addInterpolationConstraints( DenseNodeData< T , UIntPack< FEMSigs ... > >& constraints , LocalDepth maxDepth , std::tuple< InterpolationInfos *... > interpolationInfos ) const { return _addInterpolationConstraints< 0 >( constraints , maxDepth , interpolationInfos ); }
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:683:19: error: no member named 'baseDepth' in 'FEMTree<3, float>::SolverInfo'
sInfo.baseDepth = base_depth, sInfo.baseVCycles = base_v_cycles;
~~~~~ ^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:687:29: error: no matching member function for call to 'solveSystem'
solution = tree.solveSystem(Sigs(), F, constraints, solveDepth,
~~~~~^~~~~~~~~~~
/usr/local/include/PoissonRecon/Src/FEMTree.h:2463:47: note: candidate function template not viable: no known conversion from 'typename FEMTree::SolverInfo' to 'FEMTree::LocalDepth' (aka 'int') for 5th argument
DenseNodeData< T , UIntPack< FEMSigs ... > > solveSystem( UIntPack< FEMSigs ... > , typename BaseFEMIntegrator::template System< UIntPack< FEMSignature< FEMSigs >::Degree ... > >& F , const DenseNodeData< T , UIntPack< FEMSigs ... > >& constraints , TDotT Dot , LocalDepth maxSolveDepth , const SolverInfo& solverInfo , std::tuple< InterpolationInfos *... > interpolationInfos=std::make_tuple() ) const;
^
/usr/local/include/PoissonRecon/Src/FEMTree.h:2465:7: note: candidate template ignored: could not match 'DenseNodeData>' against 'int'
void solveSystem( UIntPack< FEMSigs ... > , typename BaseFEMIntegrator::template System< UIntPack< FEMSignature< FEMSigs >::Degree ... > >& F , const DenseNodeData< Real , UIntPack< FEMSigs ... > >& constraints , DenseNodeData< Real , UIntPack< FEMSigs ... > >& solution , LocalDepth maxSolveDepth , const SolverInfo& solverInfo , std::tuple< InterpolationInfos *... > interpolationInfos=std::make_tuple() ) const
^
/usr/local/include/PoissonRecon/Src/FEMTree.h:2470:50: note: candidate template ignored: could not match 'std::tuple' against 'InterpolationInfo *' (aka 'InterpolationInfo *')
DenseNodeData< Real , UIntPack< FEMSigs ... > > solveSystem( UIntPack< FEMSigs ... > , typename BaseFEMIntegrator::template System< UIntPack< FEMSignature< FEMSigs >::Degree ... > >& F , const DenseNodeData< Real , UIntPack< FEMSigs ... > >& constraints , LocalDepth maxSolveDepth , const SolverInfo& solverInfo , std::tuple< InterpolationInfos *... > interpolationInfos=std::make_tuple() ) const
^
/usr/local/include/PoissonRecon/Src/FEMTree.h:2461:7: note: candidate function template not viable: requires at least 7 arguments, but 6 were provided
void solveSystem( UIntPack< FEMSigs ... > , typename BaseFEMIntegrator::template System< UIntPack< FEMSignature< FEMSigs >::Degree ... > >& F , const DenseNodeData< T , UIntPack< FEMSigs ... > >& constraints , DenseNodeData< T , UIntPack< FEMSigs ... > >& solution , TDotT Dot , LocalDepth maxSolveDepth , const SolverInfo& solverInfo , std::tuple< InterpolationInfos *... > interpolationInfos=std::make_tuple() ) const;
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:367:39: error: no member named 'setMultiDepthDataField' in 'FEMTree<3, float>'
tree.template setMultiDepthDataField(
~~~~ ^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:728:5: note: in instantiation of function template specialization 'open3d::geometry::poisson::ExtractMesh, float, (lambda at ....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:721:22), 5U, 5U, 5U>' requested here
ExtractMesh, Real>(
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:774:14: note: in instantiation of function template specialization 'open3d::geometry::poisson::Execute' requested here
poisson::Execute(pcd, mesh, densities, static_cast(depth),
^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:390:40: error: no member named 'outOfCorePointCount' in 'CoredMeshData, int>'
for (size_t vidx = 0; vidx < mesh->outOfCorePointCount(); ++vidx) {
~~~~ ^
....../Open3D/cpp/open3d/geometry/SurfaceReconstructionPoisson.cpp:400:40: error: no member named 'polygonCount' in 'CoredMeshData, int>'
for (size_t tidx = 0; tidx < mesh->polygonCount(); ++tidx) {
~~~~ ^
19 errors generated.
make[2]: *** [cpp/open3d/geometry/CMakeFiles/geometry.dir/build.make:401: cpp/open3d/geometry/CMakeFiles/geometry.dir/SurfaceReconstructionPoisson.cpp.o] Error 1
make[2]: Leaving directory '....../Open3D/build'
make[1]: *** [CMakeFiles/Makefile2:677: cpp/open3d/geometry/CMakeFiles/geometry.dir/all] Error 2
make[1]: Leaving directory '....../Open3D/build'
make: *** [Makefile:159: all] Error 2
➜ build git:(master) ✗
```

### Expected behavior

Successfully built

### Open3D, Python and System information

```markdown
- Operating system: Ubuntu 20.04
- Python version: Python 3.10.4
- Open3D version: 0.15.2
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc 11.2.0
```

### Additional information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.