{"id":18091278,"url":"https://github.com/dfsp-spirit/neuro","last_synced_at":"2026-06-09T09:31:08.929Z","repository":{"id":171122793,"uuid":"647429809","full_name":"dfsp-spirit/neuro","owner":"dfsp-spirit","description":"Go module for reading and writing structural neuroimaging file formats. Supports FreeSurfer MGH, MGZ, and related formats.","archived":false,"fork":false,"pushed_at":"2024-04-23T16:00:06.000Z","size":8412,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-18T22:07:25.749Z","etag":null,"topics":["biomedical","brain","fileformats","freesurfer","go","golang","mri","mri-images","neuroimaging","neuroscience"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dfsp-spirit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-30T19:08:52.000Z","updated_at":"2024-07-24T00:57:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"b8660779-da94-448f-8354-823add426080","html_url":"https://github.com/dfsp-spirit/neuro","commit_stats":null,"previous_names":["dfsp-spirit/neurogo","dfsp-spirit/neuro"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/dfsp-spirit/neuro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfsp-spirit%2Fneuro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfsp-spirit%2Fneuro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfsp-spirit%2Fneuro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfsp-spirit%2Fneuro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfsp-spirit","download_url":"https://codeload.github.com/dfsp-spirit/neuro/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfsp-spirit%2Fneuro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34101065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["biomedical","brain","fileformats","freesurfer","go","golang","mri","mri-images","neuroimaging","neuroscience"],"created_at":"2024-10-31T18:11:14.409Z","updated_at":"2026-06-09T09:31:08.908Z","avatar_url":"https://github.com/dfsp-spirit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# neuro\nGo module for reading and writing structural neuroimaging file formats. Supports FreeSurfer MGH, MGZ, and related formats.\n\n\n\u003c!-- badges: start --\u003e\n[![Main branch on Github Actions](https://github.com/dfsp-spirit/neuro/actions/workflows/unittests.yml/badge.svg?branch=main)](https://github.com/dfsp-spirit/neuro/actions/workflows/unittests.yml)\n[![GoDoc](https://godoc.org/github.com/dfsp-spirit/neuro?status.svg)](https://godoc.org/github.com/dfsp-spirit/neuro) [![license](https://img.shields.io/github/license/dfsp-spirit/neuro.svg)](https://github.com/dfsp-spirit/neuro/blob/main/LICENSE)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8126957.svg)](https://doi.org/10.5281/zenodo.8126957)\n\u003c!-- badges: end --\u003e\n\n\n## About\n\nThis repo contains a very early version of a [Go](https://go.dev/) module for reading structural neuroimaging file formats. Currently supported formats include:\n\n* [FreeSurfer](https://freesurfer.net) brain surface format: a triangular mesh file format. Used for recon-all output files like `\u003csubject\u003e/surf/lh.white`.\n    - Read file format (function `ReadFsSurface`) into `Mesh` data structure.\n    - Export `Mesh` to PLY, STL, OBJ formats.\n    - Computation of basic `Mesh` properties (vertex and face count, bounding box, average edge length, total surface area, ...).\n* FreeSurfer curv format: stores per-vertex data (also known as a brain overlay), e.g., cortical thickness at each vertex of the brain mesh. Typically used for native space data for a single subject, for recon-all output files like `\u003csubject\u003e/surf/lh.thickness`.\n    - Read file format (function `ReadFsCurv`)\n    - Write file format (function `WriteFsCurv`)\n    - Export data to JSON format.\n* FreeSurfer MGH and MGZ formats: store 3-dimensional or 4-dimensional (subject/time dimension) magnetic resonance imaging (MRI) scans of the human brain (e.g., `\u003csubject\u003e/mri/brain.mgz`). Can also be used to store per-vertex data, including multi-subject data on a common brain template like fsaverage (e.g., files like `\u003csubject\u003e/surf/lh.thickness.fwhm5.fsaverage.mgh`). The MGZ format is just gzip-compressed MGH format.\n    - Read MGH format (function `ReadFsMgh`)\n    - Read MGZ format (function `ReadFsMgh`), without the need to manually decompress first. The function handles both MGH and MGZ.\n    - Full header information is available, so the image orientation can be reconstructed from the RAS information.\n* FreeSurfer label format: these files store labels, i.e., extra information for a subset of the vertices of a mesh or the voxels of a volume. Sometimes per-vertex or per-voxel data is stored in the labels data field, but in other case the relevant information is simply whether or not a certain element (voxel, vertex) is part of the label. Used for recon-all output files like `\u003csubject\u003e/label/lh.cortex.label`.\n    - Read ASCII label format (function `ReadFsLabel`)\n    - See also the related utility function `VertexIsPartOfLabel`\n\n![Vis](./lhwhite.jpg?raw=true \"Visualization of the demo brain mesh.\")\n\n## Usage\n\n### Installation\n\n```shell\ngo get github.com/dfsp-spirit/neuro\n```\n\n### Full Documentation including usage examples for functions\n\nThe full documentation can be found on the central go documentation page at [pkg.go.dev](https://pkg.go.dev/github.com/dfsp-spirit/neuro#section-documentation).\n\nIt includes the full API documentation and usage examples for the functions.\n\n\n### Complete demo applications\n\nDemo applications that use `neuro` are available in the [cmd/](./cmd/) directory:\n\n* A command line app that reads a FreeSurfer mesh and prints some mesh information, like total surface area, average edgle length, etc: [example_surface.go](./cmd/example_surface/example_surface.go)\n* A command line app that reads per-vertex cortical thickness data from a FreeSurfer curv file and exports it to a JSON file: [example_curv.go](./cmd/example_curv/example_curv.go)\n* A command line app that reads a three-dimensional human brain scan (MRI image) from a FreeSurfer MGH file and prints some header data and the value of a voxel: [example_mgh.go](./cmd/example_mgh/example_mgh.go)\n* A command line app that reads a label from a FreeSurfer surface label file and optionally exports the label data to JSON format: [example_label.go](./cmd/example_label/example_label.go)\n\n\n## Developer information\n\nPlease see the [Developer information](./README_DEV.md) if you want to compile and run the demo apps, unit tests, and similar things.\n\n## Author, License and Getting Help\n\nThe `neuro` module for Go was written by [Tim Schäfer](https://ts.rcmd.org).\n\nIt is free software, published under the very permissive [MIT license](./LICENSE).\n\nNote that this library is **not** a part of FreeSurfer, and it is **in no way** endorsed by the FreeSurfer developers. Please do not contact them regarding this library, especially not for support. [Open an issue](https://github.com/dfsp-spirit/neuro/issues) in this repo instead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfsp-spirit%2Fneuro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfsp-spirit%2Fneuro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfsp-spirit%2Fneuro/lists"}