1 Proxy Hints And Annotations {#ProxyHints}
2 ===========================
4 This page documents *Proxy Hints*, which are XML tags accepted under *Hints*
5 for a *Proxy* element in the Server-Manager configuration XMLs.
7 WarnOnRepresentationChange
8 --------------------------
9 Warn the user on changing to a specific representation type.
11 For the motivation behind this hint, see BUG #15117.
12 This is used to indicate to the pqDisplayRepresentationWidget that the user must
13 be prompted with a *'Are you sure?'* if they manually switch to this
14 representation from the UI.
16 <RepresentationProxy ...>
19 <WarnOnRepresentationChange value="Volume" />
21 </RepresentationProxy>
25 Warn the user when creating the filter or source in the UI.
27 The motivation behind this hint is to warn the user when executing filters
28 like **Temporal Statistics** filter since they can potentially take a long time
29 for large file series or when a filter may uses too much memory relative to
36 <Text title="Potentially slow operations">
37 **Temporal Statistics** filter needs to process all timesteps
38 available in your dataset and can potentially take a long time to complete.
39 Do you want to continue?
44 It is possible to specify some conditions for the warn based on memory usage and inputs types.
45 In the below example, the warning will be presented to the user only if the input is a vtkImageData
46 and the remaining memory is smaller than the expected size of the output, which is `10` times the size of the input.
47 If relative is not set, a default value of `1` will be used.
48 The DataTypeDomain syntax is the same as the one for the DataTypeDomain with InputProperty.
54 <DataTypeDomain name="input_type">
55 <DataType value="vtkImageData" />
57 <MemoryUsage relative="10" />
58 <Text title="Potentially running out of memory">
59 This filter may not have enough memory to process
60 Do you want to continue?
67 Mark a proxy as reader proxy so that it's used to open files from the **File |
70 This hint is used to mark a proxy as a reader. It provides the ParaView
71 application with information about extensions supported by this reader.
72 **extensions** attribute to list the supported extensions e.g. "foo foo.bar" for
73 files named as `somename.foo` or `somename.foo.bar`.
74 **filename_patterns** attribute is used to list the filename patterns to match.
75 The format is similar to what one would use for `ls` or `dir` using wildcards e.g.
76 spcth\* to match spcta, spctb etc.
78 <!-- using extensions -->
82 <ReaderFactory extensions="[space separated extensions w/o leading '.']"
83 filename_patterns="[space separated filename patters (using wildcards)]"
84 file_description="[user-friendly description]" />
90 Specify the default view to use for showing the output produced by a
93 This hint is used to indicate the name of the view to use by default for showing
94 the output of this source/filter on first *Apply*. To specify the view type for
95 a specific output port, you can use the optional attribute **port**.
100 <View type="XYChartView" />
104 In certain cases, in addition to showing the data in the "preferred" default
105 view, you may want to show the result in the current view as well e.g. when
106 **Plot Over Line** filter is created, while the result is shown in the
107 **XYChartView**, we want to show the line representation for the data being
108 plotted in the current Render View too. For that one can add the
109 `also_show_in_current_view` attribute to the `<View/>` tag.
114 <View type="XYChartView" also_show_in_current_view="1" />
118 If the source/filter has more than 1 output ports, you can choose which port the
119 hint corresponds to by using the optional `port` attribute.
124 <View type="XYChartView" port="1" />
128 The `<View/>` hint can also be used to prevent automatic display of an output in
129 any view. To do that, use the **None** type. Such source can then still be
130 displayed manually by toggling the visibility when an appropriate View is active.
141 Specify the pipeline icon view to use in the pipeline browser for this
144 This hint is used to indicate the icon to use in the pipeline browser.
145 It can be either the full name of a qt resource icon or the name of a view type
146 for which an icon as already been defined.
151 <PipelineIcon name="XYChartView" />
155 If the source/filter has more than 1 output port, you can choose which port the
156 hint corresponds to by using the optional `port` attribute.
161 <PipelineIcon name="XYChartView" port="1" />
165 At the time of writing, the supported stock icon names were:
172 * "XYHistogramChartView"
180 * "INSITU_EXTRACT_GRAY"
181 * "INSITU_SERVER_RUNNING"
182 * "INSITU_SERVER_PAUSED"
183 * "INSITU_BREAKPOINT"
184 * "INSITU_WRITER_PARAMETERS"
187 If the desired icon is not present in the list, it is possible to use a Qt resource icon name directly.
192 <PipelineIcon name=":/pqWidgets/Icons/pqCalculator.svg" />
196 Available icons are visible in the sources of ParaView
198 If the desired icon is not present, it can be added, for example in the context of a plugin, using
199 GUI_RESOURCES in your ADD_PARAVIEW_PLUGIN macro, a .qrc file and your own icon file.
204 <PipelineIcon name=":/MyPluginQtResource/Icons/myIcon.png" />
210 Mark output data as plotable in 2D chart views.
212 Chart views in ParaView e.g. **Bar Chart View**, **Line Chart View**, support
213 plotting data of any type. However, since such plots don't use distributed
214 rendering techniques, to avoid accidentally plotting large datasets, the plots
215 by default can only show sources/filters that produce `vtkTable` as the output.
216 If a source/filter doesn't produce a `vtkTable`, but produces data that should
217 indeed be plotted by such views, one can use this hint.
227 Specify the representation type to use by default when showing the output from a
228 source/filter in a particular view.
230 This hint is used to indicate the default representation type in any/all views.
231 The **view** attribute is optional. When not specified it matches all views.
232 Likewise, **port** attribute is optional. When not specified it matches all
233 output ports. The hints are processed in order. Hence when specifying multiple
234 Representation elements, start with most restrictive to least restrictive.
236 Note, this hint doesn't control which representation proxy gets created, but the
237 default value for the "Representation" property on the representation proxy
238 set using `vtkSMRepresentationProxy::SetRepresentationType()`.
243 <RepresentationType view="ComparativeRenderView" type="Surface" port="1"/>
244 <RepresentationType view="RenderView" type="Wireframe" />
250 Specify the representation proxy to create to show the output from a
251 source/filter in a particular view.
253 This hint is used to indicate the representation proxy to create to show the
254 output from a source/filter in a particular view, rather than letting the view
255 determine which representation proxy to create. This is rare. The more common
256 use-case of picking the default representation type is satisfied by
257 **RepresentationType** XML hint documented above.
259 The required **view** attribute specifies the view to which the hint applies and
260 should be set to the XML proxy name of the view. The required **type** attribute
261 specifies the XML proxy name for representation to create. The optional
262 **port** attribute can be used to limit the hint to specific output port.
267 <Representation view="RenderView" type="TextSourceRepresentation" />
272 --------------------------
273 Set name and representation of a specific output port.
275 This hint is used to rename a specific output port
276 and also the type of representation to use.
277 Type can be either "text", "logo" or "progress".
279 The representation part of this hint may be deprecated soon.
280 Use Representation hint instead.
285 <OutputPort index="0"
291 ShowProxyDocumentationInPanel
292 -----------------------------
293 Show an annotation label in the auto-generated panel generated using
296 This hint is used to indicate that the documentation for the proxy should be
297 shown in special label at the top of the panel generated for the proxy. This is
298 useful to show information to the user directly on the panel.
300 The ShowProxyDocumentationInPanel take one optional attribute **type**. The
302 1. *description*: (default) to use vtkSMDocumentation::GetDescription(),
303 2. *short_help*: to use vtkSMDocumentation::GetShortHelp(), and
304 3. *long_help*: to use vtkSMDocumentation::GetLongHelp().
308 Some text that will be shown in the label.
312 <ShowProxyDocumentationInPanel type="description"/>
318 Indicate the property on a reader to use to refresh (or reload) the reader to
319 make it re-read the data files.
321 This hint can be used for readers that support "smart refresh" to re-read files
322 when they are changed. Otherwise, ParaView will use the default mechanism which
323 simply recreated the reader thus forgoing any previous data cached by the
324 reader. The attribute **property** indicates the name of the property on the
325 reader proxy to invoke to make the reader refresh.
330 <ReloadFiles property="Refresh" />
336 Views support the following annotations:
338 1. **ParaView::DetachedFromLayout**: **Deprecated in ParaView 5.7**.
339 This is no longer applicable as all views are created detached from layout by default.
343 Certain algorithms can generate new data autonomously, e.g. a source that reads
344 data from the network. The **LiveSource** hint allows ParaView to periodically
345 check with the algorithm if it has new data and update the application, if so.
347 For that, one simply adds a hint to the proxy as follows:
352 <LiveSource interval="100" />
356 The algorithm subclass must have `bool GetNeedsUpdate()` method that returns
357 true if the algorithm needs update.
359 The `interval` attribute is optional (defaults to 100) and can be used to
360 provide a refresh rate in milliseconds.
362 The `refresh_on_interaction` boolean attribute is optional (defaults to false).
363 When enabled, allows live sources to be refreshed upon user interaction.
364 However, enabling this option can complicate interactions, especially with
367 The `emulated_time` attribute is optional and defaults to 0. It is a boolean
368 value that marks the live source as an emulated real-time algorithm, which
369 is an algorithm updated at regular time intervals based on real-time and
370 its available time steps (in seconds). Note that the proxy class must
371 inherit from the `vtkEmulatedTimeAlgorithm` class.
376 <LiveSource interval="50" emulated_time="1" />
381 --------------------------
382 Connect to a specific port index.
384 This is used to connect a representation to an output port of a filter
385 other than the default (index = 0). Currently, this is only used to
386 modify the input port for the selection representation subproxy in
387 vtkSMPVRepresentationProxy.
389 <RepresentationProxy ...>
392 <ConnectToPortIndex value="2" />
394 </RepresentationProxy>
397 --------------------------
398 Plugin specific hint to control how a filter/source is shown in menus
400 This is used **in plugins only** to configure how a source or filter
401 should be shown in the filters/sources menu. It enables to place them
402 into an existing category or a new category, as well as set the icon.
407 <ShowInMenu category="Category" icon=":/path/to/resource/icon.png" />
412 --------------------------
413 Disable the "Solid Color" option for a specific representation type.
415 This is used to indicate to the pqDisplayColorWidget to disable the
416 "Solid Color" option because this representation type doesn't handle it
419 <RepresentationProxy ...>
422 <NoSolidColor representation="Slice" />
423 <NoSolidColor representation="Volume" />
425 </RepresentationProxy>
428 --------------------------
429 Hide the mouse cursor when hovering a render view.
431 <RenderViewProxy ...>