<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Looks to me from the code in <b>IO/vtkXMLDataParser.cxx</b> like you
should receive this event whenever UpdateProgress is called. From the
various read routines, UpdateProgress gets called at the beginning with
0, at the end with 1 and in between with some fraction between 0 and 1
each time through the loop. If your data size is small enough, it will
only go through the loop once and you'll just see a "1". If your data
is large enough that it gets read in chunks, you should see a
ProgressEvent for each chunk that gets read in.<br>
<br>
Set a breakpoint in your Execute method and trace back up the call
stack to the caller of UpdateProgress: maybe your data size is just
small and things are working as they should.<br>
<br>
Also: I'm looking at yesterday's CVS source code to answer this;
perhaps there was a different issue in 4.2 that I'm unaware of?<br>
<br>
<br>
Hope this helps,<br>
David<br>
<br>
<br>
Slobodan Miskovic wrote:
<blockquote cite="mid2c6fc88505041301193515366a@mail.gmail.com"
type="cite">
<pre wrap="">Hallo folks,
I'm having troubles geting progress update from vtkXMLImageDataReader.
I've defined an observer class as
class ProgressObserver : public vtkCommand {
public:
        static ProgressObserver* New() {
                return new ProgressObserver;
        }
        virtual void Execute(vtkObject* caller, unsigned long, void *callData) {
                std::cout << "!" << std::endl;
        }
};
and have it connected to the reader as
reader->AddObserver(vtkCommand::ProgressEvent, ProgressObserver::New());
but i only get one call of the execute method, conciding with the end
of file loading. Is xml reader supposed to dispatch progress events?
And if so, how may i get the current progress in the Execute method
(presumably some trickery with callData). This is happening on VTK4.2
Thanks in advance, Slobodan
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a>
</pre>
</blockquote>
</body>
</html>