Difference between revisions of "Slicer3:FiberTrackingIntegration"
From Slicer Wiki
m (1 revision) |
|
(No difference)
|
Latest revision as of 18:01, 15 May 2008
Home < Slicer3:FiberTrackingIntegrationIntroduction
The purpose of this page is to describe a proof of concept integration between the UNC FiberTracking application and the Slicer 3 execution model. We use the XML based description of a Slicer 3 module along with a simple python script to interface FiberTracking into the Slicer 3 execution model. The result is that a set of diffusion weighted images (DWI) can be loaded from Slicer into FiberTracking and the computed FA image can be transferred back to Slicer. Future work will also allow us to save back fiber tract geometry information.
This work can also serve as a model for integrating other external applications into the Slicer 3 execution model.
Current Work
The following steps were taken to allow FiberTracking to be used from within Slicer 3
- Development of fibertracking.xml description for Slicer 3
<?xml version="1.0" encoding="utf-8"?> <executable> <category> Filtering </category> <title> FiberTracking </title> <description> Calls up FiberTracking in an external window. </description> <version>1.0</version> <documentationurl></documentationurl> <license></license> <contributor>Casey Goodlett</contributor> <parameters> <label>IO</label> <description>Input/output parameters</description> <image> <name>inputVolume0</name> <label>Input Volume 1</label> <channel>input</channel> <index>1</index> <description>Input volume to be filtered</description> </image> <image> <name>inputVolume1</name> <label>Input Volume 2</label> <channel>input</channel> <index>2</index> <description>Input volume to be filtered</description> </image> <image> <name>inputVolume2</name> <label>Input Volume 3</label> <channel>input</channel> <index>3</index> <description>Input volume to be filtered</description> </image> <image> <name>inputVolume3</name> <label>Input Volume 4</label> <channel>input</channel> <index>4</index> <description>Input volume to be filtered</description> </image> <image> <name>inputVolume4</name> <label>Input Volume 5</label> <channel>input</channel> <index>5</index> <description>Input volume to be filtered</description> </image> <image> <name>inputVolume5</name> <label>Input Volume 6</label> <channel>input</channel> <index>6</index> <description>Input volume to be filtered</description> </image> <image> <name>inputVolume6</name> <label>Input Volume 7</label> <channel>input</channel> <index>7</index> <description>Input volume to be filtered</description> </image> <image> <name>outputVolume</name> <label>Output Volume</label> <channel>output</channel> <index>8</index> <description>Output filtered</description> </image> </parameters> </executable>
- Development of fibertracking.py a simple script that translates the command line arguments written by slicer 3 into a form understandable by FiberTracking. This was only done as a rapid prototyping step. Future integration will allow FiberTracking and FiberViewer to directly understand the command line arguments written by slicer.
#!/usr/bin/python import os import sys import getopt try: optlist, args = getopt.getopt(sys.argv[1:],'',['xml']) except getopt.GetOptError: print 'option error' sys.exit(2) for o, a in optlist: if o in '--xml': fid = open('computefa.xml') for line in fid: print line fid.close() sys.exit(0) argstr = ' '.join(args) cmdline = 'FiberTrackingSlicer --slicer ' + argstr print cmdline os.system(cmdline)
- Minor modification of FiberTracking to accept a set of parameters which describe how to pass image information to and from Slicer
Screenshots
Future Work
- Allow transfer of more complex images such as vector, tensor images along with relevant metadata about image and measurement orientation
- Allow transfer of model information describing fiber tract geometry