Brain Innovation

support portal


NIfTI conversion plugin

Conversion between BrainVoyager and NIfTI file formats

NIfTI is a file format to save volumetric (f)MRI data and is the successor of Analyze 7.5. A NIfTI file consists of header and image data, saved in one *.nii file or a *.hdr and an *.img file (for more information, see and Please note that since BrainVoyager 20.6, it is possible to open and save some NIfTI/BIDS files directly in BrainVoyager. For importing an FSL atlas, please consult the User's Guide
For import of VMP files, best is to use NeuroElf (see option 4 below).
Note: please do not use the NIfTI plugin for medical applications!
For conversion of surface data (*.srf, *.mtc, *.smp, *.poi), please see the GIFTI plugin page:
conversion nifti brainvoyager volumetric data


Option 1: convert multiple files at a time and customize transformation parameters (nifticonverter plugin v1.1.0)

Pros: Several files - that require the same parameters - can be converted at once and the transformations can be customized to each particular orientation. Example batch and parameter files are available.
Cons: If not using the example parameter files, might require some knowledge about image transformations (here is some info). Please note that the plugin is still under construction, for example, import VMP does not work, other quirky behavior might occur; please definitely don't use in clinical settings or for TMS.
Manual: manual (27.11.15) Updated with export of VOIs in Talairach space to NIfTI. Document: exporting VOIs to NIfTI .
Save in \(My) Documents\BrainVoyager\Extensions\ (BrainVoyager 22+) or in older versions in \(My) Documents\BVExtensions\Plugins_64\: for BrainVoyager 21 on win 64 (26.08.19) on Mac OS X (25.09.19; fixed export VOIs), for BrainVoyager 20 on win 64 (redist: for Windows 7) (13.03.16) for BrainVoyager 20 on Mac OS X (02.11.17)
For BrainVoyager QX; save in \(My) Documents\BVQXExtensions\Plugins_64\ v1.1.0.010216 on mac 10.10 (01.02.16) for BrainVoyager QX 2.8.4 (redist) on win64 (14.03.16)  note: fixed import zeropadding for importing anatomical files; beta version, currently being tested; use for own risk.
Usage: For v1.1.0, one needs to load:
i. a 'batch file', which is a text file with the number of files, then for each file a file name including path and on the next line the target file extension (for example 'nii' or 'vmr'). 
ii. a parameter file, which tell the plugin which transformations to apply; in all cases, please check left/right after conversion.
Then click 'Start processing' to start the conversion.
Example batch files:
example batch file (for Mac): this file shows how to list the input images in a text file.
example batch file export VTC (for Windows): this file shows how to list the input images in a text file.
Please note that for "subvolumes", like VTC files, the source VMR needs to mentioned in the file as well.
Example parameter files:
All options: parameter file with all options: this file demonstrates which parameters can be set and how
import sagittal vmr: parameter file for "standard" oriented anatomical/structural file; added 17-11-15: an import anatomy parameter file for non-sagittal images (limited use: only first file in batch and only 'small' images; large image might be truncated); please check left-right afterwards.
import native func: parameter file for "native" functional file; note: change the 128s in the matrix by x- and y-dimensions of actual functional image; import native func2: import file that results in good coregistration with the anatomy (tested on CG example data).
export native fmr: parameter file for "native" functional file
export native vtc: parameter file for "native" vtc (this reorients properly (though still check L/R), but additional translation might be needed)
export vmr: parameter file for VMR
export VOI-TAL: (updated 17-11-15) parameter file for exporting a VOI file in Talairach space to NIfTI. Please first transform and export the standard anatomy (*_TAL.vmr) as described in Option 3. Please check left and right afterwards.
Screenshot of user interface:



Option 2: convert one file at a time and extra image functions (nifticonverter plugin v1.09)

Pros: Relatively straigthforward to use.
Cons: For each file format, only one transformation is used per file format, while several orientations are actually possible (sagittal, coronal, etc); hence not all files come out properly oriented. Please note that the plugin is still under construction, please don't use in clinical settings.
Manual: For v1.08 and higher: PDF
Installation: Save in /(My) Documents/BrainVoyager/Extensions/ or /(My) Documents/BVExtensions/Plugins_64/ dependent on the BrainVoyager version.
Import: select *.nii or *.hdr/*.img in 'From'. Click the 'Get NIfTI file' button to load the NIfTI file. Select the target file in the 'To' section (please note that for import to subvolumes (*.vtc, *.vmp), an anatomical file (*.vmr) needs to be open in BrainVoyager)(22-09-16: import VMP/VTC not available at the moment). Click 'Start processing'.
Export: Open the file in BrainVoyager. Start the converter. Select 'From' and 'To' formats. Click 'Start processing'.
Screenshot of user interface:



Option 3: via conversion Analyze 7.5 and BrainVoyager file formats in BVQX

Pros: Ease of use. For VMR, FMR, VMP and VTC formats.
Cons: No position information in header preserved.
For import of *.hdr/*.img NIfTI/Analyze files (no files with *.nii extension possible): open BrainVoyager > File > New Project > File Format: Analyze.
For export:
1. Transform the (VMR) file to NIfTI/Analyze orientation via 3D Volume Tools (Load .TRF, Apply .TRF)
2. Export the transformed VMR via File > Export to Analyze. 
Download: File to transform to NIfTI/Analyze orientation: TRF (zipped).
Screenshot of user interface:

transform and export VMR small

Option 4: via BVQXtools/NeuroElf and Matlab

Pros: NeuroElf ( is an amazing toolbox by Jochen Weber. Easy to use.
Cons: Requires Matlab.
Usage: Example code:
[f d] = uigetfile('*.nii');
vmr = importvmrfromanalyze([d f]);
For import of a 4D normalized functional file to MNI-VTC:
n = neuroelf;
[FileName,PathName] = uigetfile('*.nii','Please select the functional normalized 4D NIfTI file...'); 
vtc = n.importvtcfromanalyze(cellstr([PathName FileName]));
vtc.ReferenceSpace = 4; % MNI space 
[pathstr,name,ext] = fileparts([PathName FileName]);
vtc.SaveAs([pathstr name '.vtc']);
For import of one VMP file:
n = neuroelf;
[PathName FileName] = uigetfile(‘*.nii’)
vmp = n.importvmpfromspms([PathName FileName])
or several:
cd /folder/where/SPM/maps/live
vmp = importvmpfromspms(findfiles(pwd, 'spm*.img')) ;
Export FMR:
[FileName PathName] = uigetfile('*.fmr')
fmr = xff([PathName FileName])
fmr.ExportNifti([PathName 'fmr.nii'], true); 

Export VMR in native space:

[FileName PathName] = uigetfile('*.vmr')
vmr = xff([PathName FileName])
vmr.ExportNifti([PathName 'vmr.nii'], true);

To export a VTC and VMR, both in Talairach space:

[FileName PathName] = uigetfile('*.vmr')
vmr = xff([PathName FileName])
[pathstr,name,ext] = fileparts([PathName FileName]);
vmr.ExportNifti([PathName name '.nii'], true);

[FileName PathName] = uigetfile('*.vtc')
vtc = xff([PathName FileName])
[pathstr,name,ext] = fileparts([PathName FileName]);
vtc.ExportNifti([PathName name '.nii'], true);
Experimental script to import NIfTI ROIs to BrainVoyager VOIs.
You are here: HomeBrainVoyagerAvailable ToolsAvailable Plugins ≫ NIfTI conversion plugin