[Insight-users] Reading series of images

Toon Huysmans denhuys at hotmail.com
Fri, 9 Apr 2004 15:11:34 +0200


Hello Luis,

    I am reading a mhd file, refering to slices in BMP format.

    I only suspect that the slices are read twice, I don`t any code that
acknowledges that.
    But when reading such a mhd file, using itk::ImageFileReader, the
file-name of each slice is output to the console.
    And since the series of slide-filenames is output twice, I suspect the
that the slices are read twice.


        typedef itk::ImageFileReader<ImageType> ReaderType;
        ReaderType::Pointer reader = ReaderType::New();
        const char *filename = "F:/thing.mhd";
        reader->SetFileName( filename );
        reader->Update();

Hope I am specific enough,
Thanks,

Toon.


----- Original Message ----- 
From: "Luis Ibanez" <luis.ibanez at kitware.com>
To: "Toon Huysmans" <denhuys at hotmail.com>
Cc: <insight-users at itk.org>
Sent: Friday, April 09, 2004 2:33 PM
Subject: Re: [Insight-users] Reading series of images


>
> Hi Toon,
>
>
> Could you please be more specific with your question ?
>
>
> By   "ImageReader", do you mean:
>
> A) the class itk::ImageFileReader   ?
>
>     or
>
> B) one of the examples in Insight/Examples/IO
>
>     or
>
> C) something else ?
>
>
>
> Also, what make you suspect that slices are being
> read twice ?  are you running this in a debugger ?
> and seeing twice the invokation of a particular function ?
> if so, what function do you see invoked twice ?
>
>
> Can you post a minimal code example where you
> observe such behavior ?
>
> What image fileformat where you reading when you
> noticed such effect  ?
>
>
>
>    Thanks,
>
>
>      Luis
>
>
> --------------------
> Toon Huysmans wrote:
>
> > Hi,
> >
> >     I`ve got q small question:  Why does ImageReader seem to read every
> > slice two times.  In a first pass, the images are read in slow, the
> > second pass is fater. any ideas?
> >
> > Toon.
>
>
>
>