ParaView/PCL Plugin/Download And Build Instructions

From KitwarePublic
< ParaView‎ | PCL Plugin
Revision as of 13:17, 16 May 2013 by Barre (talk | contribs) (→‎Stage 2: Download and build PCL)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

The PCL Plugin for ParaView source (v1.0) can be downloaded from here.

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

Download the ParaView 3.14.1 source tarball from [2] and follow the build instructions to compile ParaView. First, unpack the tarball, i.e.,

$ tar xvfz ParaView-3.14.1-Source.tar.gz
$ cd ParaView-3.14.1-Source

Then, create a Build directory and call ccmake to enter a graphical user interface for changing cmake variables. Alternatively, you can also set the variables on the command line.

$ mkdir Build
$ cd Build 
$ ccmake ..

Note: Make sure that BUILD_SHARED_LIBS is set to ON (default is OFF). Hitting 'c' followed by 'g' will configure and generate all files for the build process. 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 (MacOSX users may consider this page if they encounter compilation errors).

For convenience, we repeat the basic commands: First unpack the tarball, enter the directory and create a Build subdirectory, i.e.,

$ tar xvjpf PCL-1.5.1-Source.tar.bz2
$ cd PCL-1.5.1-Source
$ mkdir Build
$ cd Build

Then, run ccmake and make sure that the VTK_DIR variable is set to

VTK_DIR <FullPathToParaView>/ParaView-3.14.1-Source/Build/VTK

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

$ make

to build PCL.

Stage 3: Building the PCL Plugin

Now that everything is set up, we are ready to build the plugin. First, download the tarball (see above) and unpack it, i.e.,

$ tar xvfz PointCloudLibraryPlugin-v1.0.tar.gz

Then, create a Build directory and run ccmake, i.e.,

$ cd PointCloudLibraryPlugin-v1.0
$ mkdir Build
$ cd Build
$ ccmake ..

Make sure to set the ParaView_DIR and PCL_DIR cmake variables to

$ PCL_DIR      <FullPathToPCLSOurce>/PCL-1.5.1-Source/Build
$ ParaView_DIR <FullPathToParaViewSource>/ParaView-3.14.1-Source/Build

Hit 'c' and 'g' to configure and generate. Alternatively, you can set all on the command line by

$ cmake -DParaView_DIR=<...> -DPCL_DIR=<...> ..

Running

$ make 

will eventuall 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 <FullPathToParaViewSource>/ParaView-3.14.1-Source/Build
$ bin/paraview

Then, go to Tools/Manage Plugins. Press the Load New... button and navigate to ParaView's ParaView/Build/bin directory. Navigate to the Build/bin directory where you unpacked the plugin and select libvtkPCLFilters.so to load. You might also want to enable Auto Load so that the plugin gets automatically loaded. You should now be ready to use PCL algorithms in ParaView.