Skip to content

Instantly share code, notes, and snippets.

@ofgulban
Last active December 10, 2016 10:09
Show Gist options
  • Save ofgulban/42c38f6e6a05d65486ff1cbe5fd2a06d to your computer and use it in GitHub Desktop.
Save ofgulban/42c38f6e6a05d65486ff1cbe5fd2a06d to your computer and use it in GitHub Desktop.
Convert .v16 data to nifti using Neuroelf.
% Convert VMR files with uint16 precision (.v16) using neuroelf.
%
% v16 files are better than vmr files for nifti conversion because
% because the intensity values are not limited to the small range of
% 0 to 255 integers.
%
% http://neuroelf.net/
[fileName, pathName] = uigetfile('.v16');
vmr = xff(fullfile(pathName, fileName));
outDir = uigetdir();
vmr.ExportNifti(fullfile(outDir, [fileName(1:end-4),'.nii']) );
disp('Done.')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment