{
"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",
" right | \n",
" anterior | \n",
" superior | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" -2.126251 | \n",
" -93.136818 | \n",
" -8.335812 | \n",
"
\n",
" \n",
" 1 | \n",
" -2.696686 | \n",
" -93.194458 | \n",
" -8.206024 | \n",
"
\n",
" \n",
" 2 | \n",
" -3.738874 | \n",
" -93.369530 | \n",
" -8.548558 | \n",
"
\n",
" \n",
" 3 | \n",
" -4.594223 | \n",
" -93.183983 | \n",
" -8.173017 | \n",
"
\n",
" \n",
" 4 | \n",
" -2.160212 | \n",
" -93.190521 | \n",
" -8.865552 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" right anterior superior\n",
"0 -2.126251 -93.136818 -8.335812\n",
"1 -2.696686 -93.194458 -8.206024\n",
"2 -3.738874 -93.369530 -8.548558\n",
"3 -4.594223 -93.183983 -8.173017\n",
"4 -2.160212 -93.190521 -8.865552"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas\n",
"\n",
"vertex_frame = pandas.DataFrame(surface.vertices)\n",
"vertex_frame.head()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" right | \n",
" anterior | \n",
" superior | \n",
"
\n",
" \n",
" \n",
" \n",
" count | \n",
" 155622.000000 | \n",
" 155622.000000 | \n",
" 155622.000000 | \n",
"
\n",
" \n",
" mean | \n",
" -26.856146 | \n",
" -20.509144 | \n",
" 24.335409 | \n",
"
\n",
" \n",
" std | \n",
" 18.796259 | \n",
" 39.092622 | \n",
" 28.195845 | \n",
"
\n",
" \n",
" min | \n",
" -68.530327 | \n",
" -93.548004 | \n",
" -39.114269 | \n",
"
\n",
" \n",
" 25% | \n",
" -41.877634 | \n",
" -53.572824 | \n",
" 1.600599 | \n",
"
\n",
" \n",
" 50% | \n",
" -26.917927 | \n",
" -23.102324 | \n",
" 24.000984 | \n",
"
\n",
" \n",
" 75% | \n",
" -9.776343 | \n",
" 10.147226 | \n",
" 47.299869 | \n",
"
\n",
" \n",
" max | \n",
" 7.291560 | \n",
" 70.085968 | \n",
" 86.737892 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" right anterior superior\n",
"count 155622.000000 155622.000000 155622.000000\n",
"mean -26.856146 -20.509144 24.335409\n",
"std 18.796259 39.092622 28.195845\n",
"min -68.530327 -93.548004 -39.114269\n",
"25% -41.877634 -53.572824 1.600599\n",
"50% -26.917927 -23.102324 24.000984\n",
"75% -9.776343 10.147226 47.299869\n",
"max 7.291560 70.085968 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
}