Uh-oh. This will never work. Adding a dataset to a composite dataset does not guarantee pipeline connectivity (as you found out). Neither should it. Actually, it is safest if you do not add a dataset that is the output of a source to a composite dataset. What you need is a group filter. One that has multiple outputs and produce one composite data output. By the way, things may also break because you are using a subclass of vtkSource. vtkSource is now legacy and is there for backwards compatibility. However, since the composite data pipeline does not have to be backwards compatible, it is not required to work with the compatibility layer. I recommend subclassing from vtkAlgorithm (or one of it's subclasses).
<br>Also, please note that the composite data pipeline stuff is still maturing and it is very likely that there will be implementation and API changes.<br><br>-Berk<br><br><div><span class="gmail_quote">On 5/26/06, <b class="gmail_sendername">
Bill McGrory</b> <<a href="mailto:mcgrory@aerosft.com">mcgrory@aerosft.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yes, that is correct.<br>I have two datasets constructed from two custom sources.<br>I put these two datasets into a multiblock dataset.<br><br>multiblock dataset is then fed to a structuredgridoutline filter.<br><br>this is fed to a vtkMultiGroupDataGeometry filter and mapped.
<br><br>Before adding the patches listed below, the vtkStructuredGridSource<br>never receives a ExecuteData call.<br><br>If I fill the two datasets by hand, before adding them to the multiblock<br>dataset then everything works as expected.
<br><br>Likewise, if I simply feed the vtkStructuredGridSource->GetOutput()<br>directly to the Outline filter (bypass the multiblock dataset) then the<br>source correctly gets the ExecuteData call as well.<br><br>Regards
<br>Bill<br><br>On Thu, 2006-05-25 at 16:55 -0400, Berk Geveci wrote:<br>> I am not sure I understand. You have a few datasets, you add these to<br>> a multiblock dataset, you process this multiblock dataset with a<br>
> filter. Is that right?<br>><br>> On 5/25/06, Bill McGrory <<a href="mailto:mcgrory@aerosft.com">mcgrory@aerosft.com</a>> wrote:<br>>         I've been trying to get a<br>>         vtkMultiBlockDataSet to work properly with vtkStructuredGrid's
<br>>         which are<br>>         output from a vtkStructuredGridSource<br>><br>>         >From what I can tell, it appears that the<br>>         the  vtkCompositeDataPipeline<br>>         is unaware of child vtkDataObject->Source, so none of the data
<br>>         ever gets<br>>         loaded.<br>><br>>         I have constructed a work-around which appears (superficially<br>>         at least)<br>>         to work for my particular case, which is basically, if a
<br>>         Source exists<br>>         for the original vtkDataObject in the *ForBlock() routines,<br>>         call the<br>>         relevant Update's before performing the ShallowCopy<br>><br>>         patch is as follows
<br>><br>>         Index: vtkCompositeDataPipeline.cxx<br>>         ===================================================================<br>>         RCS<br>>         file: /cvsroot/VTK/VTK/Filtering/vtkCompositeDataPipeline.cxx,v
<br>>         retrieving revision 1.34<br>>         diff -u -r1.34 vtkCompositeDataPipeline.cxx<br>>         --- vtkCompositeDataPipeline.cxx        7 Dec 2005 16:21:29<br>>         -0000       1.34<br>>         +++ 
vtkCompositeDataPipeline.cxx        25 May 2006 19:48:48<br>>         -0000<br>>         @@ -35,6 +35,8 @@<br>>         #include "vtkStructuredGrid.h"<br>>         #include "vtkUniformGrid.h"
<br>><br>>         +#include "vtkSource.h"<br>>         +<br>>         vtkCxxRevisionMacro(vtkCompositeDataPipeline, "$Revision: 1.34<br>>         $");<br>>         vtkStandardNewMacro(vtkCompositeDataPipeline);
<br>><br>>         @@ -46,6 +48,28 @@<br>><br>>         vtkInformationKeyMacro(vtkCompositeDataPipeline,INPUT_REQUIRED_COMPOSITE_DATA_TYPE, String);<br>>         vtkInformationKeyMacro(vtkCompositeDataPipeline,UPDATE_BLOCKS,
<br>>         ObjectBase);<br>><br>>         +class vtkCompositeDataPipelineToDataObjectFriendship<br>>         +{<br>>         +public:<br>>         +  static void UpdateDataObject(vtkDataObject* obj)<br>
>         +    {<br>>         +               if(obj->Source)<br>>         +               {<br>>         +                       obj->Source->Update();<br>>         +               }<br>>         +
<br>>         +    }<br>>         +<br>>         +  static void UpdateInformation(vtkDataObject* obj)<br>>         +    {<br>>         +               if(obj->Source)<br>>         +               {<br>
>         +                       obj->Source->UpdateInformation();<br>>         +               }<br>>         +<br>>         +    }<br>>         +};<br>>         +<br>>         //----------------------------------------------------------------------------
<br>>         vtkCompositeDataPipeline::vtkCompositeDataPipeline()<br>>         {<br>>         @@ -490,6 +514,7 @@<br>>                  info->Get(vtkDataObject::DATA_OBJECT());<br>>                if (dobj && dobjCopy)
<br>>                  {<br>>         +<br>>         vtkCompositeDataPipelineToDataObjectFriendship::UpdateInformation(dobj);<br>>                  dobjCopy->ShallowCopy(dobj);<br>>                  dobjCopy->CopyInformation(dobj);
<br>>                  }<br>>         @@ -1089,6 +1114,7 @@<br>><br>>                  if (dobj && dobjCopy)<br>>                    {<br>>         +<br>>         vtkCompositeDataPipelineToDataObjectFriendship::UpdateDataObject(dobj);
<br>>                    dobjCopy->ShallowCopy(dobj);<br>>                    }<br>>                  }<br>><br>><br>>         Is this really a bug, and is this an appropriate fix?<br>>         Or am I doing something wrong up the pipeline, such that I
<br>>         shouldn't<br>>         need to do this?<br>><br>>         Regards<br>>         Bill<br>>         _______________________________________________<br>>         vtk-developers mailing list<br>
>         <a href="mailto:vtk-developers@vtk.org">vtk-developers@vtk.org</a><br>>         <a href="http://www.vtk.org/mailman/listinfo/vtk-developers">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>><br>
<br><br></blockquote></div><br>