SimpleRTK

From Openrtk
Revision as of 03:52, 21 July 2014 by Julien.jomier (talk | contribs)
Jump to navigation Jump to search

Introduction

SimpleRTK provides a simple interface to RTK in a variety of languages. For now only Python and C# binding have been tested and are supported. SimpleRTK will be provided as part of RTK making it easier to configure, build and use. Note that SimpleRTK is derived from the SimpleITK project for the Insight Toolkit, however it's under its own project.

Building RTK with SimpleRTK

SimpleRTK uses Swig to generate the wrapping for different languages. As the version of Swig should be controlled, SimpleRTK will automatically download the right version of Swig and its dependencies for the different platforms. However you can always point to the installed version of Swig if you'd like to, but this is not recommended.

Here are the simple steps to build and configure wrapping for RTK:

  1. Run CMake on RTK as you normally do
  2. Check the option BUILD_SIMPLERTK (default is OFF)
  3. Ename WRAP_PYTHON and/or WRAP_CSHARP (On Windows)
  4. Configure
  5. Build as usual. Note that building will download the require libraries so you should have an internet connection enabled.

Python installation

To install a built python package into the system Python, as root run:

cd SimpleRTK-build/Wrapping
python PythonPackage/setup.py install

Alternatively, a Python virtual environment can be created and the distribution installed there. If you build the "dist" target a Python egg will be created in the "Wrapping/dist" directory. Building Python wheels can be enabled with a CMake flag.

Testing SimpleRTK

A simple example is located in Utilities/SimpleRTK/Examples/RTKFirstReconstruction.py and shows how to use SimpleRTK