[Paraview] RequestData Being Called Multiple Times [PV3.1.0]

Mike Jackson imikejackson at gmail.com
Tue Jul 17 13:10:56 EDT 2007


Nope:

Here is what I have for my RequestData Method:
int vtkH5PhaseFieldReader::RequestData( vtkInformation* vtkNotUsed 
(request),
                     vtkInformationVector** vtkNotUsed(inputVector),
                     vtkInformationVector* outputVector )
{

   std::cout << "\n--------------------\nEntering RequestData method"  
<< std::endl;
   if (NULL == this->FileName) {
     std::cout << "FileName must be specified" << std::endl;
     vtkDebugMacro( << "FileName must be specified");
     return 0;
   }

   vtkInformation* outInfo = outputVector->GetInformationObject(0);
   vtkImageData *output = vtkImageData::SafeDownCast(outInfo->Get 
(vtkDataObject::DATA_OBJECT()));
   std::cout << "Modified Time: " << this->GetMTime() << std::endl;
#if 0
... Whole lotta stuff commented out
#endif
   std::cout << "{end} Modified Time: " << this->GetMTime() <<  
std::endl;
   std::cout << "---Done with RequestData Method --------" << std::endl;
   return 1;
}

This returns the following to the console when I open one of my files:

--------------------
Entering RequestData method
Modified Time: 51294
{end} Modified Time: 51294
---Done with RequestData Method --------

--------------------
Entering RequestData method
Modified Time: 51294
{end} Modified Time: 51294
---Done with RequestData Method --------

--------------------
Entering RequestData method
Modified Time: 51294
{end} Modified Time: 51294
---Done with RequestData Method --------

--------------------
Entering RequestData method
Modified Time: 51294
{end} Modified Time: 51294
---Done with RequestData Method --------

--------------------
Entering RequestData method
Modified Time: 51294
{end} Modified Time: 51294
---Done with RequestData Method --------

It is amusing to turn ON Debug in my class as there seems to be  
things getting set between the calls.. not sure if this is important  
or not. It would seem that the time never gets changed though.

  Should I be using vtkImageAlgorithm for a Reader? Or is there  
something better/more up to date? We were specifically targetting PV  
3.x due to the multiple render window capability.

-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services


On Jul 17, 2007, at 12:58 PM, Moreland, Kenneth wrote:

> Another thought.  Are you calling Modified (either directly or
> indirectly) in RequestData?  If the modified flag gets called, VTK  
> will
> assume that the data is out of date and run RequestData again whenever
> possible.  Check the value of the MTime ivar at the beginning and the
> end of RequestData.  It should be the same.
>
> -Ken
>
>> -----Original Message-----
>> From: paraview-bounces+kmorel=sandia.gov at paraview.org
> [mailto:paraview-
>> bounces+kmorel=sandia.gov at paraview.org] On Behalf Of Mike Jackson
>> Sent: Tuesday, July 17, 2007 10:45 AM
>> To: eschenbe at psc.edu
>> Cc: ParaView
>> Subject: Re: [Paraview] RequestData Being Called Multiple Times
> [PV3.1.0]
>>
>> I finally got a debugger working and setting a breakpoint at the top
>> of RequestData is interesting to say the least. The stack is anywhere
>> from 69 to 72 deep at that point. Copying the stack from each time
>> the break point is hit and pasting into text files, the running a
>> diff against two of the files shows the the differences are about the
>> 39 to 42 depth. All this is way beyond me at this point. I can send
>> the stack traces if anyone wants to look through them.. ;-)
>>
>> 	Maybe I will try and compile this against 2.6.x and see if the
>> problem persists. I have written another reader that inherits from
>> PolyDataAlgorithm and I don't have this sort of trouble. I am sure it
>> is something stupid that I am doing. I am looking at the ImageReader2
>> class to get an idea of what I _should_ be doing at this point.
>>
>>
>> --
>> Mike Jackson   Senior Research Engineer
>> Innovative Management & Technology Services
>>
>>
>> On Jul 17, 2007, at 12:21 PM, Kent Eschenberg wrote:
>>
>>> Mike Jackson wrote:
>>>> That does not seem to be it.. Although good idea. Any other
>>> thoughts?
>>>
>>>> On Jul 17, 2007, at 11:59 AM, Kent Eschenberg wrote:
>>>>> I've seen that when RequestData returns a value that signals an
>>> error.
>>>
>>> Only a crude shot in the dark: set a breakpoint at the start of
>>> RequestData and see if the traceback suggests why the call was
>>> made. I've written several readers for 2.6.1 and haven't seen the
>>> problem you report except when the reader's return value indicated
>>> an error.
>>>
>>> Kent
>>> Pittsburgh Supercomputing Center
>>
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>
>



More information about the ParaView mailing list