Giter Site home page Giter Site logo

igtlpolytopointexample's Introduction

IGTLPolyToPointExample

Example program to receive OpenIGTLink POLYDATA message and extract points

Description

This is a simple program that demonstrates how to receive a POLYDATA message from a server program and extract the coordinates of the point. It will output the coordinates as comma-separated values on the standard output.

Install

The program is written using CMake. Run CMake to generate a Makefile (Linux/Mac) or project file (Windows), and build. On Linux/Mac:

cd <working directory>
git clone https://github.com/tokjun/IGTLPolyToPointExample
mkdir IGTLPolyToPointExample-build
cd IGTLPolyToPointExample-build
cmake -DOpenIGTLink_DIR:STRING=<OpenIGTLink binary directory> ../IGTLPolyToPointExample
make

Tutorial using Slicer

First, set up 3D Slicer:

  1. Start 3D Slicer, and load a surface model (VTK or STL file).
  2. Open the "OpenIGTLink IF" module
  3. In the "OpenIGTLink IF" module, create a connector and configure as a server.
  4. Make sure the port number is 18944.
  5. Start the OpenIGTLink server by clicking the "Active" button. The status should become "WAIT".

Then, open the terminal and star the example:

  1. Move to the folder that contains the executive file for the example program.
  2. Run the example program with the following command: "IGTLPolyToPointExample localhost 18944"
  3. Confirm that the status on the 3D Slicer OpenIGTLink IF module becomes "ON".

Push the surface model from 3D Slicer to the example program:

  1. In the OpenIGTLink IF module, scroll down to the "I/O Configuration" section. There is a tree list.
  2. Under IGTLConnector in the tree list, click 'OUT'
  3. Select the name of the surface model from the selector below the tree list interface.
  4. Click '+' button next to the selector. The surface model shows up under 'OUT'. (It may be hidden. If you see '+' next to 'OUT', please click it to expand.)
  5. Click the surface model in the tree list.
  6. Click the 'Send' button below the tree list (on the right).
  7. The example program will start receiving a POLYDATA message and putting the coordinates to the standard output (console).

igtlpolytopointexample's People

Contributors

tokjun avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.