Utkarsh,<div><br></div><div>Thank you for your response it has helped me make the xml file shorter since I don't need to copy the PlaneSource to add a widget to it. Exposing the needed properties in the CompoundSourceProxy worked well but I cannot get the widget hints to work, whenever I add the hints section to the CompoundSourceProxy ParaView crashes when applying the filter to a volume. Do you know if I am doing things correctly? </div>
<div><br></div><div>I am using 32bit ParaView (3.8.1 and 3.10 rc1) on Windows 7</div><div><br></div><div>Here is the xml again (somewhat shorter this time):<br>------</div><div><div><ServerManagerConfiguration></div>
<div> <ProxyGroup name="filters"></div><div> <!-- Probe Filter --></div><div> <SourceProxy name="Probe Filter" class="vtkCompositeDataProbeFilter"></div><div> <InputProperty</div>
<div> name="Input"</div><div> command="AddInputConnection"</div><div> clean_command="RemoveAllInputs"</div><div> multiple_input="1"></div><div> <ProxyGroupDomain name="groups"></div>
<div> <Group name="sources"/></div><div> <Group name="filters"/></div><div> </ProxyGroupDomain></div><div> <DataTypeDomain name="input_type" composite_data_supported="1"></div>
<div> <DataType value="vtkDataObject"/></div><div> </DataTypeDomain></div><div> </InputProperty></div><div><br></div><div> <InputProperty</div><div> name="Source"</div>
<div> command="SetSourceConnection"</div><div> multiple_input="1"></div><div> <ProxyGroupDomain name="groups"></div><div> <Group name="sources"/></div>
<div> <Group name="filters"/></div><div> </ProxyGroupDomain></div><div> <DataTypeDomain name="input_type"></div><div> <DataType value="vtkDataSet"/></div>
<div> </DataTypeDomain></div><div> </InputProperty></div><div> </SourceProxy></div><div> </div><div> <!-- Compound Source --></div><div> <CompoundSourceProxy id="3316" servers="1" name="ProbePlane"></div>
<div> </div><div> <!-- Instance of Calculator so we can get the magnitude of the volume data source for the probe filter--></div><div> <Proxy group="filters" type="Calculator" id="2154" servers="1" compound_name="Calculator2"></div>
<div> <Property name="AttributeMode" id="2154.AttributeMode" number_of_elements="1"></div><div> <Element index="0" value="1"/></div><div> <Domain name="enum" id="2154.AttributeMode.enum"></div>
<div> <Entry value="1" text="point_data"/></div><div> <Entry value="2" text="cell_data"/></div><div> <Entry value="5" text="field_data"/></div>
<div> </Domain></div><div> </Property></div><div> <Property name="CoordinateResults" id="2154.CoordinateResults" number_of_elements="1"></div><div> <Element index="0" value="0"/></div>
<div> <Domain name="bool" id="2154.CoordinateResults.bool"/></div><div> </Property></div><div> <Property name="Function" id="2154.Function" number_of_elements="1"></div>
<div> <Element index="0" value="V_3D_01_X^2+V_3D_01_Y^2+V_3D_01_Z^2"/></div><div> </Property></div><div> <Property name="Input" id="2154.Input" number_of_elements="1"></div>
<div> <Domain name="groups" id="2154.Input.groups"></div><div> <Group value="sources"/></div><div> <Group value="filters"/></div><div>
</Domain></div><div> <Domain name="input_type" id="2154.Input.input_type"></div><div> <DataType value="vtkDataSet"/></div><div> </Domain></div>
<div> </Property></div><div> <Property name="ReplaceInvalidValues" id="2154.ReplaceInvalidValues" number_of_elements="1"></div><div> <Element index="0" value="1"/></div>
<div> <Domain name="bool" id="2154.ReplaceInvalidValues.bool"/></div><div> </Property></div><div> <Property name="ReplacementValue" id="2154.ReplacementValue" number_of_elements="1"></div>
<div> <Element index="0" value="0"/></div><div> <Domain name="range" id="2154.ReplacementValue.range"/></div><div> </Property></div><div> <Property name="ResultArrayName" id="2154.ResultArrayName" number_of_elements="1"></div>
<div> <Element index="0" value="Result"/></div><div> </Property></div><div> </Proxy></div><div> </div><div> <!-- instance of PlaneSource; used for visualizing the probe filter--></div>
<div> <Proxy group="sources" type="PlaneSource" id="2453" servers="1" compound_name="Plane2"></div><div> </Proxy></div><div><br></div><div> <!-- instance of Probe Filter --></div>
<div> <Proxy group="filters" type="Probe Filter" id="2867" servers="1" compound_name="ProbeFilter2"></div><div> <Property name="Input" id="2867.Input" number_of_elements="1"></div>
<div> <Proxy value="2453" output_port="0"/></div><div> <Domain name="groups" id="2867.Input.groups"></div><div> <Group value="sources"/></div>
<div> <Group value="filters"/></div><div> </Domain></div><div> <Domain name="input_type" id="2867.Input.input_type"></div><div> <DataType value="vtkDataObject"/></div>
<div> </Domain></div><div> </Property></div><div> <Property name="Source" id="2867.Source" number_of_elements="1"></div><div> <Proxy value="2154" output_port="0"/></div>
<div> <Domain name="groups" id="2867.Source.groups"></div><div> <Group value="sources"/></div><div> <Group value="filters"/></div><div>
</Domain></div><div> <Domain name="input_type" id="2867.Source.input_type"></div><div> <DataType value="vtkDataSet"/></div><div> </Domain></div>
<div> </Property></div><div> </Proxy></div><div> <ExposedProperties></div><div> <Property name="Input" proxy_name="Calculator2" exposed_name="Calcinput"/></div>
<div> <Property name="Function" proxy_name="Calculator2" exposed_name="Function"/></div><div> <Property name="Origin" proxy_name="Plane2" exposed_name="Origin"/></div>
<div> <Property name="Point1" proxy_name="Plane2" exposed_name="Point 1"/></div><div> <Property name="Point2" proxy_name="Plane2" exposed_name="Point 2"/></div>
<div> <Property name="XResolution" proxy_name="Plane2" exposed_name="X Resolution"/></div><div> <Property name="YResolution" proxy_name="Plane2" exposed_name="Y Resolution"/></div>
<div> </ExposedProperties></div><div><br></div><div> <!-- Uncommenting this crashes ParaView when applying the CompoundSourceProxy filter</div><div> <Hints></div><div> <PropertyGroup type="LineSource" ></div>
<div> <Property function="Point1WorldPosition" name="Point1" /></div><div> <Property function="Point2WorldPosition" name="Point2" /></div><div> <Property function="Resolution" name="XResolution" /></div>
<div> </PropertyGroup></div><div> </Hints>--></div><div><br></div><div><br></div><div> <OutputPort name="ProbeOut" proxy="ProbeFilter2" port_index="0"/></div>
<div> </CompoundSourceProxy></div><div> </ProxyGroup></div><div></ServerManagerConfiguration></div><div>-----</div><div>Thanks</div><div>BR/ Christoffer</div><div><br></div><div class="gmail_quote">On Mon, Feb 14, 2011 at 6:52 AM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Christoffer,<br>
<br>
You need to redefine the Hints for the "PropertyGroup" on the<br>
CompoundSourceProxy as well. Also the properties that the widget is<br>
controlling, such as Point1WorldPosition, Point2WorldPosition,<br>
Resolution must be exposed from the CompoundSourceProxy.<br>
<br>
Utkarsh<br>
<div><div></div><div class="h5"><br>
On Mon, Feb 14, 2011 at 9:44 AM, Christoffer Green<br>
<<a href="mailto:christoffer.green@gmail.com">christoffer.green@gmail.com</a>> wrote:<br>
> Hello!<br>
> I am trying to write an xml definition for a CompoundSourceProxy in ParaView<br>
> 3.8.1 that produces a plane that is used by a probe filter to<br>
> show the ParaView input (volume data in my case) on the plane. The position<br>
> and orientation of the plane should be controlled by a widget.<br>
> The problem:<br>
> I have been able to create a plane as a SourceProxy that is controlled by a<br>
> widget and I have been able to create a CompoundSourceProxy that shows the<br>
> volume data on a plane but the CompoundSourceProxy does not show the Widget<br>
> that is defined with the PropertyGroup hints in the SourceProxy plane. If I<br>
> create an instance of the plane without the CompoundSourceProxy then the<br>
> widget is displayed as it should. Does hint widget information disappear<br>
> when sources are used in a CompoundSourceProxy? How does one use widgets to<br>
> control properties in subproxies in a CompoundSourceProxy?<br>
> The xml definition I have written follows here (sorry about the length):<br>
> -----------------------<br>
> The structure of this file is like so:<br>
> ParaViewInput(Volume)-->Calculator--(source)-->Probe<br>
> Filter<--(input)--PlaneSource<--Widget<br>
> <ServerManagerConfiguration><br>
> <ProxyGroup name="sources"><br>
> <!-- Plane Source --><br>
> <SourceProxy name="PlaneSourceWithWidget" class="vtkPlaneSource"<br>
> label="PlaneWithWidget"><br>
> <Documentation<br>
> long_help="Create a parallelogram given an origin and two points.<br>
> The resolution indicates the number of division along each axis of the<br>
> plane."<br>
> short_help="Create a parallelogram from an origin and two points"><br>
> The Plane source can be used to add a polygonal parallelogram to the 3D<br>
> scene. Unlike the sphere, cone, and cylinder sources, the parallelogram is<br>
> exactly represented at the lowest resolution, but higher resolutions may be<br>
> desired if this plane is to be used as an input to a filter. The output of<br>
> the Plane source is polygonal data.<br>
> </Documentation><br>
> <DoubleVectorProperty<br>
> name="Origin"<br>
> command="SetOrigin"<br>
> number_of_elements="3"<br>
> animateable="1"<br>
> default_values="-0.5 -0.5 0.0" ><br>
> <DoubleRangeDomain name="range"/><br>
> <Documentation><br>
> This property specifies the 3D coordinate of the origin (one<br>
> corner) of the plane.<br>
> </Documentation><br>
> </DoubleVectorProperty><br>
> <DoubleVectorProperty<br>
> name="Point1"<br>
> command="SetPoint1"<br>
> number_of_elements="3"<br>
> animateable="1"<br>
> default_values="0.5 -0.5 0.0" ><br>
> <DoubleRangeDomain name="range"/><br>
> <Documentation><br>
> This property specifies the 3D coordinate a second corner of the<br>
> parallelogram. The line connecting this point and that specified by the<br>
> Origin property define one edge of the parallelogram (its X axis).<br>
> </Documentation><br>
> </DoubleVectorProperty><br>
> <DoubleVectorProperty<br>
> name="Point2"<br>
> command="SetPoint2"<br>
> number_of_elements="3"<br>
> animateable="1"<br>
> default_values="-0.5 0.5 0.0" ><br>
> <DoubleRangeDomain name="range"/><br>
> <Documentation><br>
> This property specifies the 3D coordinate a third corner of the<br>
> parallelogram. The line connecting this point and that specified by the<br>
> Origin property define a second edge of the parallelogram (its Y axis).<br>
> </Documentation><br>
> </DoubleVectorProperty><br>
> <IntVectorProperty<br>
> name="XResolution"<br>
> command="SetXResolution"<br>
> number_of_elements="1"<br>
> default_values="100" ><br>
> <IntRangeDomain name="range" min="1" /><br>
> <Documentation><br>
> This property specifies the number of divisions along the X axis<br>
> of the parallelogram.<br>
> </Documentation><br>
> </IntVectorProperty><br>
> <IntVectorProperty<br>
> name="YResolution"<br>
> command="SetYResolution"<br>
> number_of_elements="1"<br>
> default_values="100" ><br>
> <IntRangeDomain name="range" min="1" /><br>
> <Documentation><br>
> This property specifies the number of divisions along the Y axis<br>
> of the parallelogram.<br>
> </Documentation><br>
> </IntVectorProperty><br>
> <Hints><br>
> <PropertyGroup type="LineSource" ><br>
> <Property function="Point1WorldPosition" name="Point1" /><br>
> <Property function="Point2WorldPosition" name="Point2" /><br>
> <Property function="Resolution" name="XResolution" /><br>
> </PropertyGroup><br>
> </Hints><br>
> </SourceProxy><br>
> </ProxyGroup><br>
><br>
><br>
> <ProxyGroup name="filters"><br>
> <!-- Probe Filter --><br>
> <SourceProxy name="Probe Filter" class="vtkCompositeDataProbeFilter"><br>
> <InputProperty<br>
> name="Input"<br>
> command="AddInputConnection"<br>
> clean_command="RemoveAllInputs"<br>
> multiple_input="1"><br>
> <ProxyGroupDomain name="groups"><br>
> <Group name="sources"/><br>
> <Group name="filters"/><br>
> </ProxyGroupDomain><br>
> <DataTypeDomain name="input_type" composite_data_supported="1"><br>
> <DataType value="vtkDataObject"/><br>
> </DataTypeDomain><br>
> </InputProperty><br>
> <InputProperty<br>
> name="Source"<br>
> command="SetSourceConnection"<br>
> multiple_input="1"><br>
> <ProxyGroupDomain name="groups"><br>
> <Group name="sources"/><br>
> <Group name="filters"/><br>
> </ProxyGroupDomain><br>
> <DataTypeDomain name="input_type"><br>
> <DataType value="vtkDataSet"/><br>
> </DataTypeDomain><br>
> </InputProperty><br>
> </SourceProxy><br>
><br>
> <!-- Compound --><br>
> <CompoundSourceProxy id="3316" servers="1" name="ProbePlane"><br>
> <!-- Instance of Calculator so we can get the magnitude of the volume<br>
> data source for the probe filter--><br>
> <Proxy group="filters" type="Calculator" id="2154" servers="1"<br>
> compound_name="Calculator2"><br>
> <Property name="AttributeMode" id="2154.AttributeMode"<br>
> number_of_elements="1"><br>
> <Element index="0" value="1"/><br>
> <Domain name="enum" id="2154.AttributeMode.enum"><br>
> <Entry value="1" text="point_data"/><br>
> <Entry value="2" text="cell_data"/><br>
> <Entry value="5" text="field_data"/><br>
> </Domain><br>
> </Property><br>
> <Property name="CoordinateResults" id="2154.CoordinateResults"<br>
> number_of_elements="1"><br>
> <Element index="0" value="0"/><br>
> <Domain name="bool" id="2154.CoordinateResults.bool"/><br>
> </Property><br>
> <Property name="Function" id="2154.Function" number_of_elements="1"><br>
> <Element index="0" value="V_3D_01_X^2+V_3D_01_Y^2+V_3D_01_Z^2"/><br>
> </Property><br>
> <Property name="Input" id="2154.Input" number_of_elements="1"><br>
> <Domain name="groups" id="2154.Input.groups"><br>
> <Group value="sources"/><br>
> <Group value="filters"/><br>
> </Domain><br>
> <Domain name="input_type" id="2154.Input.input_type"><br>
> <DataType value="vtkDataSet"/><br>
> </Domain><br>
> </Property><br>
> <Property name="ReplaceInvalidValues" id="2154.ReplaceInvalidValues"<br>
> number_of_elements="1"><br>
> <Element index="0" value="1"/><br>
> <Domain name="bool" id="2154.ReplaceInvalidValues.bool"/><br>
> </Property><br>
> <Property name="ReplacementValue" id="2154.ReplacementValue"<br>
> number_of_elements="1"><br>
> <Element index="0" value="0"/><br>
> <Domain name="range" id="2154.ReplacementValue.range"/><br>
> </Property><br>
> <Property name="ResultArrayName" id="2154.ResultArrayName"<br>
> number_of_elements="1"><br>
> <Element index="0" value="Result"/><br>
> </Property><br>
> </Proxy><br>
><br>
> <!-- instance of PlaneSourceWithWidget --><br>
> <Proxy group="sources" type="PlaneSourceWithWidget" id="2453"<br>
> servers="1" compound_name="Plane2"><br>
> </Proxy><br>
> <!-- instance of Probe Filter --><br>
> <Proxy group="filters" type="Probe Filter" id="2867" servers="1"<br>
> compound_name="ProbeFilter2"><br>
> <Property name="Input" id="2867.Input" number_of_elements="1"><br>
> <Proxy value="2453" output_port="0"/><br>
> <Domain name="groups" id="2867.Input.groups"><br>
> <Group value="sources"/><br>
> <Group value="filters"/><br>
> </Domain><br>
> <Domain name="input_type" id="2867.Input.input_type"><br>
> <DataType value="vtkDataObject"/><br>
> </Domain><br>
> </Property><br>
> <Property name="Source" id="2867.Source" number_of_elements="1"><br>
> <Proxy value="2154" output_port="0"/><br>
> <Domain name="groups" id="2867.Source.groups"><br>
> <Group value="sources"/><br>
> <Group value="filters"/><br>
> </Domain><br>
> <Domain name="input_type" id="2867.Source.input_type"><br>
> <DataType value="vtkDataSet"/><br>
> </Domain><br>
> </Property><br>
> </Proxy><br>
> <ExposedProperties><br>
> <Property name="Input" proxy_name="Calculator2"<br>
> exposed_name="Calcinput"/><br>
> <Property name="Function" proxy_name="Calculator2"<br>
> exposed_name="Function"/><br>
> <Property name="XResolution" proxy_name="Plane2" exposed_name="X<br>
> Resolution"/><br>
> <Property name="YResolution" proxy_name="Plane2" exposed_name="Y<br>
> Resolution"/><br>
> </ExposedProperties><br>
> <OutputPort name="ProbeOut" proxy="ProbeFilter2" port_index="0"/><br>
> </CompoundSourceProxy><br>
> </ProxyGroup><br>
> </ServerManagerConfiguration><br>
> -------------------------------------------<br>
> Thanks<br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
><br>
><br>
</blockquote></div><br></div>