Fivox  0.3.0
ITK library to sample events into regular volumes
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Macros Pages
Fivox Documentation

Introduction

Fivox (Field Voxelization) is a library to generate volumetric images of 3d scalar fields (Local Field Potential, spike densities, voltage sensitive dye), with loaders for the compartment, soma and spike reports generated by the Neuron and NEST simulators used in the Blue Brain Project. Fivox supports time animation.

Fivox can be retrieved by cloning the source code.

The voxelize command line tool can be used to generate volumes for ParaView or other volume rendering applications. When compiled with Livre, launch Livre with one of the URIs used by the voxelize command line tool as the volume parameter. The fivox data source will be loaded automatically and selected through one of the volume URI schemes.

To use the ImageSource programmatically, please refer to the fivox namespace documentation and voxelize command line tool.

3m_spikes_scaled.jpg
Fivox spike densities rendered in Livre
paraview.jpg
Using a Fivox volume in ParaView

Features

Fivox provides the following major features:

  • Converting compartment reports to volumetric LFP-like data
  • Converting spike reports densities to volumetric data
  • Converting compartment and surface area reports to volumetric data
  • Time and animation support

Installation

Build Fivox from source:

git clone https://github.com/BlueBrain/Fivox
mkdir Fivox/build
cd Fivox/build
cmake ..
make

Usage

The voxelize command line tool supports the following parameters:

( "help,h", "Show help message" )
( "version,v", "Show program name and version" )
( "volume", po::value< std::string >(),
"Volume URI with parameters in the form:\n"
"- Compartment reports:\n"
" fivox[compartments]://BlueConfig?report=string,target=string[ or #target]\n"
"- Soma reports:\n"
" fivoxsomas://BlueConfig?report=string,target=string[ or #target]\n"
"- Spike reports:\n"
" fivoxspikes://BlueConfig?duration=float,spikes=path,target=string[ or #target]\n"
"- Synapse densities:\n"
" fivoxsynapses://BlueConfig?target=string[ or #target]\n"
"- Voltage-sensitive dye reports:\n"
" fivoxvsd://BlueConfig?dyecurve=string,target=string[ or #target]\n"
"\n"
"Note: If target=string and #target parameters are given at the same time\n"
"target=string has the precedence over #target parameter. Giving the #target as\n"
"a parameter is deprecated\n"
"\n"
"Parameters for all types :\n"
"- BlueConfig: BlueConfig file path\n"
" (default: 'configs/BlueConfigVSD' for VSD reports,\n"
" BBPTestData otherwise)\n"
"- target: name of the BlueConfig target (default: CircuitTarget)\n"
"- magnitude: value multiplied to each sampled voxel value\n"
" (defaults: 0.1 for Compartments and Somas,\n"
" 1.5 / duration for Spikes\n"
" 1.0 for Synapses and VSD)\n"
"- functor: type of functor to sample the data into the voxels\n"
" (defaults: \"density\" for Synapses,\n"
" \"frequency\" for Spikes,\n"
" \"field\" for Compartments, Somas and VSD)\n"
"- resolution: number of voxels per micrometer (default: 1.0)\n"
"- maxBlockSize: maximum memory usage allowed for one block in bytes\n"
" (default: 64MB)\n"
"- maxError: maximum error allowed (default: 0.001). If the event's\n"
" contribution is less than the specified error, the event\n"
" is discarded. The units are not defined and depend on\n"
" the current data. This parameter is used only with the\n"
" field functor to compute the cutoff distance.\n"
"- showProgress: display progress bar for current voxelization step\n"
" (default: 0/off)\n"
"\n"
"Parameters for Compartments:\n"
"- report: name of the compartment report\n"
" (default: 'voltage'; 'allvoltage' if BlueConfig is BBPTestData)\n"
"- dt: timestep between requested frames in milliseconds\n"
" (default: report dt)\n"
"\n"
"Parameters for Somas:\n"
"- report: name of the soma report\n"
" (default: 'soma'; 'voltage' if BlueConfig is BBPTestData)\n"
"- dt: timestep between requested frames in milliseconds\n"
" (default: report dt)\n"
"\n"
"Parameters for Spikes:\n"
"- duration: time window in milliseconds to load spikes (default: 10)\n"
"- spikes: path to an alternate out.dat/out.spikes file\n"
" (default: SpikesPath specified in the BlueConfig)\n"
"\n"
"Parameters for VSD:\n"
"- report: name of the soma report\n"
" (default: 'soma'; 'voltage' if BlueConfig is BBPTestData)\n"
"- dyecurve: path to the dye curve file to apply, e.g. attenuation\n"
" (default: no file; attenuation of 1.0)\n"
)
( "datatype,d", po::value< std::string >()->default_value( "float" ),
"Type of the data in the output volume "
"[float (default), int, short, char]" )
( "size,s", po::value< size_t >()->default_value( size ),
"Size of the output volume" )
( "time,t", po::value< float >(),
"Timestamp to load in the report" )
( "times", po::value< fivox::Vector2f >(),
"Time range [start end) to load in the report" )
( "frame,f", po::value< unsigned >(),
"Frame to load in the report" )
( "frames", po::value< fivox::Vector2ui >(),
"Frame range [start end) to load in the report" )
( "output,o", po::value< std::string >()->default_value( outputFile ),
"Name of the output volume file (mhd and raw); contains frame number "
"if --frames or --times" )
( "projection,p", po::value< double >(), "Generate the corresponding "
"projected 2D image (only for VSD volumes), using the specified "
"value as the absorption + scattering coefficient (units per "
"micrometer) in the Beer-Lambert law. Must be a positive value." );

About

Fivox uses CMake to create a platform-specific build environment. The following platforms and build environments are tested:

  • Linux: Ubuntu 14.04, RHEL 6.6 (Makefile, x64)
  • Mac OS X 10.9

The API documentation can be found on bluebrain.github.io.