[Paraview] MultiBlock Reader, RequestInformation and ParaView Display

clinton at elemtech.com clinton at elemtech.com
Mon Apr 21 14:43:42 EDT 2008


On Monday 21 April 2008 12:27:03 pm David C Thompson wrote:
> > I am hacking together a MultiBlock reader  for a quick demo and I was
> > wondering if there is something I can put in "RequestInformation()"
> > that can then be set into the Pipeline that will enable ParaView to
> > show how many "blocks" are in a file, before the User clicks the "OK"
> > button in ParaView?
> >
> > outInfo->Set( vtkStreamingDemandDrivenPipeline::.....(), ....);
>
> Yes. The ExodusII reader does this. Actually, the ExodusII reader
> supports several *types* of blocks (element block, face block, edge
> block, element set, side set, face set, edge set, node set). The XML
> that supports element blocks is in
> Servers/ServerManager/Resources/readers.xml:
>
>      <StringVectorProperty
>         name="ElementBlockArrayInfo"
>         information_only="1">
>         <ArraySelectionInformationHelper attribute_name="ElementBlock"/>
>      </StringVectorProperty>
>
>      <StringVectorProperty
>         name="ElementBlockArrayStatus"
>         command="SetElementBlockArrayStatus"
>         number_of_elements="2"
>         repeat_command="1"
>         number_of_elements_per_command="2"
>         element_types="2 0"
>         information_property="ElementBlockArrayInfo">
>        <ArraySelectionDomain name="array_list">
>           <RequiredProperties>
>              <Property name="ElementBlockArrayInfo" function="ArrayList"/>
>           </RequiredProperties>
>        </ArraySelectionDomain>
>      </StringVectorProperty>
>
> which points to these methods from VTK/Hybrid/vtkExodusIIReader.h:
>
>   int GetNumberOfElementBlockArrays();
>   const char* GetElementBlockArrayName(int index);
>   int GetElementBlockArrayStatus(const char* name);
>   void SetElementBlockArrayStatus(const char* name, int flag);
>
> There is a Qt panel widget (Qt/Components/pqExodusIIPanel.h) for the
> reader that displays the names (and types) of the blocks -- and allows
> users to select a subset to be loaded -- before the user presses OK.
> This panel is associated to the reader by this class:
> Qt/Components/pqObjectInspectorWidget.cxx . I don't know how a plugin
> can "suggest" its own panel be used but perhaps someone more familiar
> with plugins will chime in.
>

An auto-generated panel can handle selection of blocks, or provide a read-only 
list of blocks with an information property (there's been a bit of 
improvement since Mike last asked about read-only properties).

The exodus reader GUI has an additional set of requirements that calls for a 
custom panel, which cannot be inferred from the server manager xml.

The wiki has instructions for creating panels in plugins if its necessary.

Clint


More information about the ParaView mailing list