[Insight-users] file reader

Luis Ibanez luis.ibanez@kitware.com
Mon, 13 Jan 2003 10:03:22 -0500


Hi Gwenael,


Did you call "Update()" on the reader ?

The output of filters is not valid until
an Update() call has been issued on them.
Please make sure that you call "Update()"
before calling "GetOutput()" on a reader.

You will find many examples of Read/Write
operations in the Insight/Examples directory.

In particular on the directories:

    Examples/Filtering
    Examples/IO


You may also want to take a look at the
SoftwareGuide.pdf document:
http://public.kitware.com/Insight/Web/HTML/SoftwareGuide.pdf

In particular the chapters:

- "Filtering"
- "Reading and Writting Images"


Please let us know if you have further questions,


   Thanks


     Luis


------------------------------------

Gwenaël Guillard wrote:

> Hi,
> 
> I try to use a file reader. I wrote, as in the GaussianFilter example
> 
>        VolumeReaderType::Pointer Reader = VolumeReaderType::New();
>        itk::MetaImageIO::Pointer metaImageIO = itk::MetaImageIO::New();
>        Reader->SetImageIO( metaImageIO );
>        Reader->SetFileName( filename );
> 
> But when I want to get
> Reader->GetOutput()->GetLargestPossibleRegion()->GetSize(), for example,
> it gives me 0,0,0, which is not
> the dimensions of my data. These data are .rwa and I use a mhd file. I
> use the mhd file with the GaussianFilter example and it was
> ok.
> 
> Thank you,
> 
> Gwenael
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
> 
>