Darren,
Thank you for showing the useful script.
I'm wondering how your script handles the coordinate system.
I have some niftii dataset. Some are right-handed, and others are left-handed.
As long as those are niftii, it shouldn't be much problems, but when
it comes to Analyze format, problems arise.
I'm looking for the function which converts all of the niftii files
either left- or right-handed coordinate system into specific
coordinate analyze format files. (All analyze files are right-handed
or left-handed.)
Best regards,
Kiyotaka
2010/11/10 Darren Gitelman <[log in to unmask]>:
> Try this function
> http://brainimaging.tiddlyspot.com/#nifti2ana
>
> --------------------
> Darren Gitelman, MD
> Sent from my mobile.
> Office Ph: (312) 908-8614
> Fax: (312) 908-5073
> On Nov 10, 2010, at 7:08 AM, Vanessa Sochat <[log in to unmask]> wrote:
>
> How about the BXH/XCEDE tools? They were developed by Syam Gadde here at
> Duke, and they are excellent for jumping around between image types.
>
> http://www-calit2.nbirn.net/tools/bxh_tools/index.shtm
>
> You can use bxhabsorb to fit the data with a bxh header, and then
> bxh2analyze to convert from nifti to analyze. There are a bunch of options
> that you can look at to check orientation as well!
>
> Best,
>
> Vanessa
>
> On Mon, Nov 8, 2010 at 2:19 PM, Matthew Brett <[log in to unmask]>
> wrote:
>>
>> Hi,
>>
>> > Our lab here has an in house software package that only reads analyze
>> > images. I'm trying to do some reorientation and registration in SPM5/8, but
>> > I need to then convert to analyze hdr/img pair and write out the image in
>> > the new orientation. I've tried a few programs, but they all also generate
>> > the *.mat file needed by older versions of SPM to store the orientation.
>> > What I really need is something that will take a nii format file and write
>> > out an analyze format file where the the image volume is actually physically
>> > written in the correct orientation.
>>
>> If the .mat file only encodes some axis flips or axis rearrangements,
>> then you could try our 'nibabel' python package [1]:
>>
>> easy_install nibabel
>> python
>> >>> import nibabel as nib
>> >>> img = nib.load('nifti_image.nii')
>> >>> better_img = nib.as_closest_canonical(img)
>> >>> nib.analyze.save(img, 'better_analyze_image.img')
>>
>> By the way - this will generate a 'neurological' orientation image
>> (first pixel is the right-most pixel).
>>
>> If there are rotations and translations so that the image does not
>> align down any reorganization of the axes, you'll have to reslice the
>> image to some canonical volume...
>>
>> Best,
>>
>> Matthew
>>
>> [1] http://nipy.sourceforge.net/nibabel/
>
>
>
> --
> Vanessa Villamia Sochat
> Laboratory of Neurogenetics
> Duke University, 2009
> (603) 321-0676
>
--
Kiyotaka Nemoto, M.D.
Department of Psychiatry
Graduate School of Comprehensive Human Sciences
University of Tsukuba
1-1-1Tennodai Tsukuba, Ibaraki 305-8575, Japan
E-mail: [log in to unmask]
|