Commit 2a02301e authored by Mathieu Westphal's avatar Mathieu Westphal Committed by Kitware Robot

Merge topic 'vtkPVGlyphFilterFixesAndTest'

f6d17f88 Updating VTK
b32a5307 Adding a test for GlyphWithEmptyCells
af479202 Removing left over array
4bc4f878 Correcting Surface mgt with extract surface filter
1da67936 Correcting a incorect volume computation
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Joachim Pouderoux's avatarJoachim Pouderoux <joachim.pouderoux@kitware.com>
Acked-by: Michael Migliore's avatarMichael Migliore <michael.migliore@kitware.com>
Merge-request: !2919
parents 5bc7a7bd f6d17f88
Pipeline #125311 failed with stage
in 0 seconds
......@@ -50,6 +50,7 @@ paraview_test_load_data(""
dualSphereAnimation4.pvd
dualSphereAnimation.clone.pvd
dualSphereAnimation.pvd
elements.vtu
iron_protein.vtk
linesPolydata.vtk
LoadState.pvsm
......@@ -388,6 +389,7 @@ list(APPEND TESTS_WITH_BASELINES
${CMAKE_CURRENT_SOURCE_DIR}/Glyph3DCullingAndLOD.xml
${CMAKE_CURRENT_SOURCE_DIR}/Glyph3DRepresentation.xml
${CMAKE_CURRENT_SOURCE_DIR}/GlyphUseCellCenters.xml
${CMAKE_CURRENT_SOURCE_DIR}/GlyphWithEmptyCells.xml
${CMAKE_CURRENT_SOURCE_DIR}/H5PartReader.xml
${CMAKE_CURRENT_SOURCE_DIR}/HideAll.xml
${CMAKE_CURRENT_SOURCE_DIR}/HorizontalColorLegendTitle.xml
......
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/MainControlsToolbar/actionOpenData" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/FileOpenDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/elements.vtu" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/Alphabetical" command="activate" arguments="Calculator" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/AttributeType/ComboBox" command="activated" arguments="Cell Data" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Function/Function" command="set_string" arguments="1" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/variableToolbar/actionScalarBarVisibility" command="set_boolean" arguments="false" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/pqProxyGroupMenuManager0/Glyph" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/comboBox" command="activated" arguments="Sphere" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/frame/ChosenProxyWidget/Radius/DoubleLineEdit0" command="set_full_precision_text" arguments="0.8" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/OrientationArray/ComboBox" command="activated" arguments="No orientation array" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ScaleArray/ComboBox" command="activated" arguments="No scale array" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/GlyphMode/ComboBox" command="activated" arguments="Uniform Spatial Distribution (Surface Sampling)" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/variableToolbar/displayColor/Variables" command="activated" arguments="Solid Color" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/GlyphWithEmptyCells_A.png" threshold="5" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/GlyphMode/ComboBox" command="activated" arguments="Uniform Spatial Distribution (Volume Sampling)" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/variableToolbar/displayColor/Variables" command="activated" arguments="Solid Color" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/GlyphWithEmptyCells_B.png" threshold="5" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ScaleArray/ComboBox" command="activated" arguments="Result" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/frame/ChosenProxyWidget/Radius/DoubleLineEdit0" command="set_full_precision_text" arguments="0.8" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/variableToolbar/displayColor/Variables" command="activated" arguments="Solid Color" />
<pqcompareview object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" baseline="$PARAVIEW_DATA_ROOT/Baseline/GlyphWithEmptyCells_C.png" threshold="5" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/GlyphMode/ComboBox" command="activated" arguments="Uniform Spatial Distribution (Surface Sampling)" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Source/ProxySelectionWidget/frame/ChosenProxyWidget/Radius/DoubleLineEdit0" command="set_full_precision_text" arguments="0.5" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/variableToolbar/displayColor/Variables" command="activated" arguments="Solid Color" />
</pqevents>
......@@ -250,6 +250,21 @@ public:
return dataSetToReturn;
}
if (glyphMode == vtkPVGlyphFilter::SPATIALLY_UNIFORM_INVERSE_TRANSFORM_SAMPLING_SURFACE)
{
vtkPolyData* pd = vtkPolyData::SafeDownCast(ds);
if (!pd)
{
// If dataset is not a PolyData, just extracts its surface so it will be used to sample
// glyphs instead
vtkNew<vtkDataSetSurfaceFilter> surface;
surface->SetInputData(ds);
surface->Update();
dataSetToReturn = surface->GetOutput();
ds = dataSetToReturn.Get();
}
}
// Get a sampling vector from the map
auto empRet = this->UniformSamplingVectorMap.emplace(std::piecewise_construct,
std::make_tuple(index), std::make_tuple(ds->GetNumberOfCells(), 0.0));
......@@ -266,17 +281,6 @@ public:
if (glyphMode == vtkPVGlyphFilter::SPATIALLY_UNIFORM_INVERSE_TRANSFORM_SAMPLING_SURFACE)
{
vtkPolyData* pd = vtkPolyData::SafeDownCast(ds);
if (!pd)
{
// If dataset is not a PolyData, just extracts its surface so it will be used to sample
// glyphs instead
vtkNew<vtkDataSetSurfaceFilter> surface;
surface->SetInputData(ds);
surface->Update();
dataSetToReturn = ds = surface->GetOutput();
}
vtkNew<vtkTriangleFilter> triangleFilter;
triangleFilter->SetInputData(ds);
triangleFilter->PassLinesOff();
......@@ -344,7 +348,7 @@ public:
tetraUG->GetPoint(pts[2], p3);
tetraUG->GetPoint(pts[3], p4);
uniformSamplingVector[cellIdArray->GetValue(tetraId)] +=
vtkTetra::ComputeVolume(p1, p2, p3, p4);
std::abs(vtkTetra::ComputeVolume(p1, p2, p3, p4));
}
}
// Compute a partial sum on the sampling vector in order to perform sampling later
......@@ -1115,6 +1119,9 @@ bool vtkPVGlyphFilter::Execute(unsigned int index, vtkDataSet* input,
outputPD->SetNormals(newNormals);
}
// In certain cases, we can have a left over processing array, remove it.
outputPD->RemoveArray(IDS_ARRAY_NAME.c_str());
// Update ourselves and release memory
//
output->SetPoints(newPts);
......
e0262b86764ff4117081bf89c83f8b3b24ba9c8c577de22d243c95c4443911d979939acc3df4cc682a57cf40895b13073a669fd2697047b35fd1a220e3cd0b11
5c20ba1c6677c99bb1d1b835c1f230d8eed72b08d6ea9e931c2b08c104a11e809a367f2d3e9d0aef543700fded97f9348189db842db5d618e9b48b57c21d245e
fd96486ee83a97fd85a75304e0e21018ab916a67c1ac388f8ec4cce12fcf1fde2425278e37353e41b92632ff0d19fd70add2083d6a09a317d04a7b6f1551ea0f
d1e2bfbd484fe4a4e0ca89bbc44e2dd68948d81b6e075839aae6786e4f0fda113cc29f1eff99458b6630e8ee4b88a16d5fb13333d08b85d22396cf5098b9d461
e5a9f7b71ebb4f3de27d43430cfe6692bb0e7651e4403cadf360f55466f6ce72f7779f1fdf8375c77208af499c48c66cba99f3e7fb6e58a6cb2a9601b99e4051
9a3811bb4c49fdf8756ad284dbcb22b264f238dda516686d1982bc9821a0d5d6b1e7811ce1fb0ce64eea9ddc5a69dd690bbe3b8dda5decb9f40fc0994d7bf23e
Subproject commit a0a135b7c461abe9fa2bf697a9e03b7f7eaec9a9
Subproject commit dc363af76b5bf4618c3265be15fb66ea9cd9c80c
Markdown is supported
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