Difference between revisions of "Slicer3:FiberTrackingIntegration"

From NAMIC Wiki
Jump to: navigation, search
m (Text replacement - "http://www.slicer.org/slicerWiki/index.php/" to "https://www.slicer.org/wiki/")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Introduction =
+
<big>'''Note:''' We are migrating this content to the slicer.org domain - <font color="orange">The newer page is [https://www.slicer.org/wiki/Slicer3:FiberTrackingIntegration here]</font></big>a
 
 
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>
 
 
 
<br />
 
 
 
# 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.
 
 
 
<nowiki>
 
  #!/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)
 
</nowiki>
 
 
 
# Minor modification of FiberTracking to accept a set of parameters which describe how to pass image information to and from Slicer
 
 
 
= Screenshots =
 
 
 
{| border="2" cellpadding="15"
 
|+ '''FiberTracking - Slicer 3 integration'''
 
|-
 
| valign="top" | [[Image:Slicer3-ft-1.png|500px|Here the Diffusion weighted images are loaded in Slicer 3]]
 
|-
 
| valign="top" | [[Image:Slicer3-ft-2.png|570px|thumb|FiberTracking is launched from Slicer 3 and automatically loads the diffusion weighted images]]
 
|-
 
| valign="top" | [[Image:Slicer3-ft-3.png|500px|thumb|The FA image produced in FiberTracking is loaded back into Slicer 3 when the user exits FiberTracking]]
 
|}
 
 
 
= 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
 

Latest revision as of 17:44, 10 July 2017

Home < Slicer3:FiberTrackingIntegration

Note: We are migrating this content to the slicer.org domain - The newer page is herea