跳转到主要内容

用于存储ECoG实验受试者皮层的NWB扩展

项目描述

ndx-ecog NWB:N 扩展

作者:Ben Dichter

有三个数据类型,SurfaceCorticalSurfacesECoGSubjectCorticalSurfaces 是一个组(类似于文件夹),用于将 Surface 对象放入其中。Surface 包含皮层区域的表面网格数据(顶点和三角形面)。ECoGSubjectSubject 的扩展,允许您将 CorticalSurfaces 对象添加到 /general/subject

使用方法

python

安装

pip install ndx_ecog

编写

import pynwb
from ndx_ecog import CorticalSurfaces, ECoGSubject

nwbfile = pynwb.NWBFile(...)

...

cortical_surfaces = CorticalSurfaces()
## loop me
    cortical_surfaces.create_surface(name=name, faces=faces, vertices=veritices)
##
nwbfile.subject = ECoGSubject(cortical_surfaces=cortical_surfaces)

您可以可选地附加受试者大脑的图片

from pynwb.base import Images
from pynwb.image import GrayscaleImage

subject.images = Images(name='subject images', images=[GrayscaleImage('image1', data=image_data)])

读取

import nwbext_ecog
from pynwb import NWBHDF5IO
io = NWBHDF5IO('path_to_file.nwb','r')
nwb = io.read()
nwb.subject.cortical_surfaces

MATLAB

安装

generateExtension('/path/to/ndx-ecog/spec/ndx-ecog.namespace.yaml');

编写

cortical_surfaces = types.ecog.CorticalSurfaces;

%%% loop me
    surf = types.ecog.Surface('faces', faces, 'vertices', vertices);
    cortical_surfaces.surface.set(surface_name, surf);
%%%

file.subject = types.ecog.ECoGSubject(name, cortical_surfaces);

项目细节


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分发

ndx-ecog-0.1.1.tar.gz (14.7 kB 查看哈希值)

上传时间:

构建分发

ndx_ecog-0.1.1-py2.py3-none-any.whl (6.1 kB 查看哈希值)

上传时间: Python 2 Python 3

由以下组织支持