FSL Programmer's Manual - libavwio(3l)


NAME

libavwio - a low-level library for accessing AVW (Analyse) files.

SYNOPSIS

#include <avwio.h>
cc -I /usr/local/fsl/include/avwio file.c -lavwio

DESCRIPTION

This library of routines allows the user to open, read, manipulate and write Analyse format 4D image files. The functions are mostly volume based to enable the programmer to deal with large data files in a convenient manner.

IMPORTANT NOTES

Limited support is provided to read & write non-native binaries, ie. the library can read little-endian files on big-endian machines and vise-versa. The following features should be noted:

  1. Endian-ness support works automatically so the programmer needn't change his/her source code to take advantage of it.
  2. One can read any combination of big/little-endian files in the same session. Just code as if it isn't an issue.
  3. Endian-ness is preserved on modification of a file.
  4. Natural byte ordering is used for any new file.

CONSTANTS

#define AVW_READ 0
#define AVW_WRITE 1

DATA TYPES

typedef struct
{
 
  FILE *imgfp;
  FILE *hdrfp;

  int mode, sameorder;

  struct dsr header;
} AVW;

The Analyse "file" format consists of two actual files: a header file, with the ".hdr" extension, and a 4D image data file, with the ".img" file extension. The AVW structure stores pointers to the open files hdrfp and imgfp along with the mode (either AVW_READ or AVW_WRITE) and the dsr header information. A pointer to one of these data structures should be passed to the functions in libavwio to get/set values in the open AVW "file".

Please do not try to access the file or dsr header pointers directly. If it can't be done using the functions provided then the library should be extended appropriately.


FUNCTIONS


SEE ALSO

libimage(3), The FSL Documentation

BUGS

No known bugs at present. All reports should be sent to the FSL help-desk.

Dave Flitney
FMRIB Centre

Copyright © 2000, University of Oxford