How to swap the Time and Slice values in an Analyze header.

Symptoms:

You have used imconvert to create an analyze file from a bshort, buchar or bfloat file. The Analyze file is treating each slice as a different time point

Why this might be needed:

The MGH file formats are only three dimensional. They include only two spatial dimensions (X and Y) and a time dimension. In many cases, a three dimensional (X, Y and Z) data set is misinterpreted as containing X, Y and t dimensions. When imconvert sees these data, it cannot distinguish t and Z dimensions (see file formats page for more detail on this limitation of MGH headers.)

What to do:

Type:
> TimeVolumeSwap filename.hdr

or just type:

> TimeVolumeSwap

and wait for the filename prompt

TimeVolumeSwap recognizes only Analyze headers. It over-writes the original header (but this is less destructive than you might think, as executing it a second time reverts the header to its original state.


Back to HowTo pages
This page is maintained by Mark Cohen [updated 11.25.01]