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.
17 <RepresentationProxy ...>
20 <WarnOnRepresentationChange value="Volume" />
22 </RepresentationProxy>
27 Warn the user when creating the filter or source in the UI.
29 The motivation behind this hint is to warn the user when executing filters
30 like **Temporal Statistics** filter since they can potentially take a long time
31 for large file series or when a filter may uses too much memory relative to
39 <Text title="Potentially slow operations">
40 **Temporal Statistics** filter needs to process all timesteps
41 available in your dataset and can potentially take a long time to complete.
42 Do you want to continue?
48 It is possible to specify some conditions for the warn based on memory usage and inputs types.
49 In the below example, the warning will be presented to the user only if the input is a vtkImageData
50 and the remaining memory is smaller than the expected size of the output, which is `10` times the size of the input.
51 If relative is not set, a default value of `1` will be used.
52 The DataTypeDomain syntax is the same as the one for the DataTypeDomain with InputProperty.
59 <DataTypeDomain name="input_type">
60 <DataType value="vtkImageData" />
62 <MemoryUsage relative="10" />
63 <Text title="Potentially running out of memory">
64 This filter may not have enough memory to process
65 Do you want to continue?
73 Mark a proxy as reader proxy so that it's used to open files from the **File |
76 This hint is used to mark a proxy as a reader. It provides the ParaView
77 application with information about extensions supported by this reader.
78 **extensions** attribute to list the supported extensions e.g. "foo foo.bar" for
79 files named as `somename.foo` or `somename.foo.bar`.
80 **filename_patterns** attribute is used to list the filename patterns to match.
81 The format is similar to what one would use for `ls` or `dir` using wildcards e.g.
82 spcth\* to match spcta, spctb etc.
85 <!-- using extensions -->
89 <ReaderFactory extensions="[space separated extensions w/o leading '.']"
90 filename_patterns="[space separated filename patters (using wildcards)]"
91 file_description="[user-friendly description]" />
98 Specify the default view to use for showing the output produced by a
101 This hint is used to indicate the name of the view to use by default for showing
102 the output of this source/filter on first *Apply*. To specify the view type for
103 a specific output port, you can use the optional attribute **port**.
109 <View type="XYChartView" />
114 In certain cases, in addition to showing the data in the "preferred" default
115 view, you may want to show the result in the current view as well e.g. when
116 **Plot Over Line** filter is created, while the result is shown in the
117 **XYChartView**, we want to show the line representation for the data being
118 plotted in the current Render View too. For that one can add the
119 `also_show_in_current_view` attribute to the `<View/>` tag.
125 <View type="XYChartView" also_show_in_current_view="1" />
130 If the source/filter has more than 1 output ports, you can choose which port the
131 hint corresponds to by using the optional `port` attribute.
137 <View type="XYChartView" port="1" />
142 The `<View/>` hint can also be used to prevent automatic display of an output in
143 any view. To do that, use the **None** type. Such source can then still be
144 displayed manually by toggling the visibility when an appropriate View is active.
157 Specify the pipeline icon view to use in the pipeline browser for this
160 This hint is used to indicate the icon to use in the pipeline browser.
161 It can be either the full name of a qt resource icon or the name of a view type
162 for which an icon as already been defined.
168 <PipelineIcon name="XYChartView" />
173 If the source/filter has more than 1 output port, you can choose which port the
174 hint corresponds to by using the optional `port` attribute.
180 <PipelineIcon name="XYChartView" port="1" />
185 At the time of writing, the supported stock icon names were:
192 * "XYHistogramChartView"
200 * "INSITU_EXTRACT_GRAY"
201 * "INSITU_SERVER_RUNNING"
202 * "INSITU_SERVER_PAUSED"
203 * "INSITU_BREAKPOINT"
204 * "INSITU_WRITER_PARAMETERS"
207 If the desired icon is not present in the list, it is possible to use a Qt resource icon name directly.
213 <PipelineIcon name=":/pqWidgets/Icons/pqCalculator.svg" />
218 Available icons are visible in the sources of ParaView
220 If the desired icon is not present, it can be added, for example in the context of a plugin, using
221 GUI_RESOURCES in your ADD_PARAVIEW_PLUGIN macro, a .qrc file and your own icon file.
227 <PipelineIcon name=":/MyPluginQtResource/Icons/myIcon.png" />
234 Mark output data as plotable in 2D chart views.
236 Chart views in ParaView e.g. **Bar Chart View**, **Line Chart View**, support
237 plotting data of any type. However, since such plots don't use distributed
238 rendering techniques, to avoid accidentally plotting large datasets, the plots
239 by default can only show sources/filters that produce `vtkTable` as the output.
240 If a source/filter doesn't produce a `vtkTable`, but produces data that should
241 indeed be plotted by such views, one can use this hint.
253 Specify the representation type to use by default when showing the output from a
254 source/filter in a particular view.
256 This hint is used to indicate the default representation type in any/all views.
257 The **view** attribute is optional. When not specified it matches all views.
258 Likewise, **port** attribute is optional. When not specified it matches all
259 output ports. The hints are processed in order. Hence when specifying multiple
260 Representation elements, start with most restrictive to least restrictive.
262 Note, this hint doesn't control which representation proxy gets created, but the
263 default value for the "Representation" property on the representation proxy
264 set using `vtkSMRepresentationProxy::SetRepresentationType()`.
270 <RepresentationType view="ComparativeRenderView" type="Surface" port="1"/>
271 <RepresentationType view="RenderView" type="Wireframe" />
278 Specify the representation proxy to create to show the output from a
279 source/filter in a particular view.
281 This hint is used to indicate the representation proxy to create to show the
282 output from a source/filter in a particular view, rather than letting the view
283 determine which representation proxy to create. This is rare. The more common
284 use-case of picking the default representation type is satisfied by
285 **RepresentationType** XML hint documented above.
287 The required **view** attribute specifies the view to which the hint applies and
288 should be set to the XML proxy name of the view. The required **type** attribute
289 specifies the XML proxy name for representation to create. The optional
290 **port** attribute can be used to limit the hint to specific output port.
296 <Representation view="RenderView" type="TextSourceRepresentation" />
302 --------------------------
303 Set name and representation of a specific output port.
305 This hint is used to rename a specific output port
306 and also the type of representation to use.
307 Type can be either "text", "logo" or "progress".
309 The representation part of this hint may be deprecated soon.
310 Use Representation hint instead.
316 <OutputPort index="0"
323 ShowProxyDocumentationInPanel
324 -----------------------------
325 Show an annotation label in the auto-generated panel generated using
328 This hint is used to indicate that the documentation for the proxy should be
329 shown in special label at the top of the panel generated for the proxy. This is
330 useful to show information to the user directly on the panel.
332 The ShowProxyDocumentationInPanel take one optional attribute **type**. The
334 1. *description*: (default) to use vtkSMDocumentation::GetDescription(),
335 2. *short_help*: to use vtkSMDocumentation::GetShortHelp(), and
336 3. *long_help*: to use vtkSMDocumentation::GetLongHelp().
341 Some text that will be shown in the label.
345 <ShowProxyDocumentationInPanel type="description"/>
352 Indicate the property on a reader to use to refresh (or reload) the reader to
353 make it re-read the data files.
355 This hint can be used for readers that support "smart refresh" to re-read files
356 when they are changed. Otherwise, ParaView will use the default mechanism which
357 simply recreated the reader thus forgoing any previous data cached by the
358 reader. The attribute **property** indicates the name of the property on the
359 reader proxy to invoke to make the reader refresh.
365 <ReloadFiles property="Refresh" />
372 Views support the following annotations:
374 1. **ParaView::DetachedFromLayout**: **Deprecated in ParaView 5.7**.
375 This is no longer applicable as all views are created detached from layout by default.
379 Certain algorithms can generate new data autonomously, e.g. a source that reads
380 data from the network. The **LiveSource** hint allows ParaView to periodically
381 check with the algorithm if it has new data and update the application, if so.
383 For that, one simply adds a hint to the proxy as follows:
389 <LiveSource interval="100" />
394 The algorithm subclass must have `bool GetNeedsUpdate()` method that returns
395 true if the algorithm needs update.
397 The `interval` attribute is optional (defaults to 100) and can be used to
398 provide a refresh rate in milliseconds.
400 The `refresh_on_interaction` boolean attribute is optional (defaults to false).
401 When enabled, allows live sources to be refreshed upon user interaction.
402 However, enabling this option can complicate interactions, especially with
405 The `emulated_time` attribute is optional and defaults to 0. It is a boolean
406 value that marks the live source as an emulated real-time algorithm, which
407 is an algorithm updated at regular time intervals based on real-time and
408 its available time steps (in seconds). Note that the proxy class must
409 inherit from the `vtkEmulatedTimeAlgorithm` class.
415 <LiveSource interval="50" emulated_time="1" />
421 --------------------------
422 Connect to a specific port index.
424 This is used to connect a representation to an output port of a filter
425 other than the default (index = 0). Currently, this is only used to
426 modify the input port for the selection representation subproxy in
427 vtkSMPVRepresentationProxy.
430 <RepresentationProxy ...>
433 <ConnectToPortIndex value="2" />
435 </RepresentationProxy>
439 --------------------------
440 Plugin specific hint to control how a filter/source is shown in menus
442 This is used **in plugins only** to configure how a source or filter
443 should be shown in the filters/sources menu. It enables to place them
444 into an existing category or a new category, as well as set the icon.
450 <ShowInMenu category="Category" icon=":/path/to/resource/icon.png" />
456 --------------------------
457 Disable the "Solid Color" option for a specific representation type.
459 This is used to indicate to the pqDisplayColorWidget to disable the
460 "Solid Color" option because this representation type doesn't handle it
464 <RepresentationProxy ...>
467 <NoSolidColor representation="Slice" />
468 <NoSolidColor representation="Volume" />
470 </RepresentationProxy>
474 --------------------------
475 Hide the mouse cursor when hovering a render view.
478 <RenderViewProxy ...>