[Insight-developers] Help with new IO class

Richard Beare richard.beare at gmail.com
Tue Apr 3 22:43:48 EDT 2007


Hi everyone,

I've verified that the image volume was stored using dimensions 256 x
512 x 256 using two independent viewing methods - the one Luis
suggested and an equivalent using another viewer. I can only assume
that the in house code (which I couldn't run) would not have worked on
that image.

I have discovered that there is a transposition flag hidden away in
the meta data, and following the available documentation seems to
produce the desired results.

Thanks for your help. Now I just need to figure out other meta data,
interleaving etc.....

On 4/4/07, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
> Hi Richard,
>
> Just to clarify...
>
>
> A)  In your new ITK reader, when you force the
>      image dimensions to be
>
> 256 in X
> 512 in Y
> 256 in ZThen the image is read correctly ?
>
> and
>
> B)  if you set the image dimensions as
>
> 512 in X
> 256 in Y
> 256 in Z then you observe an interleave effect ?
>
>
> and
>
> C) your in-house reader works fine by assuming that
>     the fastest changing direction (X) has 512 pixels ?
>
>
> Please let us know if (A), (B), and (C) are correct or not.
>
> ---
>
> Could you try writing a meta image header for the raster file ?
>
> From the parameters of the MetaImage header it will be easy
> to figure out what is the correct configuration of the image.
>
>  Note that you can use the application
>
>    InsightApplications/MetaImageImporter
>
> as a helper for creating the MetaImage header.
>
>
>
>    Please let us know what you find,
>
>
>         Thanks
>
>             Luis
>
>
> ---------------------------------------------------------------------------------------
>
> On 4/3/07, Richard Beare < richard.beare at gmail.com> wrote:
> >
> > Hi everyone,
> >
> > I'm writing an IO class to read Bruker MR images. A basic form is
> > working, but I'm having trouble with order of dimensions.
> >
> > Bruker has a text file that include dimension and other information.
> > In my test file the dimensions are list as 512 x 256 x 256. The image
> > data is stored in a single file in raster order.
> >
> > A non itk reader I have access to simply reads the data assuming that
> > the fastest changing dimension (x) is 512 elements long, the next
> > fastest (y) is 256 etc.
> >
> > I attempted to do the same, by using the  SetDimensions method in the
> > IO class. However this lead to results having classic signs of mixed
> > up dimension sizes (strange interleaving effects).
> >
> > If I hard code the dimensions to be 256 x 512 x 256, then things look OK.
> >
> > Is there an orientation setting that should control this? I'd like to
> > avoid hard coding a reordering if possible. I was wondering what the
> > correct approach would be....
> >
> > Thanks
> > _______________________________________________
> > Insight-developers mailing list
> > Insight-developers at itk.org
> > http://www.itk.org/mailman/listinfo/insight-developers
> >
>
>


More information about the Insight-developers mailing list