[vtkusers] how to render vtkMultiBlockDataSet?

David E DeMarle dave.demarle at kitware.com
Fri Jan 7 10:52:09 EST 2011


First use vtkCompositeDataPipeline instead of the default streaming demand
driven pipeline in you program. That makes VTK iterate over blocks to
satisfy non-composite aware filters. Next use vtkCompositeGeometryFilter to
extract the external surfaces in your composite of unstructured grid data in
order to make polygons that can be rendered. Render that filter's output
with a standard mapper.

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109


On Fri, Jan 7, 2011 at 12:57 AM, Nelson <gnjoseph at gmail.com> wrote:

> Dear David,
>
> I put the *every file in a specified directory* pertaining to the d3plot.
> Then It shows the no.of blocks are 7. and paraview does not crashes.
>
> After deep observation, I found that every block is type of un-structured
> grid.
> Now how to render it using vtk?
>
> Best Regards,
> Nelson Joseph.G
>
>
> On Wed, Jan 5, 2011 at 7:55 PM, David Doria-2-3 [via VTK] <[hidden email]<http://user/SendEmail.jtp?type=node&node=3331451&i=0>
> > wrote:
>
>> On Wed, Jan 5, 2011 at 9:14 AM, Nelson <[hidden email]<http://user/SendEmail.jtp?type=node&node=3328885&i=0>>
>> wrote:
>> >
>> > Hi David,
>> >
>> > I think it may be of type "vtkMultiBlockDataSet"
>>
>> Right, that is the type of reader->GetOutput(), but as far as I know
>> you need to get and render each block separately.
>>
>> We need to know the type of each block so we can get them with:
>> vtkUnstructuredGrid* ug =
>> vtkUnstructuredGrid::SafeDownCast(reader->GetOutput()->GetBlock(0));
>>
>> Unfortunately, your file seems to have 0 blocks:
>> std::cout << "Number of blocks: " <<
>> reader->GetOutput()->GetNumberOfBlocks() << std::endl;
>>
>> which may also be why ParaView crashes.
>>
>> David
>> _______________________________________________
>> 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
>>
>>
>> ------------------------------
>>  View message @
>> http://vtk.1045678.n5.nabble.com/how-to-render-vtkMultiBlockDataSet-tp3328294p3328885.html<http://vtk.1045678.n5.nabble.com/how-to-render-vtkMultiBlockDataSet-tp3328294p3328885.html?by-user=t>
>>
>> To unsubscribe from how to render vtkMultiBlockDataSet?, click here<http://vtk.1045678.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3328294&code=Z25qb3NlcGhAZ21haWwuY29tfDMzMjgyOTR8LTE2NTA2NjQ5NzE=&by-user=t>.
>>
>>
>
>
> ------------------------------
> View this message in context: Re: how to render vtkMultiBlockDataSet?<http://vtk.1045678.n5.nabble.com/how-to-render-vtkMultiBlockDataSet-tp3328294p3331451.html>
>
> Sent from the VTK - Users mailing list archive<http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html>at Nabble.com.
>
> _______________________________________________
> 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/20110107/2ad8c590/attachment.htm>


More information about the vtkusers mailing list