VUKOZ-OEL / 3d-forest-classic

software for analysis of Lidar data from forest environment.
GNU General Public License v3.0
84 stars 26 forks source link

Compilation problem on Windows: methods like getCloudNames not in PCL library #30

Open ThierryAM opened 1 year ago

ThierryAM commented 1 year ago

Hi,

I'm trying to compile 3D Forest in Window with Visual Studio.

I have been able to install libraries and to generate the project with CMake after some minor modifications in the CMakeLists.txt file. But the Visual Studio solution doesn't compiles. It seem that the PCL library you're using is very different that the one I'm using and I did not find any version of PCL having the methods you're calling.

For instance:

1) In the file sourceCode/segmentation.cpp, I had to make the following modification at line 604 to correct an error at line 607 (extract.setIndices (indicesptr);):

-    boost::shared_ptr<std::vector<int> > indicesptr (new std::vector<int> (indices));
+    pcl::IndicesPtr indicesptr (new pcl::Indices(indices));

2) In the file sourceCode/mainwindow.cpp at line 1739: std::vector<std::string> clouds = event.getCloudNames();, the method getCloudNames() is called in object const pcl::visualization::AreaPickingEvent& event, but there is no method of this name in the pcl:visualization::AreaPickingEvent class.

Do you have any explanations or solutions for my problems?

Thank's

janekT commented 1 year ago

Hi, those problems are from version of PCL you use. try to use this version https://github.com/janekT/pcl/tree/pointpicking - there some changes in visualization parts of library and it uses boost shared_ptr. Jan