libfs
Header-only C++11 library for accessing FreeSurfer neuroimaging data
The libfs API documentation

Introduction

Welcome to the API documentation for libfs, a header-only C++11 library to read and write FreeSurfer neuroimaging data.

All relevant functions are in the file include/libfs.h and only a few utility functions are class members, so the best place to start is to open the documentation for libfs.h in the Files section above.

A note on the API doc examples

The examples in the doc strings of the libfs.h functions usually only show data preparation and the function call itself. Typically you will get a working program out of them by wrapping them into something like:

#include "libfs.h"
#include <string>
#include <iostream>
#include <vector>
// maybe more includes for some examples here.
int main(int argc, char** argv) {
// Demo code goes here
}

To see full demo programs and compilation instructions, check the examples/ directory in the GitHub repository linked below.

Logging with libfs

You can define the output produced by libfs from your application. To do so, #define one of the following debug levels in your application, before including 'libfs.h':

Things you should know about logging and controlling libfs output:

The libfs project website

The project page for libfs can be found at https://github.com/dfsp-spirit/libfs. It contains information on all documentation available for libfs.