[vtkusers] Re : Re : Re : vtkMultiBlockDataSet and SetInputConnection

R M mlokida at yahoo.fr
Thu Oct 6 05:11:22 EDT 2011


Oups, I think I have a mistake. CompositeDataGeometryFilter only give one polyData. So only one mapper and one actor.
But, If I want to color my blocks by different color, I can't use CompositeDataGeometryFilter. I have to build one mapper/actor for each block.




________________________________
De : R M <mlokida at yahoo.fr>
À : Favre Jean <jfavre at cscs.ch>; "vtkusers at vtk.org" <vtkusers at vtk.org>
Envoyé le : Jeudi 6 Octobre 2011 11h06
Objet : [vtkusers] Re : Re :  vtkMultiBlockDataSet and SetInputConnection


Ok now I can see the idea :)

So if I have understand, you have: multiblockDataSet-> ExtractBlock -> CompositeDataGeometryFilter -> Mapper for the N blocs we have extracted -> Actors for the N Mappers -> Renderer

Thank you.



________________________________
De : Favre  Jean <jfavre at cscs.ch>
À : R M <mlokida at yahoo.fr>; "vtkusers at vtk.org" <vtkusers at vtk.org>
Envoyé le : Jeudi 6 Octobre 2011 9h29
Objet : RE: Re : [vtkusers] vtkMultiBlockDataSet and SetInputConnection

I use a vtkExtractBlock upstream, to do selection on a per-block basis. The output of vtkExtractBlock is itself a multi-block dataset and the rest of the pipeline is unchanged.

J
________________________________
From: R M [mlokida at yahoo.fr]
Sent: Thursday, October 06, 2011 9:24 AM
To: Favre Jean; vtkusers at vtk.org
Subject: Re : [vtkusers] vtkMultiBlockDataSet and SetInputConnection

Hi,

I had seen the vtkCompositeDataGeometryFilter but, the problem in my case, is that the ouput is one polydata (so one polydatamapper and one actor). And, I want the option to make visible or not one of the block on my geometry. That 's why I
 haven't use vtkCompositeDataGeometryFilter.

Thank you.

________________________________
De : Favre Jean <jfavre at cscs.ch>
À : "vtkusers at vtk.org" <vtkusers at vtk.org>
Envoyé le : Jeudi 6 Octobre 2011 9h06
Objet : Re: [vtkusers] vtkMultiBlockDataSet and SetInputConnection

Here is what I have been using for several years.

eb1 is my multi-block dataset.

VTK_CREATE(vtkCompositeDataGeometryFilter, geom1);
geom1->SetInputConnection(0, eb1->GetOutputPort(0));
geom1->Update();

VTK_CREATE(vtkPolyDataMapper, mapper1);
mapper1->SetInputConnection(geom1->GetOutputPort(0));

VTK_CREATE(vtkActor,
 actor1);
actor1->SetMapper(mapper1);

-----------------
Jean M. Favre
Swiss National Supercomputing Center


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers





_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111006/9f5cd217/attachment.htm>


More information about the vtkusers mailing list