Page 1 of 1

How does AimsFIleConvert support nifti files ?

Posted: Mon Feb 01, 2010 4:45 pm
by Melanie PELEGRINI
Hi all,

I would like to use AimsFileInfo in a pipeline of routines outside BrainVISA.

I would like to convert a Nifti file xxxx.nii to Analyze format xxxx.img/.hdr.

If I run
. "PathTo/brainvisa32/bin/"
PathTo/brainvisa32/bin/command-links/AimsFileConvert -i xxxx.nii -o xxxx.img
it works.

Now if I put PathTo/brainvisa32/bin/command-links/AimsFileConvert in a separate directory DIR, together with its dependencies (shared librairies found with 'ldd' command :,,,,,, and others that are system libraries)
and then I use
DIR/AimsFileConvert -i xxxx.nii -o xxxx.img
I get an error
./AimsFileConvert: xxxx.nii : invalid format (not handled)

So what am I missing and where does AimsFileConvert get the information about supporting nifti files ?

Thanks a lot for your help


Re: How does AimsFIleConvert support nifti files ?

Posted: Tue Feb 02, 2010 2:16 am
by riviere
Hi Mélanie,
If I understand well, you moved a part of the binary package to another place. That's OK but there are several environment variables to setup before everything runs well. That's what the script does. Normally if you run PathTo/brainvisa32/bin/AimsFileConvert instead of PathTo/brainvisa32/bin/command-links/AimsFileConvert, the script should be called and everything should be OK.
If you insist on setting the variables yourself, there are several of them:

Code: Select all


If some variables are not set correctly (BRAINVISA_SHARE, typically), the plugins list will not be found, or plugin libraries will not be loaded, and the nifti plugin will not be available. I guess it is what happens to you...

Otherwise, are you really really sure you need to use Analyze format ? It is strongly advised to avoid it because of its orientation ambiguities, this format is obsolete and has been dropped by all the communauty for very good reasons, and we might remove support for it one day just because this format is "too dangerous"...


Re: How does AimsFIleConvert support nifti files ?

Posted: Tue Feb 02, 2010 10:14 am
by Melanie PELEGRINI
It's just temporary, but I need Analyze format to run old programs :-( that will be adapted for nifti eventually.

Thanks for your reply !