Created by: gwideman, Jan 23, 2014 4:44 pm
Revised by: gwideman, Feb 15, 2014 2:49 pm (7 revisions)

Overview

Some notes on Python tools, libraries etc for use with Freesurfer.

Libraries for reading/writing Freesurfer format(s)

Info on Freesurfer formats

Libraries for reading/writing PLY format

Stanford 3D format. Notable because it includes color info (which STL does not).

Summary

So far:
  • No python libraries for Freesurfer surface files that would be free of large number of dependencies
  • No python libraries for PLY surfaces that are native (and again free of dependencies).
Grrrr.

Tentative specs

  • Purpose(s)
    • Input from FS
    • Output to PLY
    • Data structure as basis for performing some operations, like slicing, offset, etc useful for 3D printing.
  • Native python
  • Freesurfer surface files and related
    • Surface
      • Read is required
      • Write is optional, but might be useful
    • Read labels
    • Read label-to-color table
  • PLY surface files
    • Read and write
  • General
    • Have FS and PLY I/O share data structures (translation FS --> PLY is a primary objective).
  • Dependencies
    • Ideally, not dependencies. However, might be worth allowing dependencies on numpy in order to be able to use fast array operations. Perhaps numpy-dependent version could be separate module that inherits from non-numpy version.