ServerManager XML Hints: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
Line 18: Line 18:
</source>
</source>


===Hide a property===
===Hide/Show a property===


* Used to hide a property from the auto-generated Properties panel.
A Property hint with a show attribute can be used to hide or show a property within the automatically generated object inspector panel.


<source lang="xml">
<source lang="xml">
Line 27: Line 27:
   </Hints>
   </Hints>
</source>
</source>
Since almost all editable properties are by default shown in the automatically generated object inspector panel, this is most often used to hide the property.  The need for this can occur when the property must be declared in the XML so that the default value for the VTK object's ivar is wrong or when the value needs to be changed programmatically, but allowing the user to directly change it is either confusing or could invalidate the state.  One example where this hint is used relatively frequently is for the vtkFileSeriesReader, which


===Default View===
===Default View===

Revision as of 16:53, 9 May 2011

NOTE: This is under development and may not cover all available hints

Proxy Hints

These are hints added to proxies.

Mark proxy as a reader

  • Used to mark a proxy under the "sources" group as a reader.
  • extensions attribute is used to list the supported extensions e.g. "foo foo.bar" for files named as somename.foo or somename.foo.bar.
  • filename_patterns attribute is used to list the filename patterns to match. The format is similar to what one would use for "ls" using wildcards e.g. spcth* to match spcta, spctb etc.

<source lang="xml">

<Hints>
  <ReaderFactory extensions="[space separated extensions w/o leading '.']"
                 filename_patterns="[space separated filename patters (using wildcards)]"
                 file_description="[user-friendly description]" />
</Hints>

</source>

Hide/Show a property

A Property hint with a show attribute can be used to hide or show a property within the automatically generated object inspector panel.

<source lang="xml">

 <Hints>
   <Property name="[property name]" show="0" />
 </Hints>

</source>

Since almost all editable properties are by default shown in the automatically generated object inspector panel, this is most often used to hide the property. The need for this can occur when the property must be declared in the XML so that the default value for the VTK object's ivar is wrong or when the value needs to be changed programmatically, but allowing the user to directly change it is either confusing or could invalidate the state. One example where this hint is used relatively frequently is for the vtkFileSeriesReader, which

Default View

  • Used to pick a default view type.
  • Does not support picking a view type for multiple output-ports just yet.

<source lang="xml">

<Hints>
  <View type="XYChartView" />
</Hints>

</source>


Mark Data Plotable

  • ParaView charts can support plotting any type of data, however since plotting is client-side, we don't want the user to accidentally try to plot really large datasets.
  • So we mark certain filters/sources are plot-able.
  • A source/filter producing vtkTable is always plot-able by default.

<source lang="xml">

 <Hints>
   <Plotable />
 </Hints>

</source>

Don't hide input dataset

  • When a filter is applied, ParaView hides the input dataset(s) by default in the active view.
  • In some cases, this is not the expected behavior e.g. Slice filter. In that case, use this hint.
  • Accepted values:
 0 ==> don't replace the input at all
 1 ==> replace the input (default behavior)
 2 ==> replace the input only if it is "Surface" or "Surface With Edges" and is totally opaque.

<source lang="xml">

 <Hints>
   <Visibility replace_input="0" />
 </Hints>

</source>

Property Hints

These are hints added to Properties.

Selection Input

  • If a filter needs to use the "active selection", one can use this hint.
  • Only used by auto-generated Properties panel.
  • Specified on a Input property that can take in a vtkSelection.

<source lang="xml">

 <InputProperty name="Selection"
      command="SetSelectionConnection">
      <DataTypeDomain name="input_type">
        <DataType value="vtkSelection"/>
      </DataTypeDomain>
      <Documentation>
        The input that provides the selection object.
      </Documentation>
      <Hints>
        <SelectionInput />
      </Hints>
 </InputProperty>

</source>