VES/Developers Guide: Difference between revisions

From KitwarePublic
< VES
Jump to navigationJump to search
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 2: Line 2:


The VES Developer's Guide describes how to download and build the VES libraries, and how to use the libraries in Android and iOS applications.
The VES Developer's Guide describes how to download and build the VES libraries, and how to use the libraries in Android and iOS applications.
Windows developers, please refer to the [[VES/Developers Guide (Windows)| specific instructions for building VES under Windows]].


= Getting Started =
= Getting Started =
Line 32: Line 34:
==What is a Superbuild?==
==What is a Superbuild?==


VES is normally built using a [http://www.kitware.com/products/html/BuildingExternalProjectsWithCMake2.8.html superbuild].  A superbuild manages the download, configure, build, and install steps of multiple projects all at once.  The VES superbuild will download [https://gitorious.org/kitware/vtkmodular vtkmodular], then configure and build both vtkmodular and VES using the appropriate cross compiler for the target architecture.  The target architecture may be an android device, iOS device, or the iOS simulator on x86.  When configuring vtkmodular and ves, cmake is invoked in [http://www.vtk.org/Wiki/CMake_Cross_Compiling cross compile mode] using a toolchain file for the target architecture.  The toolchain files are located in the [http://vtk.org/gitweb?p=VES.git;a=tree;f=CMake/toolchains;hb=HEAD CMake/toolchains] directory.
VES is normally built using a [http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html superbuild].  A superbuild manages the download, configure, build, and install steps of multiple projects all at once.  The VES superbuild will download [https://gitorious.org/kitware/vtkmodular vtkmodular], then configure and build both vtkmodular and VES using the appropriate cross compiler for the target architecture.  The target architecture may be an android device, iOS device, or the iOS simulator on x86.  When configuring vtkmodular and ves, cmake is invoked in [http://www.vtk.org/Wiki/CMake_Cross_Compiling cross compile mode] using a toolchain file for the target architecture.  The toolchain files are located in the [http://vtk.org/gitweb?p=VES.git;a=tree;f=CMake/toolchains;hb=HEAD CMake/toolchains] directory.


==Building==
==Building==
Line 38: Line 40:
====Android instructions====
====Android instructions====


The following commands will compile vtkmodular and ves libraries for the Android.
The Android NDK r8b is currently the required version.  It can be downloaded from:
 
$ http://dl.google.com/android/ndk/android-ndk-r8b-linux-x86.tar.bz2
$ http://dl.google.com/android/ndk/android-ndk-r8b-darwin-x86.tar.bz2
 
The following commands will compile vtk and ves libraries for Android:


  $ export ANDROID_NDK=/path/to/installed/android-ndk
  $ export ANDROID_NDK=/path/to/installed/android-ndk
Line 77: Line 84:
  $ open Apps/iOS/Kiwi/Kiwi.xcodeproj
  $ open Apps/iOS/Kiwi/Kiwi.xcodeproj


====Xcode instructions====
Visit the [[VES/XCode_Project_Setup|Xcode project setup]] page for instructions describing how to setup a Xcode project from scratch that uses VTK, VES, and kiwi.


=Testing=
=Testing=
Line 99: Line 110:


See [[VES/Brain_Atlas_Demo|Brain Atlas Demo]] for details.
See [[VES/Brain_Atlas_Demo|Brain Atlas Demo]] for details.
==Point Cloud Library Demos==
See [[VES/Point_Cloud_Library|Point Cloud Library]] for details.

Latest revision as of 17:04, 4 January 2013

Introduction

The VES Developer's Guide describes how to download and build the VES libraries, and how to use the libraries in Android and iOS applications.

Windows developers, please refer to the specific instructions for building VES under Windows.

Getting Started

For quick instructions, see the Download & Build Instructions page. This developer's guide will go into more detail than is found on that page.

Checkout the source from Git

Use Git to checkout the VES source code with the command:

$ git clone git://vtk.org/VES.git

See the VES Git table of contents page for details on the Git repository and development workflow.

Setting up your development environment

Android

You must have the Android SDK and Android NDK installed. To get started with Android development, visit the Android Developer's Guide. It is recommended that you build and run some of the Android sample applications that are provided with the Android SDK to get familiar with running code on your device before attempting to build and run VES/Kiwi based applications. See this README in the VES repository for a guide to setting up the Android development environment.

iOS

You must have Xcode and the iOS SDK installed. To get started with iOS development, visit Apple's iOS Dev Center. It is recommended that you build and run some of the iOS sample applications that are provided with the iOS SDK to get familiar with running code on your device before attempting to build and run VES/Kiwi based applications.


Build with CMake

CMake is used to configure and build VES.

What is a Superbuild?

VES is normally built using a superbuild. A superbuild manages the download, configure, build, and install steps of multiple projects all at once. The VES superbuild will download vtkmodular, then configure and build both vtkmodular and VES using the appropriate cross compiler for the target architecture. The target architecture may be an android device, iOS device, or the iOS simulator on x86. When configuring vtkmodular and ves, cmake is invoked in cross compile mode using a toolchain file for the target architecture. The toolchain files are located in the CMake/toolchains directory.

Building

Android instructions

The Android NDK r8b is currently the required version. It can be downloaded from:

$ http://dl.google.com/android/ndk/android-ndk-r8b-linux-x86.tar.bz2
$ http://dl.google.com/android/ndk/android-ndk-r8b-darwin-x86.tar.bz2

The following commands will compile vtk and ves libraries for Android:

$ export ANDROID_NDK=/path/to/installed/android-ndk
$ cd Apps/Android/CMakeBuild
$ cmake -P configure.cmake
$ cd build
$ make -j4

Next, build and run the KiwiViewer application. Ant version 1.8 or higher is required.

$ cd Apps/Android/Kiwi
$
$ # if android, adb, ant, or cmake are not in your PATH, edit tools.sh to enter the correct paths
$
$ ./configure_cmake.sh
$ ./configure_ant.sh
$ ./compile.sh

Use adb to confirm that your device is listed:

$ adb devices

Run KiwiViewer on the device:

$ ./run.sh

iOS instructions

The following commands will compile vtkmodular and ves libraries for the iOS simulator and iOS device.

$ cd Apps/iOS/CMakeBuild
$ cmake -P configure.cmake
$ cd build
$ make -j4

Next, build and run the KiwiViewer application using Xcode.

$ open Apps/iOS/Kiwi/Kiwi.xcodeproj


Xcode instructions

Visit the Xcode project setup page for instructions describing how to setup a Xcode project from scratch that uses VTK, VES, and kiwi.

Testing

Testing on Linux

VES can be compiled on Linux using Mesa drivers for OpenGL ES 2.0, and X11. The tests are located in src/kiwi/Testing. The following commands will build VES on Linux:

$ cd Apps/Linux/CMakeBuild
$ cmake -P configure.cmake
$ cd build
$ make -j4

The tests are run by invoking ctest from the build directory:

$ cd CMakeExternals/Build/ves-host
$ ctest

Demos

Brain Atlas Demo

See Brain Atlas Demo for details.

Point Cloud Library Demos

See Point Cloud Library for details.