[Insight-users] Capturing progress info while loading file

Luis Ibanez luis . ibanez at kitware . com
Wed, 19 Jun 2002 14:55:39 -0400


Hi Yann,

You are right, invoking the events from the
ImageIO class is not enough since the
visible object is the ImageFileReader or
the ImageFileWriter.

The solution seems to be to make the
ImageFileReader and ImageFileWriter
Observers of their own ImageIO objects.
and make them re-throw the events
comming from the ImageIO objects.

I'll add this to the code and let you
know when is ready.



   Luis


========================================

Yann Rouillard wrote:

> Hi Luis,
> 
> I CVS updated to get your modification but it doesn't seem to work.
> In fact the problem is that I use ImageFileReader and not MetaImageIO
> directly.
> So my observer registered with ImageFileReader doesn't get ProgressEvent
> from MetaImageIO.
> I tried to use GetImageIO() to get the correct ImageIO instance but it seems
> to be correctly set only during Update() (too late).
> I look at ImageFileReader and saw that m_imageIO is set in the
> GenerateOutputInformation() method but if I try to call this method manually
> before GetImageIO() it raises an exception later when I try to read the file
> later (with Update ()).
> 
> Is there a solution ?
> 
>    Cheers,
>         Yann
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
> 
>