[Insight-developers] Question about ImageIO and re-ordering dimensions

Kent Williams kent@mail.psychiatry.uiowa.edu
Fri, 31 Jan 2003 17:13:47 -0600


Hi!

I'm in charge of getting the Mayo-Analyze file reader/writer fully functi=
onal,=20
and I had a question about ImageIO internals.=20

One of our requirements is that once loaded into ITK, the Analyze data be=
 in
Coronal scan order -- i.e. vertical brain slices, from back/posterior to=20
front/anterior.  This is easy enough for the case where the scan volume i=
s a=20
cube, but the images are more likely to be rectangular prism.

The existing Analyze reader gets the dimensions from the Analyze header i=
n the=20
ReadInformation method.  Then later, the AnalyzeIO::Read method reads in =
the=20
pixel data from the image file.

I guess my question is this: After the image data is read in, can I chang=
e the=20
dimensions of the image? In other words, let ImageIOBase figure out the i=
mage=20
size and strides of the old configuration, then change the dimensions,=20
re-compute the strides, and then re-order the image buffer.? Or is there =
some
really elegant way to do this in ITK that I've not yet found?

Question 2 -- I'd like to check in a test for the analyze file IO, but I'=
ll=20
need to check in a pair of Analyze-format data files.  Where in the testi=
ng=20
tree would be the logical place to park them, and when the tests are run,=
 how=20
would my test find its data files?

thanks!