brainatlas

A Python interface to the rat brain atlas
Download

brainatlas Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Other/Proprietary Li...
  • Price:
  • FREE
  • Publisher Name:
  • Brett Graham
  • Publisher web site:
  • https://github.com/braingram/

brainatlas Tags


brainatlas Description

brainatlas is a Python module with the following purpose:Using the rat brain atlas...1) construct 3d point clouds of various brain regions2) lookup the area for a given location (ML, DV, AP coordinate)3) grab the containing section image for a given location4) plot a location on a flattened cortical surfaceInstallation detailsDue to copyright reasons, this module does not contain the eps files from the cd that comes with the rat brain atlas. These files are however required for the module to function.You can either pass in the path of the eps files to the necessary functions (such as Section.__init__) or copy the eps files (of at least the coronal sections) to atlas/eps.How toget the section index for the containing section>>> pyatlas.py section 6.5 3.5 -7plot a location on a section (show and save the plot)>>> pyatlas.py section 6.5 3.5 -7 -psget the area for a location>>> pyatlas.py area 6.5 3.5 -7get a point cloud of an area (saved to meshes/.asc) >>> pyatlas.py points V2L -mplot a location on a flattened cortex>>> pyatlas.py cortex 6.5 3.5 -7 -psSeveral calls to plot on a flattened cortical surface will go much fasterif the area points are recomputed like so>>> pyatlas.py area -p area.p>>> pyatals.py cortex -A area.pNotesthis is buggy and hacky as all heckwhat I wanted was to generate a 3d mesh of a selected brain area from a stack of labeled brain atlas imagesSteps:1) take eps files of a brain atlas2) find location of a selected area label within each eps file3) render eps file to bitmap format4) find pixels that correspond to the border of the selected area5) map image to brain coordinates6) output 3d brain coordinates for border of selected area at each slice7) use meshlab to generate mesh from pointsthis is terribly hacky and relied on:3) manually generating the mesh using ball-pivoting in meshlabwhat I would really like is to2) make a more flexible mapping for all atlas slices3) automatically generate meshMeshlab1) load in a points file for an area (ex: V1.asc)2) simplify the points: Filter -> Cleaning -> Merge: ~.05 world units3) save as mesh (ex: .ply)4) reload3) mesh the points: Filter -> Remeshing -> Surface Reconstruction (ball pivoting): ~.5 world units (or .7 for V2L)5) close holes5) smooth: Filter -> Smoothing -> Laplace Smooth: 2 iterations6) save as mesh (ex: .ply)Product's homepage


brainatlas Related Software