Commit 5bfb8679 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

BUG #13482. Fix outlines for reclinear and structured grids.

Outline for vtkStructuredGrid and vtkRectilinearGrid was not working correctly
in parallel. We would see internal outlines. The issue was introduce by VTK 6.0
API changes. Since the data object no longer provides pipeline information and
hence no WHOLE_EXTENT information is available, we have to explicitly create
vtkPVTrivialProducer to pass the whole_extent correctly to the internal filters.

Adding a new test (DataOutlines) to test this functionality.
parent e83f939e
......@@ -76,6 +76,7 @@ SET (TESTS_WITH_BASELINES
${CMAKE_CURRENT_SOURCE_DIR}/CreateDelete.xml
${CMAKE_CURRENT_SOURCE_DIR}/CustomFilter.xml
${CMAKE_CURRENT_SOURCE_DIR}/CustomSourceProbe.xml
${CMAKE_CURRENT_SOURCE_DIR}/DataOutlines.xml
${CMAKE_CURRENT_SOURCE_DIR}/D3SmallCells.xml
${CMAKE_CURRENT_SOURCE_DIR}/DualSphereAnimation.xml
${CMAKE_CURRENT_SOURCE_DIR}/EnSight.xml
......@@ -219,6 +220,7 @@ set(CTHDerivedDensity2DClyinder_USE_NEW_PANELS TRUE)
set(CustomFilter_USE_NEW_PANELS TRUE)
set(CustomSourceProbe_USE_NEW_PANELS TRUE)
set(D3SmallCells_USE_NEW_PANELS TRUE)
set(DataOutlines_USE_NEW_PANELS TRUE)
set(DualSphereAnimation_USE_NEW_PANELS TRUE)
set(EnSight_USE_NEW_PANELS TRUE)
set(ExodusXML_USE_NEW_PANELS TRUE)
......@@ -301,6 +303,7 @@ set(MultiSliceMultiBlock_DISABLE_CRS TRUE)
set(3DWidgetInCustomFilter_BREAK TRUE)
set(Threshold_BREAK TRUE)
set(ExodusModeShapes_BREAK TRUE)
set(DataOutlines_BREAK TRUE)
# These tests cannot be run using ctest -j since they are affected by focus
# changed events.
......
<?xml version="1.0" ?>
<pqevents>
<!-- this test checks if outlines for various structured datasets shows up
correctly, especially in parallel, without internal seams -->
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_File" />
<pqevent object="pqClientMainWindow/menubar/menu_File" command="activate" arguments="actionFileOpen" />
<pqevent object="pqClientMainWindow/FileOpenDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/Data/iron protein.vtk" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/MainControlsToolbar/actionOpenData" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/FileOpenDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/Data/RectGrid2.vtk" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/MainControlsToolbar/actionOpenData" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/FileOpenDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/Data/office.binary.vtk" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,56,10,/0:0/0:0" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,56,10,/0:0/0:0" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Delete" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/OptionsButton" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/ActiveRenderViewOptions/Stack/pqRenderViewOptions/stackedWidget/General/parallelProjection" command="set_boolean" arguments="true" />
<pqevent object="pqClientMainWindow/ActiveRenderViewOptions/CloseButton" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/MainControlsToolbar/actionOpenData" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/FileOpenDialog" command="cancelled" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
<pqevent object="pqClientMainWindow/menubar/menuSources" command="activate" arguments="RTAnalyticSource" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/WholeExtent/LineEdit0" command="set_string" arguments="-2" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/WholeExtent/LineEdit1" command="set_string" arguments="2" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/WholeExtent/LineEdit2" command="set_string" arguments="-2" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/WholeExtent/LineEdit3" command="set_string" arguments="2" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/WholeExtent/LineEdit4" command="set_string" arguments="-2" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/WholeExtent/LineEdit5" command="set_string" arguments="2" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/axesToolbar/actionShowCenterAxes" command="set_boolean" arguments="false" />
<pqevent object="pqClientMainWindow/axesToolbar/actionShowOrientationAxes" command="set_boolean" arguments="false" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuTools" />
<pqevent object="pqClientMainWindow/menubar/menuTools" command="activate" arguments="actionTesting_Window_Size" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionResetCamera" command="activate" arguments="" />
</pqevents>
......@@ -23,9 +23,9 @@
#include "vtkCellTypes.h"
#include "vtkCleanArrays.h"
#include "vtkCommand.h"
#include "vtkDataObjectTreeIterator.h"
#include "vtkCompositeDataPipeline.h"
#include "vtkCompositeDataSet.h"
#include "vtkDataObjectTreeIterator.h"
#include "vtkDataSetSurfaceFilter.h"
#include "vtkFloatArray.h"
#include "vtkGarbageCollector.h"
......@@ -51,6 +51,7 @@
#include "vtkPolyData.h"
#include "vtkPolygon.h"
#include "vtkPVRecoverGeometryWireframe.h"
#include "vtkPVTrivialProducer.h"
#include "vtkRectilinearGrid.h"
#include "vtkRectilinearGridOutlineFilter.h"
#include "vtkSelectionNode.h"
......@@ -1296,14 +1297,15 @@ void vtkPVGeometryFilter::StructuredGridExecute(vtkStructuredGrid* input,
}
this->OutlineFlag = 1;
//
// Otherwise, let Outline do all the work
//
vtkNew<vtkPVTrivialProducer> producer;
producer->SetOutput(input);
producer->SetWholeExtent(
wholeExtent[0], wholeExtent[1],
wholeExtent[2], wholeExtent[3],
wholeExtent[4], wholeExtent[5]);
vtkStructuredGridOutlineFilter *outline = vtkStructuredGridOutlineFilter::New();
// Because of streaming, it is important to set the input and not copy it.
outline->SetInputData(input);
vtkNew<vtkStructuredGridOutlineFilter> outline;
outline->SetInputConnection(producer->GetOutputPort());
vtkStreamingDemandDrivenPipeline::SetUpdateNumberOfPieces(
outline->GetOutputInformation(0), updateNumPieces);
vtkStreamingDemandDrivenPipeline::SetUpdatePiece(
......@@ -1311,17 +1313,15 @@ void vtkPVGeometryFilter::StructuredGridExecute(vtkStructuredGrid* input,
vtkStreamingDemandDrivenPipeline::SetUpdateGhostLevel(
outline->GetOutputInformation(0), updateGhosts);
outline->Update();
output->CopyStructure(outline->GetOutput());
outline->Delete();
}
//----------------------------------------------------------------------------
void vtkPVGeometryFilter::RectilinearGridExecute(vtkRectilinearGrid* input,
vtkPolyData* output,
int updatePiece,
int updateNumPieces,
int updateGhosts,
int vtkNotUsed(updatePiece),
int vtkNotUsed(updateNumPieces),
int vtkNotUsed(updateGhosts),
const int* wholeExtent)
{
if (!this->UseOutline)
......@@ -1336,23 +1336,17 @@ void vtkPVGeometryFilter::RectilinearGridExecute(vtkRectilinearGrid* input,
}
this->OutlineFlag = 1;
//
// Otherwise, let Outline do all the work
//
vtkNew<vtkPVTrivialProducer> producer;
producer->SetOutput(input);
producer->SetWholeExtent(
wholeExtent[0], wholeExtent[1],
wholeExtent[2], wholeExtent[3],
wholeExtent[4], wholeExtent[5]);
vtkRectilinearGridOutlineFilter *outline = vtkRectilinearGridOutlineFilter::New();
// Because of streaming, it is important to set the input and not copy it.
outline->SetInputData(input);
vtkStreamingDemandDrivenPipeline::SetUpdateNumberOfPieces(
outline->GetOutputInformation(0), updateNumPieces);
vtkStreamingDemandDrivenPipeline::SetUpdatePiece(
outline->GetOutputInformation(0), updatePiece);
vtkStreamingDemandDrivenPipeline::SetUpdateGhostLevel(
outline->GetOutputInformation(0), updateGhosts);
vtkNew<vtkRectilinearGridOutlineFilter> outline;
outline->SetInputConnection(producer->GetOutputPort());
outline->Update();
output->CopyStructure(outline->GetOutput());
outline->Delete();
}
//----------------------------------------------------------------------------
......
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