Hi Niels,
> Is there a simple possibility (e.g. avwtools) to get the actual voxel value
> of a specific voxel (x/y/z) in command line / shell?
A slightly odd way of doing this, but one which I've found useful, is
to use avwmeants on single volume (i.e. 3D, not 4D) images, e.g.
# echo to screen value of voxel 30,40,50
avwmeants -i $FSLDIR/etc/standard/avg152T1 -c 30 40 50
# save to file value of voxel 30,40,50
avwmeants -i $FSLDIR/etc/standard/avg152T1 -c 30 40 50 -o result.txt
Note voxel indexing in FSL is zero-based, and also that the -usemm
flag uses *scaled* but not true NIfTI world-space coordinates, i.e.
scaled_coords = voxel_coords * voxel_sizes
If you do have all your images in a 4D volume, then I think with the
--showall flag and a bit of shell/perl/whatever scripting you could
fairly easily do what you want.
HTH,
Ged
P.S. There is some very useful stuff on scripting in the FSL course:
http://www.fmrib.ox.ac.uk/fslcourse/lectures/scripting/index.html
|