Commit 42fc6b22 authored by Yohann Bearzi's avatar Yohann Bearzi
Browse files

Changing backend of plot over line

The new backend uses the new filter vtkProbeLineFilter.
The former backend can still be used and is deprecated in 5.10.
A test has been added to ensure that old state files still work.
parent c561f26a
......@@ -3,13 +3,13 @@ from paraview.simple import *
wavelet = Wavelet()
UpdatePipeline()
p = PlotOverLine(Input=wavelet, Source='Line')
p = PlotOverLine(Input=wavelet)
r = Show(p)
r.SeriesLabelPrefix = "plot1_"
p2 = PlotOverLine(Input=wavelet, Source='Line')
p2.Source.Point1 = [0.0, -10.0, 0.0]
p2.Source.Point2 = [0.0, 10.0, 0.0]
p2 = PlotOverLine(Input=wavelet)
p2.Point1 = [0.0, -10.0, 0.0]
p2.Point2 = [0.0, 10.0, 0.0]
r2 =Show(p2)
r2.SeriesLabelPrefix = "plot2_"
......
......@@ -50,6 +50,7 @@ ExternalData_Expand_Arguments(ParaViewData _
"DATA{${paraview_test_data_directory_input}/Data/MultiBlockWithPieces_1_0.vtp}"
"DATA{${paraview_test_data_directory_input}/Data/NE2_ps_bath.png}"
"DATA{${paraview_test_data_directory_input}/Data/OMETIFF/multi-channel-time-series.ome.tif}"
"DATA{${paraview_test_data_directory_input}/Data/PlotOverLineLegacy.pvsm}"
"DATA{${paraview_test_data_directory_input}/Data/PropertyLink.pvsm}"
"DATA{${paraview_test_data_directory_input}/Data/RectGrid2.vtk}"
"DATA{${paraview_test_data_directory_input}/Data/RodPlate/,REGEX:.*}"
......@@ -576,6 +577,7 @@ SET (TESTS_WITHOUT_BASELINES
OpacityWidgetRange.xml
OpenHelp.xml
PartialArrayInLineChart.xml
PlotOverLineLegacy.xml
PointCellDataConversion.xml
ReloadCGNSFile.xml
SearchBox.xml
......
......@@ -5,12 +5,12 @@
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/Alphabetical" command="activate" arguments="ProbeLine" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/frame/ChosenProxyWidget/InteractiveLine/point1X" command="set_string" arguments="-10" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/frame/ChosenProxyWidget/InteractiveLine/point1Y" command="set_string" arguments="-10" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/frame/ChosenProxyWidget/InteractiveLine/point1Z" command="set_string" arguments="10" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/frame/ChosenProxyWidget/InteractiveLine/point2X" command="set_string" arguments="10" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/frame/ChosenProxyWidget/InteractiveLine/point2Y" command="set_string" arguments="-10" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/frame/ChosenProxyWidget/InteractiveLine/point2Z" command="set_string" arguments="10" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/InteractiveLine/point1X" command="set_string" arguments="-10" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/InteractiveLine/point1Y" command="set_string" arguments="-10" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/InteractiveLine/point1Z" command="set_string" arguments="10" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/InteractiveLine/point2X" command="set_string" arguments="10" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/InteractiveLine/point2Y" command="set_string" arguments="-10" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/InteractiveLine/point2Z" command="set_string" arguments="10" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<!-- start trace -->
......
......@@ -26,11 +26,11 @@
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,24,3,/0:0/0:0" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/Recent" command="activate" arguments="ProbeLine" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/frame/ChosenProxyWidget/InteractiveLine/yAxis" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/InteractiveLine/yAxis" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_vcontainer/1QScrollBar0" command="mousePress" arguments="1,1,0,9,56" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_vcontainer/1QScrollBar0" command="mouseMove" arguments="1,0,0,8,93" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_vcontainer/1QScrollBar0" command="mouseRelease" arguments="1,0,0,8,93" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/frame/ChosenProxyWidget/Resolution/LineEdit0" command="set_string" arguments="13" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Resolution/LineEdit0" command="set_string" arguments="13" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/SeriesEditor/SeriesTable/AnnotationsTable" command="setCurrent" arguments="4.4" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/SeriesEditor/SeriesTable/AnnotationsTable" command="edit" arguments="4.4" />
......
......@@ -26,11 +26,11 @@
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,24,3,/0:0/0:0" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/Recent" command="activate" arguments="ProbeLine" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/frame/ChosenProxyWidget/InteractiveLine/yAxis" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/InteractiveLine/yAxis" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_vcontainer/1QScrollBar0" command="mousePress" arguments="1,1,0,9,56" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_vcontainer/1QScrollBar0" command="mouseMove" arguments="1,0,0,8,93" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_vcontainer/1QScrollBar0" command="mouseRelease" arguments="1,0,0,8,93" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/frame/ChosenProxyWidget/Resolution/LineEdit0" command="set_string" arguments="13" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Resolution/LineEdit0" command="set_string" arguments="13" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/SeriesEditor/SeriesTable/AnnotationsTable" command="setCurrent" arguments="4.4" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/SeriesEditor/SeriesTable/AnnotationsTable" command="edit" arguments="4.4" />
......
......@@ -20,6 +20,7 @@
<pqevent object="pqClientMainWindow/ApplicationSettings/buttonBox/1QPushButton0" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/DataAnalysis" command="activate" arguments="ProbeLine" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/SamplingPattern/ComboBox" command="activated" arguments="Sample Uniformly" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/SearchBox/SearchLineEdit" command="set_string" arguments="l" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/SearchBox/SearchLineEdit" command="set_string" arguments="lo" />
......
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_File" />
<pqevent object="pqClientMainWindow/menubar/menu_File" command="activate" arguments="actionFileLoadServerState" />
<pqevent object="pqClientMainWindow/FileLoadServerStateDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/Testing/Data/PlotOverLineLegacy.pvsm" />
</pqevents>
......@@ -756,23 +756,15 @@ void pqSLACManager::createPlotOverZ()
// Set up the line for the plot. The line is one of the inputs to the filter
// which is implicitly set up through a proxy list domain.
vtkSMProxy* plotProxy = plotFilter->getProxy();
pqSMProxy lineProxy = pqSMAdaptor::getProxyProperty(plotProxy->GetProperty("Source"));
if (!lineProxy)
{
qWarning() << "Could not retrieve plot line source. "
<< "Plot not set up correctly.";
}
else
{
QList<QVariant> minPoint;
minPoint << 0.0 << 0.0 << bounds[4];
pqSMAdaptor::setMultipleElementProperty(lineProxy->GetProperty("Point1"), minPoint);
QList<QVariant> maxPoint;
maxPoint << 0.0 << 0.0 << bounds[5];
pqSMAdaptor::setMultipleElementProperty(lineProxy->GetProperty("Point2"), maxPoint);
pqSMAdaptor::setElementProperty(lineProxy->GetProperty("Resolution"), 1000);
lineProxy->UpdateVTKObjects();
}
QList<QVariant> minPoint;
minPoint << 0.0 << 0.0 << bounds[4];
pqSMAdaptor::setMultipleElementProperty(plotProxy->GetProperty("Point1"), minPoint);
QList<QVariant> maxPoint;
maxPoint << 0.0 << 0.0 << bounds[5];
pqSMAdaptor::setMultipleElementProperty(plotProxy->GetProperty("Point2"), maxPoint);
pqSMAdaptor::setElementProperty(plotProxy->GetProperty("SamplingPattern"), 2);
pqSMAdaptor::setElementProperty(plotProxy->GetProperty("Resolution"), 1000);
plotProxy->UpdateVTKObjects();
plotFilter->updatePipeline();
// Make representation
......
......@@ -3,7 +3,11 @@
<ProxyGroup name="internal_filters">
<!-- ==================================================================== -->
<SourceProxy class="vtkPProbeFilter"
name="ProbeLine">
name="ProbeLineLegacy">
<Deprecated deprecated_in="5.10" to_remove_in="5.11">
This has been replaced by 'ProbeLine'. Please consider
using that instead.
</Deprecated>
<Documentation>Internal filter used by (filters, ProbeLine). The Plot
Over Line filter samples the data set attributes of the current data set
at the points along a line. The values of the point-centered variables
......@@ -117,7 +121,7 @@
<Documentation>Set the tolerance to use for
vtkDataSet::FindCell</Documentation>
</DoubleVectorProperty>
<!-- End ProbeLine -->
<!-- End ProbeLineLegacy -->
</SourceProxy>
</ProxyGroup>
<ProxyGroup name="filters">
......@@ -208,8 +212,8 @@
<!-- End ProbePoint -->
</SourceProxy>
<!-- ==================================================================== -->
<CompoundSourceProxy label="Plot Over Line"
name="ProbeLine">
<CompoundSourceProxy label="Plot Over Line Legacy"
name="ProbeLineLegacy">
<Documentation long_help="Sample data attributes at the points along a line. Probed lines will be displayed in a graph of the attributes."
short_help="Sample data values at the points along a line.">
The Plot Over Line filter samples the data set attributes
......@@ -220,11 +224,15 @@
point, whether or not it lies at an input point. The Probe
filter operates on any type of data and produces polygonal
output (a line).</Documentation>
<Deprecated deprecated_in="5.10" to_remove_in="5.11">
This has been replaced by 'ProbeLine'. Please consider
using that instead.
</Deprecated>
<Proxy compound_name="PlotOverLine1"
group="internal_filters"
id="491"
servers="1"
type="ProbeLine" />
type="ProbeLineLegacy" />
<Proxy compound_name="AppendArcLength1"
group="filters"
id="588"
......@@ -257,6 +265,174 @@
<OutputPort name="Output"
port_index="0"
proxy="AppendArcLength1" />
<!-- End ProbeLineLegacy -->
</CompoundSourceProxy>
<!-- ==================================================================== -->
<SourceProxy class="vtkProbeLineFilter"
label="Plot Over Line"
name="ProbeLine">
<Documentation>Internal filter used by (filters, ProbeLine). The Plot
Over Line filter samples the data set attributes of the current data set
at the points along a line. The values of the point-centered variables
along that line will be displayed in an XY Plot. This 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 line). One can use different sampling patterns
with this filter. "Sample At Cell Boundaries" gives the most accurate plots,
"Sample At Segment Centers" provides one sample per probed cells,
and "Sample Uniformally" samples uniformally along the input line.</Documentation>
<InputProperty command="SetInputConnection"
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>
<DoubleVectorProperty animateable="1"
command="SetPoint1"
default_values="0.0 0.0 0.0"
name="Point1"
number_of_elements="3">
<BoundsDomain default_mode="min"
mode="normal"
name="range">
<RequiredProperties>
<Property function="Input"
name="Input" />
</RequiredProperties>
</BoundsDomain>
<Documentation>This property controls the coordinates of the first
endpoint of the line.</Documentation>
</DoubleVectorProperty>
<DoubleVectorProperty animateable="1"
command="SetPoint2"
default_values="0.0 0.0 0.0"
name="Point2"
number_of_elements="3">
<BoundsDomain default_mode="max"
mode="normal"
name="range">
<RequiredProperties>
<Property function="Input"
name="Input" />
</RequiredProperties>
</BoundsDomain>
<Documentation>This property controls the coordinates of the second
endpoint of the line.</Documentation>
</DoubleVectorProperty>
<IntVectorProperty command="SetSamplingPattern"
name="SamplingPattern"
default_values="2"
number_of_elements="1">
<EnumerationDomain name="enum">
<Entry text="Sample At Cell Boundaries"
value="0" />
<Entry text="Sample At Segment Centers"
value="1" />
<Entry text="Sample Uniformly"
value="2" />
</EnumerationDomain>
</IntVectorProperty>
<IntVectorProperty command="SetLineResolution"
name="Resolution"
default_values="1000"
number_of_elements="1">
<Hints>
<PropertyWidgetDecorator type="GenericDecorator"
mode="visibility"
property="SamplingPattern"
value="2" />
<!-- show this widget when SamplingPattern==2 -->
</Hints>
<Documentation>This property sets the line resolution if sampling pattern is set to
"Sample Uniformly".</Documentation>
</IntVectorProperty>
<IntVectorProperty command="SetPassPartialArrays"
default_values="1"
name="PassPartialArrays"
number_of_elements="1"
panel_visibility="advanced">
<Documentation>When dealing with composite datasets, partial arrays are
common i.e. data-arrays that are not available in all of the blocks. By
default, this filter only passes those point and cell data-arrays that
are available in all the blocks i.e. partial array are removed. When
PassPartialArrays is turned on, this behavior is changed to take a
union of all arrays present thus partial arrays are passed as well.
However, for composite dataset input, this filter still produces a
non-composite output. For all those locations in a block of where a
particular data array is missing, this filter uses vtkMath::Nan() for
double and float arrays, while 0 for all other types of arrays i.e int,
char etc.</Documentation>
<BooleanDomain name="bool" />
</IntVectorProperty>
<IntVectorProperty command="SetPassCellArrays"
default_values="0"
name="PassCellArrays"
number_of_elements="1"
panel_visibility="advanced">
<Documentation>
When set the input's cell data arrays are shallow copied to the output.
</Documentation>
<BooleanDomain name="bool" />
</IntVectorProperty>
<IntVectorProperty command="SetPassPointArrays"
default_values="0"
name="PassPointArrays"
number_of_elements="1"
panel_visibility="advanced">
<Documentation>
When set the input's point data arrays are shallow copied to the output.
</Documentation>
<BooleanDomain name="bool" />
</IntVectorProperty>
<IntVectorProperty command="SetPassFieldArrays"
default_values="1"
name="PassFieldArrays"
number_of_elements="1"
panel_visibility="advanced">
<Documentation>
Set whether to pass the field-data arrays from the Input i.e. the input
providing the geometry to the output. On by default.
</Documentation>
<BooleanDomain name="bool" />
</IntVectorProperty>
<IntVectorProperty command="SetComputeTolerance"
default_values="1"
name="ComputeTolerance"
number_of_elements="1"
panel_visibility="advanced">
<Documentation>
Set whether to compute the tolerance or to use a user provided
value. On by default.
</Documentation>
<BooleanDomain name="bool" />
</IntVectorProperty>
<DoubleVectorProperty command="SetTolerance"
default_values="2.2204460492503131e-16"
name="Tolerance"
number_of_elements="1"
panel_visibility="advanced">
<DoubleRangeDomain min="2.2204460492503131e-16"
name="range" />
<Hints>
<PropertyWidgetDecorator type="ShowWidgetDecorator">
<Property name="ComputeTolerance" function="boolean_invert" />
</PropertyWidgetDecorator>
</Hints>
<Documentation>Set the tolerance to use for
vtkDataSet::FindCell</Documentation>
</DoubleVectorProperty>
<PropertyGroup label="Line Parameters" panel_widget="InteractiveLine">
<Property function="Point1WorldPosition" name="Point1" />
<Property function="Point2WorldPosition" name="Point2" />
</PropertyGroup>
<Hints>
<Visibility replace_input="0" />
<!-- View can be used to specify the preferred view for the proxy -->
......@@ -264,7 +440,7 @@
<Plotable />
</Hints>
<!-- End ProbeLine -->
</CompoundSourceProxy>
</SourceProxy>
<!-- ==================================================================== -->
<SourceProxy class="vtkPProbeFilter"
label="Legacy Resample With Dataset"
......
......@@ -13,9 +13,11 @@ smtesting.ProcessCommandLineArguments()
w = Wavelet()
UpdatePipeline()
p = PlotOverLine(Source='Line')
p.Source.Point1 = [-10.0, -10.0, -10.0]
p.Source.Point2 = [10.0, 10.0, 10.0]
p = PlotOverLine()
p.Point1 = [-10.0, -10.0, -10.0]
p.Point2 = [10.0, 10.0, 10.0]
p.Resolution = 1000
p.SamplingPattern = 2 # UNIFORM_SAMPLING
d = Show()
d.SeriesVisibility = ['RTData']
......
......@@ -33,3 +33,22 @@ renderView1.ResetCamera()
# update the view to ensure updated data information
renderView1.Update()
print("")
print("Testing Plot Over Line Legacy")
ResetSession()
paraview.compatibility.major = 5
paraview.compatibility.minor = 9
# Create plot over line proxy
p3 = PlotOverLine(Input=sourceDs)
# Check that its XML name is the one of the legacy
assert p3.GetXMLName() == "ProbeLineLegacy"
# Do a display pipeline
lineChartView1 = GetActiveViewOrCreate('XYChartView')
plot1Display = Show(p3, lineChartView1, 'XYChartRepresentation')
lineChartView1.Update()
......@@ -93,10 +93,10 @@ ResetCamera()
SaveScreenshot(tempdir + "/SaveScreenshotSurface.png", magnification=2)
SetActiveView(lineChartView1)
p = PlotOverLine(Source = "Line")
p.Source.Point1 = [-10.0, -10.0, -10.0]
p.Source.Point2 = [10.0, 10.0, 10.0]
p.Source.Resolution = 10
p = PlotOverLine()
p.Point1 = [-10.0, -10.0, -10.0]
p.Point2 = [10.0, 10.0, 10.0]
p.Resolution = 10
Show()
Render()
SaveScreenshot(tempdir + "/SaveScreenshotLinePlot.png", magnification=2)
......
......@@ -862,7 +862,7 @@ struct Process_5_9_to_5_10
return HandleSpreadsheetRepresentationCompositeDataSetIndex(document) &&
HandleExtractBlock(document) && HandleRepresentationBlockVisibility(document) &&
HandleRepresentationBlockColor(document) && HandleRepresentationBlockOpacity(document) &&
HandleSelectionQuerySource(document);
HandleSelectionQuerySource(document) && ConvertProbeLine(document);
}
static std::string GetSelector(unsigned int cid)
......@@ -1093,6 +1093,30 @@ struct Process_5_9_to_5_10
return true;
}
static bool ConvertProbeLine(xml_document& document)
{
bool warn = false;
pugi::xpath_node_set glyph_elements =
document.select_nodes("//ServerManagerState/Proxy[@group='filters' and @type='ProbeLine']");
for (pugi::xpath_node_set::const_iterator iter = glyph_elements.begin();
iter != glyph_elements.end(); ++iter)
{
iter->node().attribute("type").set_value("ProbeLineLegacy");
warn = true;
}
if (warn)
{
vtkGenericWarningMacro(
"The state file uses the old 'ProbeLine' filter implementation. "
"The implementation has changed in ParaView 5.10. "
"Consider replacing the Probe line filter with a new Probe line filter. The old "
"implementation "
"is still available as 'Probe Line Legacy' and will be used for loading this state file.");
}
return true;
}
};
} // end of namespace
......
1bca04a81d4aaaf0fb8c650eac52818d5d7acbf6053d9d94b5636fc82d50e4400c1e246243f45cad95d7afcc601c9dc3c96cdcad0e1ae5b3f595b47fced4bb36
......@@ -776,6 +776,12 @@ def GetProxy(module, key, **kwargs):
reader = builtins.getattr(module, key)(**kwargs)
reader.UseLegacyBlockNamesWithElementTypes = 1
return reader
if version <= 5.9:
if key == "PlotOverLine":
## in 5.10, we changed the backend of Plot Over Line
## This restores the previous backend.
probeLine = builtins.getattr(module, "PlotOverLineLegacy")(**kwargs)
return probeLine
return builtins.getattr(module, key)(**kwargs)
def lookupTableUpdate(lutName):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment