Re: 3dinfo nz extraction


[ Follow Ups ] [ Post Followup ] [ AFNI Message Board ] [ Search ]

Posted by bob cox on November 14, 2002 at 11:05:58:

In Reply to: 3dinfo nz extraction posted by Andrea Rebmann on November 14, 2002 at 10:28:29:

What you want can be done with the 3dAttribute program. For example:


% 3dAttribute DATASET_DIMENSIONS fred+orig
256 256 124 0 0

The output line is the 3 values for nx, ny, and nz (the extra 2 zeros are leftovers from the early days of AFNI, when I thought I might support up to 5D datasets). If you want to use nz in a script for example, you could do something like

foreach dset ( *+orig.HEAD )
set ddd = ( `3dAttribute DATASET_DIMENSIONS $dset` )
set nz = $ddd[3]
... do something with $nz ...
end

This, of course, is csh syntax - if you prefer bash or ksh, you'll have to make the appropriate variations.

For a list of all the attributes you're likely to find in a .HEAD file, see file README.attributes.

bob cox


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ AFNI Message Board ] [ Search ]