[Paraview] Executive Not calling RequestData

Dean, Kevin kevin.dean at decisionsciencescorp.com
Tue Jun 30 19:36:03 EDT 2015


Well, after moving the writer to my RequestData function, I found that the
output is not properly copying the multi-block dataset for some reason.  I
have to try and figure that out...

Kevin E. Dean

On Tue, Jun 30, 2015 at 4:22 PM, Dean, Kevin <
kevin.dean at decisionsciencescorp.com> wrote:

> So I got a little further. Instead I used a multi block data set to load
> my polydata(s). When i update my pipeline, all the information gets
> transferred to ParaView except for the block data. I set up a writer that
> records the data, and that information is exactly the same as the streaming
> data (but it can actually render the blocks). So, I guess you could say I
> am perplexed, ha. Do you have any suggestions?
>
> Thanks Man!
>
> Kevin E. Dean
>
> here's the snippet:
>
> void MultiBlockDataSetDDSReader::UpdatePipeline(vtkMultiBlockDataSet* mb)
> {
>     printf("%s\n", __PRETTY_FUNCTION__);
>
>   MultiBlockDataSetDDSReader::UpdateInformation();
>   vtkStreamingDemandDrivenPipeline* executive =
> vtkStreamingDemandDrivenPipeline::SafeDownCast(MultiBlockDataSetDDSReader::GetExecutive());
>
>   this->multi_block = mb;
>
>   for (int i = 0; i < this->multi_block->GetNumberOfBlocks(); i++)
>   {
>     executive->SetUpdateExtent(0, i,
> this->multi_block->GetNumberOfBlocks(), 0);
>     MultiBlockDataSetDDSReader::Update();
>   }
> }
>
> and my request data:
>
> /*----------------------------------------------------------------------------*/
> int MultiBlockDataSetDDSReader::RequestData(
>   vtkInformation *vtkNotUsed(request),
>   vtkInformationVector **inputVector,
>   vtkInformationVector *outputVector)
> {
>     printf("%s\n", __PRETTY_FUNCTION__);
>   vtkInformation* outInfo = outputVector->GetInformationObject(0);
>   vtkMultiBlockDataSet *output =
> vtkMultiBlockDataSet::GetData(outputVector);
>
>   if (this->multi_block != NULL)
>   {
>     output->ShallowCopy(this->multi_block);
>
>     vtkStreamingDemandDrivenPipeline::CONTINUE_EXECUTING();
>   }
>
>   return 1;
> }
>
> On Fri, Jun 26, 2015 at 9:30 AM, Dean, Kevin <
> kevin.dean at decisionsciencescorp.com> wrote:
>
>> Ok, so I looked through this yesterday and tried implementing some of the
>> code. I now have the poly data information (# of cells, # of points, and
>> Bounds updating in ParaView) However, for poly data objects to be rendered
>> (and their data arrays to be copied to the output), is the best way to set
>> the update extents by:
>>
>> executive->SetUpdateExtent( vtkInformation *, int piece, int numPieces,
>> int ghostLevel );
>>
>> I'm not that familiar with updating unstructured datasets. Image data is
>> simple because the extents are based off the size of the image. Also, for
>> understanding the description of "pieces", since they are subsets of
>> unstructured datasets, does a piece correspond to individual cells or other
>> information held within the poly data? And just one more question, is there
>> a good place to find an explanation of what is / how to set up a PRODUCER,
>> because I read that the producer determines what a piece means...
>>
>> Thanks for the help!
>>
>> Kevin
>>
>> On Thu, Jun 25, 2015 at 6:42 AM, Utkarsh Ayachit <
>> utkarsh.ayachit at kitware.com> wrote:
>>
>>> RequestData doesn't get called unless the pipeline determines that
>>> something has changed. This is at core of VTK's demand driven execution
>>> pipeline. You may want to checkout Berk's blog (
>>> http://www.kitware.com/blog/home/post/831) about how you can use
>>> `CONTINUE_EXECUTING` key for "streaming".
>>>
>>> Utkarsh
>>>
>>> On Wed, Jun 24, 2015 at 2:32 PM Dean, Kevin <
>>> kevin.dean at decisionsciencescorp.com> wrote:
>>>
>>>> I was wondering if anyone has run into this problem before. I am
>>>> streaming vtkPolyData objects into ParaView, but for some reason (after my
>>>> UpdatePipeline function is called), the executive does not call RequestData
>>>> upon an Update command. Could there be any reasons for this?
>>>>
>>>> Here is my snippet:
>>>>
>>>> *void* *VTKPolyDataObjectsDDSReader::UpdateMyPipeline*(vtkPolyData*
>>>> poly_data)
>>>> {
>>>>   // DEBUG:
>>>>   // printf("%s\n", __PRETTY_FUNCTION__);
>>>>
>>>>   VTKPolyDataObjectsDDSReader::*UpdateInformation*();
>>>>   vtkStreamingDemandDrivenPipeline* executive =
>>>> vtkStreamingDemandDrivenPipeline::*SafeDownCast*(
>>>> VTKPolyDataObjectsDDSReader::*GetExecutive*());
>>>>
>>>>   *if* (!executive)
>>>>   {
>>>>     *return*;
>>>>   }
>>>>
>>>>   *this*->poly_data = poly_data;
>>>>
>>>>   *for* (*int* i = 0; i < *this*->poly_data->*GetNumberOfPieces*();
>>>> i++)
>>>>   {
>>>>     executive->*SetUpdateExtent*(0, i, *this*->poly_data->
>>>> *GetNumberOfPieces*(), 0);
>>>>     VTKPolyDataObjectsDDSReader::*Update*();
>>>>   }
>>>> }
>>>>
>>>> Any help is appreciated! Thanks guys.
>>>>
>>>> Kevin E. Dean
>>>>
>>>> P.S. - also attached is a screenshot of what some of the output looks
>>>> like.
>>>>
>>>> This email and its contents are confidential. If you are not the
>>>> intended recipient, please do not disclose or use the information within
>>>> this email or its attachments. If you have received this email in error,
>>>> please report the error to the sender by return email and delete this
>>>> communication from your records.
>>>
>>>
>>
>

-- 
This email and its contents are confidential. If you are not the intended 
recipient, please do not disclose or use the information within this email 
or its attachments. If you have received this email in error, please report 
the error to the sender by return email and delete this communication from 
your records.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150630/5fefcb69/attachment-0001.html>


More information about the ParaView mailing list