[vtk-developers] Problem with vtkStreamingDemandDrivenPipeline
    Rusty Blue 
    rusty.blue at kitware.com
       
    Tue Apr  5 10:57:29 EDT 2005
    
    
  
Hi Pat,
 
I just looked over the code in CopyDefaultInformation of
vtkStreamingDemandDrivenPipeline.  it looks ok to me (the change would NOT
have resulted in the MAXIMUM_NUMBER_OF_PIECES key not being set, just the
value it was set to).  I expect the change that actually is breaking things
for you is one made to CopyEntry in vtkInformationIntegerKey.cxx. a bug was
fixed that would copy a value of 0 even when the source information key had
not been set (the CopyEntry call should have replicated the non-set state in
the destination information object, not set it to value of 0).  Thus I
expect 
 
    outInfo->CopyEntry(inInfo, MAXIMUM_NUMBER_OF_PIECES());
 
about 15 lines into CopyDefualtInformation is now doing the right thing..
NOT setting MAXIMUM_NUMBER_OF_PIECES in outInfo to 0.  So.
 
*	I expect that MAXIMUM_NUMBER_OF_PIECES is not set on the input to
vtkVortexCore. is that expected?
*	Regardless of whether it is expected or not it should still be set
in the next for loop. UNLESS the data object had NOT been set on the
outInfo. 
 
    // Setup default information for the outputs.
    for(int i=0; i < this->Algorithm->GetNumberOfOutputPorts(); ++i)
      {
      vtkInformation* outInfo = this->GetOutputInformation(i);
 
      // The data object will exist because UpdateDataObject has already
      // succeeded. Except when this method is called by a subclass
      // that does not provide this key in certain cases.
      vtkDataObject* dataObject =
outInfo->Get(vtkDataObject::DATA_OBJECT());
      if (!dataObject)
        {
        continue;
        }
      vtkInformation* dataInfo = dataObject->GetInformation();
      if(dataInfo->Get(vtkDataObject::DATA_EXTENT_TYPE()) ==
VTK_PIECES_EXTENT)
        {
        if (!outInfo->Has(MAXIMUM_NUMBER_OF_PIECES()))
          {
          if (this->GetNumberOfInputPorts() > 0)
            {
            // must have structured input; MAXIMUM_NUMBER_OF_PIECES will
            // not be copied above (CopyEntry does nothing since key not set
            // in inInfo); set to -1
            outInfo->Set(MAXIMUM_NUMBER_OF_PIECES(), -1);
            }
          else
            {
            // Since most unstructured filters in VTK generate all their
            // data once, set the default maximum number of pieces to 1.
            outInfo->Set(MAXIMUM_NUMBER_OF_PIECES(), 1);
            }
          }
        }
 
Of course there could be some other interaction occurring that isn't
obvious, but I expect the information on the input is missing the key AND
(?) UpdateDataObject is failing.
 
If you think I'm off base, let me know. I'll take another look.
 
Rusty
 
 
  _____  
From: vtk-developers-bounces at vtk.org [mailto:vtk-developers-bounces at vtk.org]
On Behalf Of Crossno, Patricia J
Sent: Monday, April 04, 2005 5:15 PM
To: vtk-developers at vtk.org
Subject: [vtk-developers] Problem with vtkStreamingDemandDrivenPipeline
 
I am writing a filter for unstructured data (vtkVortexCore) and I recently
(Friday) updated my copy of VTK.  Since that time, I've been getting the
following error message:
ERROR: In
C:\vtk_stuff\ParaView\VTK\Filtering\vtkStreamingDemandDrivenPipeline.cxx,
line 549 
vtkStreamingDemandDrivenPipeline (0x03E8DDE8): No maximum number of pieces
has been set in the information for output port 0 on algorithm
vtkVortexCore(0x03E85FA0).
Looking at the revision log for vtkStreamingDemandDrivenPipeline.cxx, I see
the following last entry: 
Revision 1.28 - (view
<file:///\\cgi-bin\viewcvs.cgi\Filtering\vtkStreamingDemandDrivenPipeline.cx
x?rev=1.28&view=markup> ) (download
<file:///\\cgi-bin\viewcvs.cgi\*checkout*\Filtering\vtkStreamingDemandDriven
Pipeline.cxx?rev=1.28> ) (as
<file:///\\cgi-bin\viewcvs.cgi\*checkout*\Filtering\vtkStreamingDemandDriven
Pipeline.cxx?content-type=text%2Fplain&rev=1.28>  text) (annotate
<file:///\\cgi-bin\viewcvs.cgi\Filtering\vtkStreamingDemandDrivenPipeline.cx
x?annotate=1.28> ) - [select
<file:///\\cgi-bin\viewcvs.cgi\Filtering\vtkStreamingDemandDrivenPipeline.cx
x?r1=1.28&view=log>  for diffs]
Tue Mar 29 15:48:48 2005 UTC (6 days, 5 hours ago) by blue
Branch:
<file:///\\cgi-bin\viewcvs.cgi\Filtering\vtkStreamingDemandDrivenPipeline.cx
x?only_with_tag=MAIN> MAIN
CVS Tags:
<file:///\\cgi-bin\viewcvs.cgi\Filtering\vtkStreamingDemandDrivenPipeline.cx
x?only_with_tag=HEAD> HEAD,
<file:///\\cgi-bin\viewcvs.cgi\Filtering\vtkStreamingDemandDrivenPipeline.cx
x?only_with_tag=ParaView-RenderModule2> ParaView-RenderModule2
Branch point for:
<file:///\\cgi-bin\viewcvs.cgi\Filtering\vtkStreamingDemandDrivenPipeline.cx
x?only_with_tag=ParaView-RenderModule2-branch> ParaView-RenderModule2-branch
Changes since 1.27: +14 -4 lines
Diff to previous
<file:///\\cgi-bin\viewcvs.cgi\Filtering\vtkStreamingDemandDrivenPipeline.cx
x?r1=1.27&r2=1.28>  1.27 
BUG: Fixing a bug in the CopyEntry functionality of Integer keys revealed
that MAXIMUM_NUMBER_OF_PIECES was not correctly being handled if the input
was structured data.
Is it possible that this change has created a problem for unstructured data,
or that the extent of the original bug was not limited to structured data?
                Pat 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20050405/4c38aba9/attachment.html>
    
    
More information about the vtk-developers
mailing list