Get Teem at SourceForge.net. Fast, secure and Free Open Source software downloads
teem / unrrdu

  unu shuffle

unu shuffle: Permute samples along one axis. Slices along one axis are
re-arranged as units according to the given permutation (or its inverse). The
permutation tells which old slice to put at each new position. For example,
the shuffle 0->1, 1->2, 2->0 would be "2 0 1". Obviously, if you have to
rearrange the many slices of a large dataset, you should probably store the
permutation in a plain text file and use it as a "response file".

Usage: unu shuffle [@file ...] -p <slc0 slc1 ...> [-inv] -a <axis> \
       [-i <nin>] [-o <nout>]

         @file ... = response file(s) containing command-line arguments
-p <slc0 slc1 ...> = new slice ordering (1 or more ints)
              -inv = use inverse of given permutation
         -a <axis> = axis to shuffle along (int)
          -i <nin> = input nrrd
         -o <nout> = output nrrd (string); default: "-"