[Insight-users] Help for "Image Type"

Luis Ibanez luis.ibanez@kitware.com
Mon, 09 Dec 2002 11:29:08 -0500


Hi Jason,

There are two ways of composing 3D images,
depending on what the image sources are.

Do you need to compose a 3D image from
a set of files containing 2D images ?
or are you computing 2D slices by
some method and need to pack them in
a single 3D.

A)
If you are in the first case. The simplest
solution is to put the 2D images in .raw
files.(That is, files containing only the
pixel data in binary format).

Then write a metaimage header file. This is
just a plain text file that provides
information like pixel spacing, dimensions etc.

A metaimage header can point to a set of
individual 2D files and load them as slices.

The easy way to create this header is to use
the demo-application: MetaImageImporter

this can be found in :

    Insight/Applications/MetaImageImporter

when you run it on a command line, it will
prompt you for the image information.

--

B)
If are on the second case: you need to compose
a set of 2D images that are already in memory,
then probably a piece of code combining a loop
and itk::ImageSliceIteratorWithIndex could be
the best approach.


Please let us know if you need further details,


  Thanks


   Luis

=============================================\

jason wrote:
>> Hi...
>> I am writting program for medical image.  I have a problem for 
>> compounded many 2D images into 3D image.
>> Can you give some suggestion? For example, to use many "image <float, 
>> 2>" to "image<float, 3>"
>> Never mind, my english is not good enough.
>