PoissonReconstruction

to use PoissonReconstruction in VTK in the examples site, it says to:
Enable the remote module by setting Module_PoissonReconstruction:BOOL=ON.
but where in the building process I should do this setting? it’s not one of the CMake configuration switches that show up during configuration.
the same goes to the PowerCrust surface reconstruction.

2 Likes

I have never used it but in your VTK source there will be a folder called Remote it may already have PoissonReconstruction.remote.cmake and Powercrust.remote.cmake in it. If not, download the files and put them in the Remote folder.

Then go to where you build VTK and run cmake-gui. In the VTK section, you will see a line called VTK_MODULE_ENABLE_VTK_PoissonReconstruction. Set the value to WANT and do the same for for VTK_MODULE_ENABLE_VTK_Powercrust. Then rebuild VTK.

The new names are VTK_MODULE_ENABLE_VTK_* not Module_*. If you get it working, let me know and I’ll update the instructions.

in the Remote folder there exist those two .cmake files.

but when in the vtk/build folder (where I previously cmake built the vtk source) I open cmake-gui, I don’t see any key or line as you said. you mean reconfiguring again? then I did it and there’s till no key containing PoissonReconstruction nor PowerCrust.

I am using VTK 9.0, after you have pressed configure, you should see lines like this in the VTK section of cmake-gui:

2 Likes

@amaclean I downloaded VTK 9.0.1, building with cmake, using visual studio 16 2019 as the generator, then by hitting configure, none of the options are like the ones you showed above, actually even none is having VTK_MODULE_ prefix.
The reomote folder does have the PoissonReconstruction.remote.cmake file in it.
So I wonder if I’m missing some step?

I am assuming you are in your VTK build folder. Make sure that after starting ``cmake-gui` you have checked the Grouped and Advanced boxes. After you do this, this is what you should see when scrolling through the VTK group:


Then set the values to WANT then configure and build.

1 Like

@amaclean checked grouped and advanced, put the VTK_MODULE_ENABLE_VTK_PoissonReconstruction and VTK_MODULE_ENABLE_VTK_Powercrust to WANT
then configure, generate, then opened VTK.sln in visual studio, built the All Build and then built the Install.
both successfull with no failed packages.

then when I want to build the example again it fails with error:
PoissonExtractSurface\PoissonExtractSurface.cxx(11,10): fatal error C1083: Cannot open include file: ‘vtkPoissonReconstruction.h’: No such file or directory

Is there something I should consider?

1 Like

I would suspect that you are missing the requisite VTK module in your find_package(VTK COMPONENTS ...) for your CMakeList.txt for your example.

Perhaps it is called PoissonReconstruction

You could also try running VTK/Utilities/Maintenance/FindNeededModules.py - follow the instructions at the top of this script.

https://kitware.github.io/vtk-examples/site/Cxx/Points/PoissonExtractSurface/

I have a similar issue, when build with make install the vtkPoissonReconstruction.h is not installed in the install directory