2007 December Slicer IGT Programming IGSTK Slicer Integration
From NAMIC Wiki
Home < 2007 December Slicer IGT Programming IGSTK Slicer Integration
Contents
IGSTK - Slicer Integration
Summary
Media:IGSTK-Slicer-Integration-IGT-Meeting-Dec-12-2007.ppt Summary Presentation
Names
- Session leader
- Patrick Cheng
- participants
- Steve Pieper
- Ziv Yaniv
- Nobi Hata
- David Gobi
- Stephen Aylward
- Peter Kazanzides
- Luis Ibanez
Technology/Function description
- Exposing the Tracker functionality of IGSTK to Slicer
- How to integrate event loops between trackers and GUI Tcl main event loop.
- Suggestion:
- Use sockets in order to send data from the tracker and read it during the blocking stage of the DoOneStep() action in the main Tcl event loop.
- Suggestion:
Potential application in IGT
- Provide Tracker functionality in Slicer
- Aurora Tracker
- Polaris Tracker
- Micron Tracker
- Potentially add Robots as trackers (Johns Hopkins)
Which part is already in Slicer
- IGSTK compilation configuration
- MRML scene graph structure
- Transform nodes
What is not
- IGSTK Tracker
- Functionality of using Sockets for sending Tracker data to Slicer
Who among us will take leading role?
Basic Demo of VTK Sockets
- First, build VTK with Parallel enabled.
- The use the following files:
- SocketServer.cxx
- SocketClient.cxx
- CMakeLists.txt
- Code now Available in the NAMIC Sandbox
- http://www.na-mic.org/svn/NAMICSandBox/trunk/IGSTK-Slicer-IntegrationViaSockets/VTKBasicExample/
- Modified from VTK/Parallel/Testing/Cxx
ToDo
- Create a class deriving from an itk::Command
- Insert code of SocketServer
- Extend time duration of server
- Listen for TransformModifiedEvents from an igstkTrackerTool
- In the Execute() method
- call comm->Send()
- Question:
- use 6 floats ?
- builds a vtkMatrix4x4 ?
- In the Execute() method
Pseudocode
igstkTrackerToolToSocketObserver->Initialize( port ); igstkTrackerToolToSocketObserver->Observer( trackerTool_1 ); igstkTrackerToolToSocketObserver->Start();
- In Slicer
- Create a class that is a SocketClient
- Listen for 6 float coming from the socket server
- when they arrive
- compose them into a vtkMatrix4x4
- insert them in to a predefined MRML node.
Pseudocode
transformSocketListener->Initialize( hostname, port ); transformSocketListener->TargeetMRMLNode( nodeId ); transformSocketListener->Start(); Slicer, during the DoOneStep() method of the event cycle should listen to the socket inputs.
Design Issues
- Should Slicer be
- A Socket Client ? or
- A Socket Server ?
- How to pick port numbers ?
- How to deal with AntiVirus ? (that block ports)
- How to deal with firewalls ?
Links
- http://www.igstk.org
- http://www.itk.org
- http://www.vtk.org
- http://www.vtk.org/doc/nightly/html/classvtkServerSocket.html
- http://www.vtk.org/doc/nightly/html/classvtkClientSocket.html
- http://www.vtk.org/doc/nightly/html/classvtkSocket.html
- http://www.vtk.org/doc/nightly/html/classvtkSocketCollection.html
- http://www.vtk.org/doc/nightly/html/classvtkSocketCommunicator.html
- http://www.vtk.org/doc/nightly/html/classvtkSocketController.html