[Paraview] Programmatic access to Probe Location point

Andy Bauer andy.bauer at kitware.com
Mon May 20 21:48:47 EDT 2013


Hi,

It's a sub-proxy that is used to define the probe location. The name of
that is FixedRadiusPointSource. You can find that in filters.xml (partly
shown below). The proxy definition of FixedRadiusPointSource is in
utilities.xml (also partly shown below).

Hope this points you in the proper direction.

Andy

=========== snippet of filters.xml ====================
    <SourceProxy class="vtkPProbeFilter"
                 label="Probe Location"
                 name="ProbePoint">
      <Documentation long_help="Sample data attributes at the points in a
point cloud."
                     short_help="Sample data values at the points in a
point cloud.">
                     The Probe filter samples the data set attributes of the
                     current data set at the points in a point cloud. The
Probe
                     filter uses interpolation to determine the values at
the
                     selected point, whether or not it lies at an input
point.
                     The Probe filter operates on any type of data and
produces
                     polygonal output (a point cloud).</Documentation>
      <InputProperty command="SetSourceConnection"
                     name="Input">
        <ProxyGroupDomain name="groups">
          <Group name="sources" />
          <Group name="filters" />
        </ProxyGroupDomain>
        <DataTypeDomain name="input_type">
          <DataType value="vtkDataSet" />
          <DataType value="vtkCompositeDataSet" />
        </DataTypeDomain>
        <InputArrayDomain name="input_array" />
        <Documentation>This property specifies the dataset from which to
obtain
        probe values.</Documentation>
      </InputProperty>
      <InputProperty command="SetInputConnection"
                     label="Probe Type"
                     name="Source">
        <ProxyGroupDomain name="groups">
          <Group name="sources" />
        </ProxyGroupDomain>
        <ProxyListDomain name="proxy_list">
          <Proxy group="extended_sources"
                 name="FixedRadiusPointSource" />
        </ProxyListDomain>
        <Documentation>This property specifies the dataset whose geometry
will
        be used in determining positions to probe.</Documentation>
      </InputProperty>
      <Hints>
        <Visibility replace_input="0" />
      </Hints>
      <!-- End ProbePoint -->
    </SourceProxy>

============== snippet of utilities.xml =================
    <SourceProxy class="vtkPointSource"
                 label="Fixed Radius Point Source"
                 name="FixedRadiusPointSource">
      <DoubleVectorProperty animateable="1"
                            command="SetCenter"
                            default_values="0.0 0.0 0.0"
                            name="Center"
                            number_of_elements="3">
        <BoundsDomain default_mode="mid"
                      mode="normal"
                      name="range">
          <RequiredProperties>
            <Property function="Input"
                      name="DummyInput" />
          </RequiredProperties>
        </BoundsDomain>
      </DoubleVectorProperty>
      <IntVectorProperty animateable="1"
                         command="SetNumberOfPoints"
                         default_values="1"
                         name="NumberOfPoints"
                         number_of_elements="1">
        <IntRangeDomain min="1"
                        name="range" />
      </IntVectorProperty>
      <DoubleVectorProperty animateable="1"
                            command="SetRadius"
                            default_values="0.0"
                            name="Radius"
                            number_of_elements="1">
        <DoubleRangeDomain min="0.0"
                           name="range" />
      </DoubleVectorProperty>
      <InputProperty is_internal="1"
                     name="DummyInput">
        <!-- Used when this source is added to a proxy list domain. -->
      </InputProperty>
      <Hints>
        <PropertyGroup type="PointSource">
          <Property function="WorldPosition"
                    name="Center" />
          <Property function="Radius"
                    name="Radius" />
          <Property function="NumberOfPoints"
                    name="NumberOfPoints" />
        </PropertyGroup>
        <ProxyList>
          <Link name="DummyInput"
                with_property="Input" />
        </ProxyList>
      </Hints>
      <!-- End PointSource -->
    </SourceProxy>



On Mon, May 20, 2013 at 4:00 PM, Reuter, Michael A. <reuterma at ornl.gov>wrote:

> Hi,
>
> I'm trying to programmatically (C++) access the point coordinates
> displayed by the property panel widget after the p key is pressed. I have a
> pqPipelineSource pointer from when I created the Probe Location filter, but
> I can't seem to find any properties (tried Point, Center, WorldPosition) on
> the proxy that work. I also tried accessing those properties via the source
> proxy, but no luck either. If the proxy has the information, what is the
> correct property name? If not, where do I need to be looking?
>
> Thanks,
> M
>
> Dr. Michael Reuter
> Data Analysis and Visualization Group
> Neutron Data Analysis and Visualization Division
> Oak Ridge National Laboratory
>
> Office: 1-865-241-7216
> Fax: 1-865-574-6080
> Email: reuterma at ornl.gov
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130520/bec58f31/attachment.htm>


More information about the ParaView mailing list