Difference between revisions of "User:Mseeland"

From NAMIC Wiki
Jump to: navigation, search
Line 45: Line 45:
 
===Teem Python wrapping===
 
===Teem Python wrapping===
  
 +
====BACKGROUND====
 
* The python wrappings are based on ctypes, as well as a ctypes code generator (called "ctypeslib")
 
* The python wrappings are based on ctypes, as well as a ctypes code generator (called "ctypeslib")
 
** http://python.net/crew/theller/ctypes
 
** http://python.net/crew/theller/ctypes
Line 54: Line 55:
  
  
GETTING THE SOFTWARE
+
====GETTING THE SOFTWARE====
 
* Python 2.6 can be got here (anything after 2.5 should work): http://www.python.org/download/
 
* Python 2.6 can be got here (anything after 2.5 should work): http://www.python.org/download/
 
* get gccxml version 0.9.0, which can be got by CVS as described here: http://www.gccxml.org/HTML/Download.html
 
* get gccxml version 0.9.0, which can be got by CVS as described here: http://www.gccxml.org/HTML/Download.html
Line 68: Line 69:
  
  
CREATING PYTHON/TEEM
+
====CREATING PYTHON/TEEM====
 
* First get Teem (starting from whatever directory should contain the "teem" source dir):
 
* First get Teem (starting from whatever directory should contain the "teem" source dir):
 
   svn co https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem
 
   svn co https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem

Revision as of 01:36, 1 December 2008

Wiki of Madeleine Seeland

General Information

About myself

I am a grad student of Management Information Systems at the University of Mannheim, Germany. I'm involved in the Diffusion Tensor Imaging (DTI) project in the Laboratory of Mathematics in Imaging. Currently I'm working on two-tensor tractograohy for Neurosurgery. I will document my research experience as a diploma thesis, which I need for completing my studies in Germany.

Contact information

E-mail: mseeland (at sign) bwh.harvard.edu

Collaborators & Contacts

  • Supervisors: C-F Westin, Nobuhiko Hata
  • Gordon Kindlmann
  • Sharon Peled
  • Alireza Radmanesh
  • regarding Python: Demian Wassermann, Steve Pieper, Sylvain Bouix, Julien de Siebenthal

Project: Two-Tensor Tractography integration into Slicer

Project Description

  • Integration of two-tensor tractography into Slicer using Python
  • My part: Interface between Python and Slicer
  • The Teem Python API will be provided by Gordon Kindlmann

How to enable Python in Slicer 3.3

  • The current version of Slicer, Slicer 3.2, does not support Python. In order to use Python you need to install Slicer 3.3.
  • To build Slicer Version 3.3, just do the following two commands:
 svn co http://svn.slicer.org/Slicer3/trunk Slicer3
 ./Slicer3/Scripts/getbuildtest.tcl
  • In Slicer 3.3, Python support is disabled by default. In order to enable Python, just follow the next steps:
  1. Edit slicer_variables.tcl
    1. Change "set ::USE_PYTHON "off"" to "on"
  2. Optional: If you prefer to use your system Python installation, see here: [1]
  3. Optional: installing SciPy, see here: [2]. However, there are still problems adding scipy in Slicer, whcih are not fixed yet.
  • Rebuild Slicer3 using "getbuildtest.tcl":
./Slicer3/Scripts/getbuildtest.tcl

A new menu command Python Interpreter should appear on the Window menu in Slicer. This command should bring up the Python Console window.

Teem Python wrapping

BACKGROUND

  • How to create Python wrappings for Teem:


GETTING THE SOFTWARE

 * http://svn.python.org/projects/ctypes/branches/ctypeslib-gccxml-0.9
  • But this requires some patches to work; the content of the "fixes.patch" file can be found here: [[3]]:
  svn co http://svn.python.org/projects/ctypes/branches/ctypeslib-gccxml-0.9
  cd ctypeslib-gccxml-0.9
  patch -p0 < ../fixes.patch
  cd ..
  • ctypeslib is written in python => there's nothing new to compile at this point


CREATING PYTHON/TEEM

  • First get Teem (starting from whatever directory should contain the "teem" source dir):
 svn co https://teem.svn.sourceforge.net/svnroot/teem/teem/trunk teem

and compile it as a shared library. Directions for doing this with Cmake are now here:

 http://teem.sourceforge.net/build.html
  • create the wrappings in a new directory (e.g. "teem-wrap"), where the XML and Python output will be

Status/Progress

Month Week # Start Date - End Date Done Date Done
Try to compile teem with levmar (= Levenberg-Marquardt algorithm) x
Week 48 24.11 - 30.11
document the results of the two-tensor tractography given a tensor volume x
Try to do mutli trace tractography given a DWI volume x Mon Nov, 17th
Week 47 17.11 - 23.11
Working on Python tractography module for multi fiber tracing given a tensor volume x Mon Nov, 17th
Week 46 10.11 - 16.11
Get vertex data out of the nvert nrrd filled by the tractography back to Slicer x
Try to pass image data from Python to Teem through nrrdWrap_nva function x
Try to generate a list of point locations that were used as tractography seedpoints in the VTK tractography x Thu Nov, 13th
Implement Python tractography module for single fiber tracing given a seeding starting point and a tensor volume x Fri, Nov, 7th
Week 45 03.11 - 09.11
Try to get image data from numpy (= Python package) to Teem nrrd struct x
November Week 44 27.10 - 02.11
Try to get image data from numpy (= Python package) to Teem nrrd struct x
Week 43 20.10 - 26.10
Try to access DWI volumes through Python x Fri Oct, 17th
Get Teem wrapped in Python x Fri Oct, 19th
Week 42 13.10 - 19.10
Try to implement the seeding part of the (VTK) one-tensor tractography module in Python x Tue Oct, 14th
Week 41 06.10 - 12.10
Try to implement the seeding part of the (VTK) one-tensor tractography module in Python x Tue Oct, 14th
October Week 40 29.09 - 5.10
Totally understand existing Python modules in Slicer x
understand existing one-tensor streamline tractography in Slicer (VTK) x Tue Sep, 23rd
Totally understand existing Python modules in Slicer x Tue Sep, 23rd
Week 39 22.09 - 28.09
Slicer & Python Tutorials x
Enable Python in Slicer x Mon Sep, 22nd
September Week 38 14.09 - 21.09

Information

Python: