ParaView/PCL Plugin/Download And Build Instructions

From KitwarePublic
< ParaView‎ | PCL Plugin
Revision as of 18:23, 4 June 2012 by Rkwitt (talk | contribs)
Jump to navigationJump to search

Introduction

This page details the minimum commands required to download and build the PCL Plugin for ParaView. We assume basic knowledge of cmake and the usual Unix build process. For detailed instructions on how to build ParaView from source, we refer to [1].

Download

Download information will be released before PCP '12.

Build Instructions

We propose a three-stage build process to compile and run the PCL plugin for ParaView: 1) Building a vanilla ParaView, 2) Building PCL (with ParaView's VTK) and 3) Building the PCL plugin. While other strategies are possible, we suggest to follow this process (for now) to ensure that both PCL and ParaView use the same VTK version.

Stage 1: Download and install ParaView

We assume that ParaView is checked out to ParaView (default) from this point on. We create a Build directory and run ccmake to set cmake variables, e.g.,

$ cd <FullPathToParaViewSource>/ParaView
$ mkdir Build
$ cd Build 
$ ccmake ..

In the ccmake interface, we make sure that both BUILD_SHARED_LIBS and PARAVIEW_BUILD_PLUGIN_PointCloudLibrary is set to OFF. Note: We do want to build the plugin at that stage. Running

$ make

will build ParaView as well as all the submodules (such as VTK). Optionally, you can specify -jN, e.g. make -j4 to speed up the compilation process by using more cores.

Stage 2: Download and build PCL

Once we have build a vanilla ParaView, we can build PCL against ParaView's VTK version. Currently, we support PCL 1.5.1, but we are working on support for their latest SVN trunk. For detailed instructions on how to obtain PCL, we refer to PCL's installation instructions for compiling from source.

Assuming that you unpacked the PCL 1.5.1 tarball to PCL-1.5.1, we can configure PCL to build against ParaView's VTK. For that, we create a Build directory within the PCL source directory and run ccmake.

$ cd <FullPathToPCLSource>/PCL-1.5.1
$ mkdir Build
$ ccmake ..

Next, we make sure that the VTK_DIR and QVTK_LIBRARY variables are set to

VTK_DIR      <FullPathToParaView>/ParaView/Build/VTK
QVTK_LIBRARY <FullPathToParaView>/ParaView/Build

where FullPathToParaView is the full path to the directory where you checked out ParaView. After changing any other cmake variables, run

$ make

to build PCL.

Stage 3: Building the PCL Plugin

Now that everything is set up, go back to ParaView's Build directory and run ccmake again, i.e.,

$ cd <FullPathToParaViewSource>/ParaView/Build
$ cmake ..

Set the PARAVIEW_BUILD_PLUGIN_PointCloudLibrary to ON, the hit 'c' to configure. Next, you need to set the PCL_DIR variable. Since we did not install PCL system-wide, we set it to

PCL_DIR <FullPathToPCLSourceDir>/PCL-1.5.1/build

where <FullPathToPCLSourceDir> is the absolute path to the directory where you unpacked the PCL tarball. Once this variable is set, hit 'c' and 'g' to configure and generate. Running

$ make 

will compile the plugin and make it available for use within ParaView.

Importing the PCL plugin in ParaView

Now that we have built the plugin, we are ready to import it in ParaView. First, start ParaView

$ cd ParaView/Build
$ bin/paraview

Then, go to Tools/Manage Plugins. Press the Load New... button and navigate to ParaView's ParaView/Build/bin directory. Eventually, select the libVTKPCLFilters.so to load. You should now be ready to use PCL algorithms in ParaView.