{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "155622" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from freesurfer_surface import Surface\n", "\n", "surface = Surface.read_triangular('../tests/subjects/fabian/surf/lh.pial')\n", "len(surface.vertices)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
anteriorrightsuperior
0-93.136818-2.126251-8.335812
1-93.194458-2.696686-8.206024
2-93.369530-3.738874-8.548558
3-93.183983-4.594223-8.173017
4-93.190521-2.160212-8.865552
\n", "
" ], "text/plain": [ " anterior right superior\n", "0 -93.136818 -2.126251 -8.335812\n", "1 -93.194458 -2.696686 -8.206024\n", "2 -93.369530 -3.738874 -8.548558\n", "3 -93.183983 -4.594223 -8.173017\n", "4 -93.190521 -2.160212 -8.865552" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas\n", "\n", "vertex_frame = pandas.DataFrame(map(vars, surface.vertices))\n", "vertex_frame.head()" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
anteriorrightsuperior
count155622.000000155622.000000155622.000000
mean-20.509144-26.85614624.335409
std39.09262218.79625928.195845
min-93.548004-68.530327-39.114269
25%-53.572824-41.8776341.600599
50%-23.102324-26.91792724.000984
75%10.147226-9.77634347.299869
max70.0859687.29156086.737892
\n", "
" ], "text/plain": [ " anterior right superior\n", "count 155622.000000 155622.000000 155622.000000\n", "mean -20.509144 -26.856146 24.335409\n", "std 39.092622 18.796259 28.195845\n", "min -93.548004 -68.530327 -39.114269\n", "25% -53.572824 -41.877634 1.600599\n", "50% -23.102324 -26.917927 24.000984\n", "75% 10.147226 -9.776343 47.299869\n", "max 70.085968 7.291560 86.737892" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "vertex_frame.describe()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.7" } }, "nbformat": 4, "nbformat_minor": 2 }