[Paraview] Dataset name in a MultiBlock dataset and display of unstructured grid

#CHENG ZHIGAO# CHEN0136 at ntu.edu.sg
Wed Apr 1 22:56:24 EDT 2009


Hi, Moreland

        Thanks for your reply. Maybe i have confused you people. 

       Now the question is: how do I make a grid invisible to the user using code style not the "eyeball" in the pipeline browser? Or how can i hide the gird using code style?

        Thanks very much.
Regards,
zhigao

-----Original Message-----
From: Moreland, Kenneth [mailto:kmorel at sandia.gov]
Sent: Wed 4/1/2009 10:26 PM
To: #CHENG ZHIGAO#; paraview at paraview.org
Subject: Re: [Paraview] Dataset name in a MultiBlock dataset and display of unstructured grid
 
I don't know what the problem is with the reader reading one block at a time so long as only the data for a given block is read in at one time.  This is not all that different than iteratively reading the data for each time step during an animation, and that is what every reader in ParaView that supports time does.

Still, if you don't like that and you already have a reader and extract filter that are working to your satisfaction, my approach would probably be to write a third component that internally uses the reader and filter to perform the operation in one step.  In its constructor it would create the reader and filter and hook them up.  It would forward all its ivars (like filename and selected block) to the internal reader and filter.  In the RequestData call it would call Update on the internal filter and then shallow copy the internal filter's output to its own output.  If you are careful, the pipeline update mechanism will prevent the internal reader from re-executing unnecessarily.

-Ken


On 3/31/09 8:26 PM, "#CHENG ZHIGAO#" <CHEN0136 at ntu.edu.sg> wrote:



Hi, Ken
        Thanks for your reply.

        Yes, i am using my own reader. Currently all the blocks are constructed in the reader. And all the blocks are display in the view after pressing the Apply button. But the user would only expect to see one block each time. If i combine reader and filter together, i would have to open the data several times to see all different blocks(they need to compare with each other) which is not the way i want. Currently i have two options. Option one is that: reader stores all the data and subsequent filter retrieves block by block and construct the mesh accordingly. Option Two: The reader stores all data and constructed all the meshes but make them invisible to the user. Subsequent filter will retrieve block by block and display them.

        But neither way i do not know how to do it? Or it has the third or even more options?

Regards,
zhigao

-----Original Message-----
From: Moreland, Kenneth [mailto:kmorel at sandia.gov]
Sent: Tue 3/31/2009 8:28 PM
To: #CHENG ZHIGAO#; paraview at paraview.org
Subject: Re: [Paraview] Dataset name in a MultiBlock dataset and display of unstructured grid

Zhigao,

Are you creating your own reader?  If so, why not combine the actual reader and subsequent filter into a single "meta" reader class.  That way ParaView can read in the data and apply the block extraction all in one step.  It should make the user interface easier to use and gets around the problem in question.

-Ken


On 3/31/09 2:17 AM, "#CHENG ZHIGAO#" <CHEN0136 at ntu.edu.sg> wrote:

     Thanks, Paul...The name part has been done according to your suggestion... The other question still remains:


      The scenario is that: I have a reader which reads a multiple block data. Each of the data block is a unstructured grid. After i load the data and press the Apply button. The meshes are displayed in the view window which is not what i want. I just want the reader to store the data and a subsequent filter will be used to retrieve the data block by block and display them. The grid needs to be constructed in the reader since all corresponding functions are in the reader. The filter knows nothing about these. Another option is "eyeball" icon in the pipeline browser, is it possible to "turn off" by default?

      What should I do? Setting the block name is for the filter to display the options that the user can choose. Is this the right way to do it?

      Thanks in advance.

Regards,
zhigao

-----Original Message-----
From: Paul Edwards [mailto:paul.m.edwards at gmail.com]
Sent: Mon 3/30/2009 4:08 PM
To: #CHENG ZHIGAO#
Cc: paraview at paraview.org
Subject: Re: [Paraview] Dataset name in a MultiBlock dataset and display of unstructured grid

Hi Zhigao,

If you are writing a reader or filter that returns a multi-block data set
you can name a block with the following:


MULTI_BLOCK_DATA_SET->GetMetaData(BLOCK_NUMBER)->Set(vtkCompositeDataSet::NAME(),
"PUT_NAME_HERE");

If you are just using ParaView you can use the "Extract Block" filter and
select the blocks you are interested in.   In the pipeline browser you can
change the name from "ExtractBlock1" to something more meaningful.

Regards,
Paul


2009/3/29 #CHENG ZHIGAO# <CHEN0136 at ntu.edu.sg>

>
> hey,
>
>      As a beginner in paraview, please forgive my silly questions. :<)
>
>      I have a multiblock datasets which contains several unstructured grid.
> If there a way to set a different name for each block? And What should i do
> if i do not want to display some of the datasets while displaying the
> others? Or how can I hidden them all if i can not display parts of it?
>
>       Thanks for your help in advance.
>
> Regards,
> zhigao
>
> _______________________________________________
> 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 ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>





   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel





   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090402/235fcfa3/attachment.htm>


More information about the ParaView mailing list