Of course, that will generate ANALYZE files and not NIfTI1 files.
We currently assume that .hdr/.img pairs are ANALYZE files when
reading in. This is a quick shell script to convert .hdr/.img files
to a single .nii file:
head -c 4 /dev/zero > 4bytes
cat f.hdr 4bytes f.img > f.nii
As far as writing them out, we have no intention of writing the
two-file format out. I believe the nifti_tool will do that conversion,
though.
rich
Dianne Patterson wrote:
> Hope this helps:
>
> In afni 3dAFNItoNIFTI will make nifti files from a brik and head.
> 3dAFNItoANALYZE will make img and hdr files from the BRIK and HEAD.
> Afni can read/display img and hdr files (though I think its capability
> to manipulate them is limited)
>
> -Dianne
>
> On 9/22/05, *John Ashburner* <[log in to unmask]
> <mailto:[log in to unmask]>> wrote:
>
> Dear Stephan,
> I'm afraid that there is no option to do this, although the NIfTI
> utilities
> within SPM would allow it to be done. My choice of using the dual
> file
> system was based on the FIL having an automated backup
> system. Having a
> separate .hdr and .img would mean that only the .hdr files would
> be backed up
> after tweeks are made to the headers (e.g. after realignment), which I
> figured would save us a lot of tape.
>
> I also chose to not work directly with gzipped data - mostly
> because of
> lazyness. The .gz files would also make a number of routines
> slower. For
> example, if you just want to read a single voxel in a file, then
> all the data
> before that voxel would need to be uncompressed.
>
> The AFNI developers are part of the Data Format Working Group who
> developed
> NIfTI, so I'm surprised that AFNI doesn't deal with the .hdr+.img
> format.
>
> Best regards,
> -John
>
> > Is there an option in SPM5b (or the upcoming SPM5) to output to the
> > single-file (.nii) NIfTI-1 format?
> >
> > I can output to the dual-file (.hdr & .img) format but I would
> really
> > like to interchange with AFNI, which needs the single-file .nii
> > or .nii.gz format. Concatenating the SPM5b dual-files using the FSL
> > tools (avwmerge) resulted in an error.
>
>
>
>
> --
> Dianne Patterson, Ph.D.
> Cognition and NeuroImaging labs
> University of Arizona
> 626-4571 (Office)
--
\ Rich Hammett http://afni.nimh.nih.gov
/ [log in to unmask] sun dogs fire on the horizon
\ meteor rain stars across the night
/ this moment may be brief
\ but it can be so bright
|