daviddoria / poissonreconstruction Goto Github PK
View Code? Open in Web Editor NEWPoisson surface reconstruction implementation in VTK
Poisson surface reconstruction implementation in VTK
This is a port of Misha Kazhdan's work (http://www.cs.jhu.edu/~misha/Code/PoissonRecon/) to VTK. NOTE: The normals of the input polydata must be vtkFloatArray, NOT vtkDoubleArray!
1、
template
inline Real Octree::GetLaplacian(const int idx[DIMENSION]) const
{
return Real(fData.dotTable[idx[0]]*fData.dotTable[idx[1]]fData.dotTable[idx[2]](fData.d2DotTable[idx[0]]+fData.d2DotTable[idx[1]]+fData.d2DotTable[idx[2]]));
}
i can not understand why the return value of the function is like this. In hope's paper, It doesn't seem so……
2、 can u tell me the logic of this function? I can't got it……
void OctNode<NodeData,Real>::__ProcessTerminatingNodeAdjacentNodes(const int& dx,const int& dy,const int& dz,OctNode* node1,const int& radius1, OctNode* node2,const int& radius2,const int& cWidth2, TerminatingNodeAdjacencyFunction* F)
{
int cWidth=cWidth2>>1;
int radius=radius2>>1;
int o=ChildOverlap(dx,dy,dz,radius1+radius,cWidth);
if(o){
int dx1=dx-cWidth;
int dx2=dx+cWidth;
int dy1=dy-cWidth;
int dy2=dy+cWidth;
int dz1=dz-cWidth;
int dz2=dz+cWidth;
if(o& 1){if(F->Function(&node2->children[0],node1) && node2->children[0].children{__ProcessTerminatingNodeAdjacentNodes(dx1,dy1,dz1,node1,radius1,&node2->children[0],radius,cWidth,F);}}
if(o& 2){if(F->Function(&node2->children[1],node1) && node2->children[1].children{__ProcessTerminatingNodeAdjacentNodes(dx2,dy1,dz1,node1,radius1,&node2->children[1],radius,cWidth,F);}}
if(o& 4){if(F->Function(&node2->children[2],node1) && node2->children[2].children{__ProcessTerminatingNodeAdjacentNodes(dx1,dy2,dz1,node1,radius1,&node2->children[2],radius,cWidth,F);}}
if(o& 8){if(F->Function(&node2->children[3],node1) && node2->children[3].children{__ProcessTerminatingNodeAdjacentNodes(dx2,dy2,dz1,node1,radius1,&node2->children[3],radius,cWidth,F);}}
if(o& 16){if(F->Function(&node2->children[4],node1) && node2->children[4].children{__ProcessTerminatingNodeAdjacentNodes(dx1,dy1,dz2,node1,radius1,&node2->children[4],radius,cWidth,F);}}
if(o& 32){if(F->Function(&node2->children[5],node1) && node2->children[5].children{__ProcessTerminatingNodeAdjacentNodes(dx2,dy1,dz2,node1,radius1,&node2->children[5],radius,cWidth,F);}}
if(o& 64){if(F->Function(&node2->children[6],node1) && node2->children[6].children{__ProcessTerminatingNodeAdjacentNodes(dx1,dy2,dz2,node1,radius1,&node2->children[6],radius,cWidth,F);}}
if(o&128){if(F->Function(&node2->children[7],node1) && node2->children[7].children{__ProcessTerminatingNodeAdjacentNodes(dx2,dy2,dz2,node1,radius1,&node2->children[7],radius,cWidth,F);}}
}
Thanks a lot !!!
I am using VTK 8.1.1, CMake 3.11.4 on Windows 10 64 bits to generate a visual studio (2015) project and everything works perfectly. But I cannot use the visual studio to build the project in both the debug and release modes due to an error "Cannot open file "..\lib\Debug\vtkPoissonReconstruction.lib"".
How do I solve this problem?
Thank you.
While successfully compiling the project GCC 6 warns:
In file included from /usr/include/c++/6/ext/hash_map:60:0,
it lacks the 5th argument. With GCC up to version 6 this compiles as the function is never used. With GCC 7 this leads to compilation error. An alternative to removing the method could be adding a 5th parameter to be directly passed on here. from /home/jarzec/workspace/ith/3rdparty/PoissonReconstruction/source/Hash.h:40,
from /home/jarzec/workspace/ith/3rdparty/PoissonReconstruction/source/Geometry.h:38,
from /home/jarzec/workspace/ith/3rdparty/PoissonReconstruction/source/MarchingCubes.h:37,
from /home/jarzec/workspace/ith/3rdparty/PoissonReconstruction/source/MarchingCubes.cpp:34:
/usr/include/c++/6/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
#warning
^~~~~~~
In GCC 7 hash_map
is completely removed and compilation fails.
Additionaly the call in line 2661 in source/MultiGridOctreeData.inl
is incorrect - it lacks the 5th argument. With GCC prior to version 7 this compiles as the function is never used. With GCC 7 this leads to compilation error.
When integrating this project in an existing project using cmake and versioning, this happens :
CMake Warning (dev) at 3rdparty/PoissonReconstruction/CMakeLists.txt:3 (project):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
The following variable(s) would be set to empty:
PROJECT_VERSION
PROJECT_VERSION_MAJOR
PROJECT_VERSION_MINOR
PROJECT_VERSION_PATCH
This warning is for project developers. Use -Wno-dev to suppress it.
There is two ways of fixing it :
cmake_minimum_required(VERSION 3.0)
if(POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif()
project(PoissonReconstruction)
I can PR it but it would require some more testing with old versions of cmake (<3.0)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.