next up previous
Next: flipvol_lr() Up: Brain Volume I/O Handling Previous: alloc_volume()

permute_vol()  

Permute volume dimensions



Synopsis


int 
permute_vol(header *hdr, void** data, int *order)


Description
This function permutes indices of a volume. Use this if a scan has been recorded in the "wrong" way.

Returns ERROR if the order vector contains invalid entries (i.e. < 0 or >= n.o. dimensions)

Usage

This program swaps x and y indices of a volume.

  int order[3]={1,0,2};
  header *hdr;
  void *mydata;
  .
  .
  hdr = new_header();
  read_volume("myvol", hdr, &mydata);
  permute(hdr, &mydata, order);

Revision


1.0  4/4-98   Ulrik Kjems


Program listing






Ulrik Kjems
6/3/1998