ParaView/PCL Plugin/Download And Build Instructions: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
Will be available before the PCP '12 workshop.
== 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 [http://paraview.org/Wiki/ParaView:Build_And_Install].
 
== Download ==
 
Download information will be released before [http://www-sop.inria.fr/manifestations/pcp2012/ 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 <tt>ParaView</tt> (default) from this point on. We create a <tt>Build</tt> directory and run <tt>ccmake</tt> to set cmake variables, e.g.,
 
$ cd <FullPathToParaViewSource>/ParaView
$ mkdir Build
$ cd Build
$ ccmake ..
 
In the <tt>ccmake</tt> interface, we make sure that both <tt>BUILD_SHARED_LIBS</tt> and <tt>PARAVIEW_BUILD_PLUGIN_PointCloudLibrary</tt> is set to <tt>OFF</tt>. '''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 <tt>-jN</tt>, e.g. <tt> make -j4</tt> 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 [http://pointclouds.org/downloads/source.html installation instructions] for compiling from source.
 
Assuming that you unpacked the PCL 1.5.1 tarball to <tt>PCL-1.5.1</tt>, we can configure PCL to build against ParaView's VTK. For that, we create a <tt>Build</tt> directory within the PCL source directory and run <tt>ccmake</tt>.
 
$ cd <FullPathToPCLSource>/PCL-1.5.1
$ mkdir Build
$ ccmake ..
 
Next, we make sure that the <tt>VTK_DIR</tt> and <tt>QVTK_LIBRARY</tt> variables are set to
 
VTK_DIR      <FullPathToParaView>/ParaView/Build/VTK
QVTK_LIBRARY <FullPathToParaView>/ParaView/Build
 
where <tt>FullPathToParaView</tt> 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 <tt>Build</tt> directory and run <tt>ccmake</tt> again, i.e.,
 
$ cd <FullPathToParaViewSource>/ParaView/Build
$ cmake ..
 
Set the <tt>PARAVIEW_BUILD_PLUGIN_PointCloudLibrary</tt> to <tt>ON</tt>, the hit 'c' to configure. Next, you need to set the <tt>PCL_DIR</tt> variable. Since we did not install PCL system-wide, we set it to
 
PCL_DIR <FullPathToPCLSourceDir>/PCL-1.5.1/build
 
where <tt><FullPathToPCLSourceDir></tt> 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 <tt>ParaView/Build/bin</tt> directory. Eventually, select the '''libVTKPCLFilters.so''' to load. You
should now be ready to use PCL algorithms in ParaView.

Revision as of 18:23, 4 June 2012

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.