[vtkusers] MultiblockDataSet SetBlock , Paraview Related

RIVERA, Orlando Orlando.RIVERA at mtu.de
Mon Jun 23 08:36:05 EDT 2014


Dear VTK Community,


I have a question about vtkMulitBlockDataSet and setting  blocks!


I have created, for example, the following empty structure:

+ vtkMultiBlockDataSet (root)
++ vtkMultiBlockDataSet (L1)
+++ vtkMultiBlockDataSet (A)
            ++++ vtkUnstructuredGrid (1)
            ++++ vtkUnstructuredGrid (2)

++ vtkMultiBlockDataSet (L2)
+++ vtkMultiBlockDataSet (B)
            ++++ vtkUnstructuredGrid (3)
            ++++ vtkUnstructuredGrid (4)

++ vtkMultiBlockDataSet (L3)
                        +++ vtkMultiBlockDataSet (C)
            ++++ vtkUnstructuredGrid (5)

+++ vtkMultiBlockDataSet (D)
            ++++ vtkUnstructuredGrid (6)
            ++++ vtkUnstructuredGrid (7)
            ++++ vtkUnstructuredGrid (8)

I have numbered the blocks for easier understanding.  Blocks  1-8  are empty UnstruturedGrid inserted for example with:
A->SetBlock ( 0, vtkSmartPointer<vtkUnstructuredGrid>::New() ) ,
A->SetBlock ( 1, vtkSmartPointer<vtkUnstructuredGrid>::New() ) ,
and  for (D):
D-> SetBlock (0, vtkSmartPointer<vtkUnstructuredGrid>::New() )
D-> SetBlock (1, vtkSmartPointer<vtkUnstructuredGrid>::New() )
D-> SetBlock (2, vtkSmartPointer<vtkUnstructuredGrid>::New() )  and so on.

The File I am reading has this structure and it won’t change , and the  idea  behind my reasoning  is a partial/incremental reading, i.e., I signal Paraview  I want to read blocks (1) and (2) –first pass-- , then  I want to read blocks (3) and (4) –second past-- , but keeping (1) and  (2). Since  I have read blocks(1) and (2) in the first pass, I want to skip these 2 steps (reading 1 and 2).

In the  third pass, I signalize Paraview   that  I want to keep blocks (2), (3) and (4)  dropping block (1).  Dropping means to me inserting  an empty grid with:  “ A->SetBlock ( 0, vtkSmartPointer<vtkUnstructuredGrid>::New() ) “

I tried using
root->GetBlock(0)->GetBlock(0)  to get (A) and  then insert the grid using A->SetBlock(0, grid_1 );

with an error    'class vtkDataObject' has no member named 'GetBlock'  for  root->GetBlock(0)  . I have read in the documentation that GetBlock returns a pointer to vtkObjectData . How can I convert this vtkObjectData in the proper type, or  in general how could I implement my algorithm with the given description ?

Any Help would be highly appreciated. Thanks in Advance  !!

Regards

Orlando








--
MTU Aero Engines AG
Vorstand/Board of Management: Reiner Winkler, Vorsitzender/CEO; Dr. Rainer Martens, Michael Schreyögg, Dr. Stefan Weingartner
Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus Eberhardt
Sitz der Gesellschaft/Registered Office: Muenchen
Handelsregister/Commercial Register: Muenchen HRB 157206

Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte den Absender und loeschen Sie diese
E-Mail sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder Weiterleiten ist nicht gestattet.

This e-mail and any attached documents are proprietary to MTU, confidential or protected by law.
If you are not the intended recipient, please advise the sender and delete this message and its attachments.
Any unauthorised storing, copying or distribution is prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140623/41d871d1/attachment.html>


More information about the vtkusers mailing list