[Paraview] Incorporating ImplicitPlane widget into ServerManagerXML
Alex Rattner
Alex.Rattner at gatech.edu
Thu Aug 2 16:20:01 EDT 2012
Hi Sebastien,
Thank you very much for the advice. I was able to incorporate the
implicit_function plane property using this xml as a guide.
-Alex
On 08/01/2012 05:48 PM, Sebastien Jourdain wrote:
> Hi Alex,
>
> I don't fully understand what you mean but in ParaView the way clip or
> slice are doing is by using some subproxy that define the plane. I've
> just paste you both clip and slice proxy definition for convenience.
>
> <SourceProxy class="vtkPVMetaClipDataSet"
> name="Clip">
> <Documentation long_help="Clip with an implicit plane. Clipping
> does not reduce the dimensionality of the data set. The output data
> type of this filter is always an unstructured grid."
> short_help="Clip with an implicit plane.">The Clip filter
> cuts away a portion of the input data set using an
> implicit plane. This filter operates on all types of data
> sets, and it returns unstructured grid data on
> output.</Documentation>
> <IntVectorProperty command="PreserveInputCells"
> default_values="0"
> label="Crinkle clip"
> name="PreserveInputCells"
> number_of_elements="1">
> <BooleanDomain name="bool" />
> <Documentation>This parameter controls whether to extract entire cells
> in the given region or clip those cells so all of the output one stay
> only inside that region.</Documentation>
> </IntVectorProperty>
> <InputProperty command="SetInputConnection"
> name="Input">
> <ProxyGroupDomain name="groups">
> <Group name="sources" />
> <Group name="filters" />
> </ProxyGroupDomain>
> <DataTypeDomain name="input_type">
> <DataType value="vtkDataSet" />
> </DataTypeDomain>
> <InputArrayDomain name="input_array"
> number_of_components="1"
> optional="1" />
> <Documentation>This property specifies the dataset on which the Clip
> filter will operate.</Documentation>
> </InputProperty>
> <ProxyProperty command="SetClipFunction"
> label="Clip Type"
> name="ClipFunction">
> <ProxyGroupDomain name="groups">
> <Group name="implicit_functions" />
> </ProxyGroupDomain>
> <ProxyListDomain name="proxy_list">
> <Proxy group="implicit_functions"
> name="Plane" />
> <Proxy group="implicit_functions"
> name="Box" />
> <Proxy group="implicit_functions"
> name="Sphere" />
> <Proxy group="implicit_functions"
> name="Scalar" />
> </ProxyListDomain>
> <Documentation>This property specifies the parameters of the clip
> function (an implicit plane) used to clip the dataset.</Documentation>
> <Hints>
> <ShowInSummaryPanel />
> </Hints>
> </ProxyProperty>
> <DoubleVectorProperty information_only="1"
> name="InputBounds">
> <BoundsDomain name="bounds">
> <RequiredProperties>
> <Property function="Input"
> name="Input" />
> </RequiredProperties>
> </BoundsDomain>
> </DoubleVectorProperty>
> <StringVectorProperty animateable="0"
> command="SetInputArrayToProcess"
> element_types="0 0 0 0 2"
> label="Scalars"
> name="SelectInputScalars"
> number_of_elements="5">
> <ArrayListDomain attribute_type="Scalars"
> name="array_list">
> <RequiredProperties>
> <Property function="Input"
> name="Input" />
> </RequiredProperties>
> </ArrayListDomain>
> <FieldDataDomain name="field_list">
> <RequiredProperties>
> <Property function="Input"
> name="Input" />
> </RequiredProperties>
> </FieldDataDomain>
> <Documentation>If clipping with scalars, this property specifies the
> name of the scalar array on which to perform the clip
> operation.</Documentation>
> </StringVectorProperty>
> <DoubleVectorProperty command="SetValue"
> default_values="0.0"
> name="Value"
> number_of_elements="1">
> <ArrayRangeDomain name="scalar_range">
> <RequiredProperties>
> <Property function="Input"
> name="Input" />
> <Property function="ArraySelection"
> name="SelectInputScalars" />
> </RequiredProperties>
> </ArrayRangeDomain>
> <DoubleRangeDomain name="range" />
> <Documentation>If clipping with scalars, this property sets the scalar
> value about which to clip the dataset based on the scalar array chosen.
> (See SelectInputScalars.) If clipping with a clip function, this
> property specifies an offset from the clip function to use in the
> clipping operation. Neither functionality is currently available in
> ParaView's user interface.</Documentation>
> </DoubleVectorProperty>
> <IntVectorProperty command="SetInsideOut"
> default_values="0"
> name="InsideOut"
> number_of_elements="1">
> <BooleanDomain name="bool" />
> <Documentation>If this property is set to 0, the clip filter will
> return that portion of the dataset that lies within the clip function.
> If set to 1, the portions of the dataset that lie outside the clip
> function will be returned instead.</Documentation>
> </IntVectorProperty>
> <IntVectorProperty command="SetUseValueAsOffset"
> default_values="0"
> name="UseValueAsOffset"
> number_of_elements="1">
> <BooleanDomain name="bool" />
> <Documentation>If UseValueAsOffset is true, Value is used as an offset
> parameter to the implicit function. Otherwise, Value is used only when
> clipping using a scalar array.</Documentation>
> </IntVectorProperty>
> <Hints>
> <Visibility replace_input="2" />
> <Property name="UseValueAsOffset"
> show="0" />
> </Hints>
> <!-- End Clip -->
> </SourceProxy>
> ----------------------------
> <SourceProxy class="vtkPVMetaSliceDataSet"
> label="Slice"
> name="Cut">
> <Documentation long_help="This filter slices a data set with a
> plane. Slicing is similar to a contour. It creates surfaces from
> volumes and lines from surfaces."
> short_help="Slice datasets with planes.">This filter
> extracts the portion of the input dataset that lies along
> the specified plane. The Slice filter takes any type of
> dataset as input. The output of this filter is polygonal
> data.</Documentation>
> <IntVectorProperty command="PreserveInputCells"
> default_values="0"
> label="Crinkle slice"
> name="PreserveInputCells"
> number_of_elements="1">
> <BooleanDomain name="bool" />
> <Documentation>This parameter controls whether to extract the entire
> cells that are sliced by the region or just extract a triangulated
> surface of that region.</Documentation>
> </IntVectorProperty>
> <InputProperty command="SetInputConnection"
> name="Input">
> <ProxyGroupDomain name="groups">
> <Group name="sources" />
> <Group name="filters" />
> </ProxyGroupDomain>
> <DataTypeDomain name="input_type">
> <DataType value="vtkDataSet" />
> </DataTypeDomain>
> <Documentation>This property specifies the input to the Slice
> filter.</Documentation>
> </InputProperty>
> <ProxyProperty command="SetCutFunction"
> label="Slice Type"
> name="CutFunction">
> <ProxyGroupDomain name="groups">
> <Group name="implicit_functions" />
> </ProxyGroupDomain>
> <ProxyListDomain name="proxy_list">
> <Proxy group="implicit_functions"
> name="Plane" />
> <Proxy group="implicit_functions"
> name="Box" />
> <Proxy group="implicit_functions"
> name="Sphere" />
> </ProxyListDomain>
> <Documentation>This property sets the parameters of the slice
> function.</Documentation>
> </ProxyProperty>
> <DoubleVectorProperty information_only="1"
> name="InputBounds">
> <BoundsDomain name="bounds">
> <RequiredProperties>
> <Property function="Input"
> name="Input" />
> </RequiredProperties>
> </BoundsDomain>
> </DoubleVectorProperty>
> <DoubleVectorProperty animateable="1"
> command="SetValue"
> label="Slice Offset Values"
> name="ContourValues"
> number_of_elements_per_command="1"
> repeat_command="1"
> set_number_command="SetNumberOfContours"
> use_index="1">
> <BoundsDomain mode="magnitude"
> name="bounds">
> <RequiredProperties>
> <Property function="Input"
> name="Input" />
> </RequiredProperties>
> </BoundsDomain>
> <Documentation>The values in this property specify a list of current
> offset values. This can be used to create multiple slices with
> different centers. Each entry represents a new slice with its center
> shifted by the offset value.</Documentation>
> </DoubleVectorProperty>
> <Hints>
> <Visibility replace_input="2" />
> </Hints>
> <!-- End Cut -->
> </SourceProxy>
>
> Hope that help you figure out what you are looking for.
>
> Seb
>
> On Wed, Aug 1, 2012 at 2:40 PM, Alex Rattner<Alex.Rattner at gatech.edu> wrote:
>> Hello,
>>
>> I am trying to develop a compiled paraview filter that takes an input
>> plane/direction vector (like the clip or slice filters). Does anyone know of
>> example code that shows how to incorporate the ImplicitPlane widget into the
>> server manager xml. In particular, I want a way to get the Camera Normal. Is
>> this possible?
>>
>> Thanks,
>> Alex
>> _______________________________________________
>> 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
More information about the ParaView
mailing list