Last active
October 31, 2019 13:56
-
-
Save ofgulban/3ed5fd784eff32594bc04bc17cab4da4 to your computer and use it in GitHub Desktop.
Brainvoyager's fmr format to nifti conversion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % Convert FMR to NII | |
| % | |
| % Requires Neuroelf <http://neuroelf.net/>. | |
| clear all; | |
| % Set path with nii files | |
| PATH_OUT = '/patt/to/output_folder'; | |
| % Set fmr names | |
| PATH_FMR{1}=['/path/to/file1.fmr']; | |
| PATH_FMR{2}=['/path/to/file2.fmr']; | |
| %% Convert fmr to nii | |
| disp('Converting fmr files to nii...') | |
| for i=1:length(PATH_FMR); | |
| temp_fmr = xff(PATH_FMR{i}); | |
| % Output name parsing/creating | |
| [i_dir, i_name , i_ext] = fileparts(PATH_FMR{i}); | |
| i_ext = 'nii'; | |
| out_path = fullfile(PATH_OUT, [i_name,'.',i_ext]); | |
| temp_fmr.Write4DNifti(out_path); | |
| temp_fmr.ClearObject; | |
| disp([out_path ' created.']) | |
| end | |
| disp('Finished.') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment