Dear BrainVISA developers
are there plans to support the NIFTI-1 format ?
Or are there workarounds for using data sets generated by SPM5?
All the best
Ekkehard
NIFTI
NIFTI
Ekkehard Kuestermann, PhD
Universitaet Bremen
c/o FB2, AG Leibfritz
Postfach 33 04 40
D-28334 Bremen
Tel: +49 (0)421 - 218 -2919
Email: ek@tomo.uni-bremen.de
Universitaet Bremen
c/o FB2, AG Leibfritz
Postfach 33 04 40
D-28334 Bremen
Tel: +49 (0)421 - 218 -2919
Email: ek@tomo.uni-bremen.de
- Jean-Francois Mangin
- Posts: 337
- Joined: Mon Mar 01, 2004 10:24 am
- Location: Neurospin, CEA, France
- Contact:
- Yann Cointepas
- Posts: 316
- Joined: Tue Jan 20, 2004 2:56 pm
- Location: Neurospin, Saint Aubin, France
- Contact:
As Jean-François said, the current version does not recognize this format. However, if you have a converter program between NIFTI and one of the formats reconized by BrainVISA, it is possible to write a converter process that will be called automatically whenever a NIFTI image is used with a non NIFTY aware process.
Hi all,
Since I also need recently my SPM5 results (spmT images) written in NIFTI format to be readable as ANALYZE format in Anatomist. As a converter, I propose to use a combine code of both SPM versions. Read your NIFTI mage with SPM5 and write the volume in a new ANALYZE file with spm99 (or SPM2) routines. For handiness put the code in a toolbox directory.
Olivier
Since I also need recently my SPM5 results (spmT images) written in NIFTI format to be readable as ANALYZE format in Anatomist. As a converter, I propose to use a combine code of both SPM versions. Read your NIFTI mage with SPM5 and write the volume in a new ANALYZE file with spm99 (or SPM2) routines. For handiness put the code in a toolbox directory.
Olivier
Code: Select all
function V=ToAnalyze(P)
% Convert your Nifti spmT images in Analyze format for compatibility with Anatomist (or others)
% P is your nifti (spmT or other) image (a matrix of filenames)
%
% Olivier Joly - PhD student KUL - Leuven, Belgium - 09/11/2007
if nargin<1
[P,sts] = spm_select([1 Inf],'image','Select your nifti images...');
end
for i=1:size(P,1)
V=spm_vol(P(i,:));
[Y,XYZ]=spm_read_vols(V);
Vout.fname=[V.fname(1:end-4) '_ANLYZE.img']; % you can change the default name...
Vout.mat=V.mat;
Vout.dim=V.dim;
Vout.dim(4)=16;
Vout.pinfo=V.pinfo;
Vout.descrip=V.descrip;
V = spm_write_vol99(Vout,Y); %% spm_create_image99, spm_write_plane99,spm_type99,spm_hwrite99 are the SPM99 functions called by spm_write_vol99.
end
- Yann Cointepas
- Posts: 316
- Joined: Tue Jan 20, 2004 2:56 pm
- Location: Neurospin, Saint Aubin, France
- Contact: