[Nipy-devel] data structures for brain surfaces

Darren Weber dweber@radmail.ucsf....
Tue Mar 13 13:11:17 CDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Thanks, Michael.

What is your view of how vtk handles data streams?  I'm concerned that
copies of large data arrays through each stage of processing will exceed
memory limits.  Do you handle most of the data in python lists or numpy
and only convert into vtk for display?

Best, Darren


mcc@uchicago.edu wrote:
> I can't speak for the rest of the nipy project, but pbrain has
> two different types of geometric data visualization: 
> 
> 1) electrode grids (represented by simple .csv files which
> describe, 3d point by 3d point, a combination of 1-dimensional
> 'strips' or 2-dimensional 'grids'; derived from CT scans and
> created with the 'loc3djr' pbrain application)
> 
> 2) vtk mesh data (e.g., for our usage, a segmented cortex)
> (represented by .vtk files of type STRUCTURED_POINTS; derived
> from MRI scans segmented with ITK-Snap; registered to CT-scan
> coordinate-space)
> 
> When 1) is loaded, triangle meshes are generated based on the
> user-specified geometry (e.g. 1x8, 8x8) for each grid. When 2)
> is loaded, the data (in our case, exported from ITK-Snap, and
> consisting of a long binary list of 0s and 1s for every voxel)
> is tossed through a vtkContourFilter (which transforms it into
> a surface triangle mesh).
> 
> Currently, there isn't any way to import .vtk files of other
> types. In the case of these OOGL-type files that you linked
> to, the vtk POLYDATA format is probably the most similar, and
> could easily be supported by pbrain (specifically, eegview's
> 'view3d' window, which renders everything via the vtk library.)
> 
> As far as I know, the python implementation/wrapping of vtk is
> independent of numpy, and has its own vector/matrix/etc.
> primitives. vtk does depend on opengl, but obviates (or at
> least deeply discourages) the need for interacting with the
> opengl interface directly.
> 
> mc
> 
>> Consider some simple geometric data files, eg:
>>
>> http://www.geomview.org/docs/oogltour.html
>>
>> how would you best work with them in nipy/pbrain?  Would you
> read the
>> data into a numpy array or matrix?  Would you use OpenGL data
> structures
>> or maybe VTK data structures?
>>
>> I assume that however this is done, the same process would
> apply for
>> data IO and visualization for surfaces derived from MRI
> segmentation and
>> tesellation (eg, freesurfer data, among others).
>>
>> I guess my preference is to try to stay close to any c/c++
> wrapping.  If
>> OpenGL, vtk, etc. are wrapped somehow (swig), I guess it's
> best to use
>> their functions directly.  However, the data structures
> involved are not
>> trivial and they are not necessarily portable from one
> package to another.
>> I'm wondering about how pyOpenGL and pyVTK relate to the numpy
>> developments.  maybe there is no dependency of pyOpenGL or
> pyVTK on
>> numpy?  Maybe they do depend on numpy, are they catching up
> with the new
>> numpy?
> _______________________________________________
> Nipy-devel mailing list
> Nipy-devel@neuroimaging.scipy.org
> http://lists.neuroimaging.scipy.org/mailman/listinfo/nipy-devel
> 

- --

Darren L. Weber, Ph.D.
Postdoctoral Scholar

Dynamic Neuroimaging Laboratory,
UCSF Department of Radiology,
185 Berry Street, Suite 350, Box 0946,
San Francisco, CA 94107, USA.

Tel: +1 415 353-9444
Fax: +1 415 353-9421
www: http://dnl.ucsf.edu/users/dweber
pgp: http://dnl.ucsf.edu/users/dweber/dweber_pgp.html

"To explicate the uses of the brain seems as difficult
a task as to paint the soul, of which it is commonly
said, that it understands all things but itself."
  Thomas Willis (The Anatomy of the Brain and Nerves, 1664)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF9ulExaCYN7qs0v4RAuR+AJ4jruwoJV9vNaygfNm7jHpubFV7kACfRBhE
en3oru9gPX4ATcqOaU0PXPM=
=PyEb
-----END PGP SIGNATURE-----



More information about the Nipy-devel mailing list