Commit 2159eece authored by Nicolas Vuaille's avatar Nicolas Vuaille

add test for Cinema Spec A

this test the discrete slider too.
parent 2949ce7c
......@@ -572,12 +572,20 @@ if(PARAVIEW_ENABLE_PYTHON)
paraview_test_load_data_dirs("" "cinema-composite.cdb/image/pose=${poseidx}/vis=${visidx}")
endforeach()
endforeach()
paraview_test_load_data("" "cinema-non-composite.cdb/image/info.json")
foreach(phi 0 90 180)
paraview_test_load_data_dirs("" "cinema-non-composite.cdb/image/${phi}/0")
endforeach()
list(APPEND TESTS_WITH_BASELINES
${CMAKE_CURRENT_SOURCE_DIR}/ImportCinema.xml)
${CMAKE_CURRENT_SOURCE_DIR}/ImportCinema.xml
${CMAKE_CURRENT_SOURCE_DIR}/ImportCinemaSpecA.xml)
# presently, we don't support client-server configurations.
set(ImportCinema_DISABLE_CS TRUE)
set(ImportCinema_DISABLE_CRS TRUE)
set(ImportCinemaSpecA_DISABLE_CS TRUE)
set(ImportCinemaSpecA_DISABLE_CRS TRUE)
endif()
endif()
......
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuTools" />
<pqevent object="pqClientMainWindow/menubar/menuTools" command="activate" arguments="actionTesting_Window_Size" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_File" />
<pqevent object="pqClientMainWindow/menubar/menu_File" command="activate" arguments="actionFileImportCinemaDatabase" />
<pqevent object="pqClientMainWindow/FileOpenDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/cinema-non-composite.cdb/image/info.json" />
<pqcheck object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/DisplayFrame/ProxyPanel/RenderLayersAsImage/CheckBox" property="checked" arguments="false" />
<pqcheck object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Contour1/DiscreteDoubleWidget/Slider" property="value" arguments="0" />
<pqcheck object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Contour1/DiscreteDoubleWidget/LineEdit" property="text" arguments="150" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionRotate90degCW" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionNegativeZ" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mousePress" arguments="(0.71194,0.511571,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mouseMove" arguments="(0.167164,0.431181,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/CentralWidgetFrame/Viewport" command="mouseRelease" arguments="(0.167164,0.431181,1,0,0)" />
<pqevent object="pqClientMainWindow/cameraToolbar/actionPositiveZ" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,11,10,/0:0/0:1" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,11,10,/0:0/0:1" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,11,10,/0:0/0:1" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,11,10,/0:0/0:1" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Contour1/DiscreteDoubleWidget/Slider" command="set_int" arguments="1" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqcheck object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Contour1/DiscreteDoubleWidget/LineEdit" property="text" arguments="190" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Contour1/DiscreteDoubleWidget/LineEdit" command="set_string" arguments="220" />
<pqcheck object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/Contour1/DiscreteDoubleWidget/Slider" property="value" arguments="2" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
</pqevents>
......@@ -40,10 +40,11 @@ vtkStandardNewMacro(vtkCinemaLayerRepresentation);
vtkCinemaLayerRepresentation::vtkCinemaLayerRepresentation()
{
this->Reslice->SetInputData(this->CachedImage);
this->MapperA->SetInputData(this->Reslice->GetOutput());
this->MapperA->SetInputConnection(this->Reslice->GetOutputPort());
this->MapperA->SetColorWindow(255);
this->MapperA->SetColorLevel(127.5);
this->Actor->SetMapper(this->MapperA.Get());
vtkNew<vtkPolyData> pd;
this->CacheKeeper->SetInputData(pd.Get());
this->Actor->SetDisplayPosition(0, 0);
......@@ -320,6 +321,7 @@ void vtkCinemaLayerRepresentation::UpdateMapper()
transform->RotateWXYZ(180 + vtkMath::DegreesFromRadians(angle), 0, 0, 1);
transform->Translate(-center[0], -center[1], -center[2]);
// scale the image to fit the view
vtkView* view = this->GetView();
vtkPVRenderView* rview = vtkPVRenderView::SafeDownCast(view);
double* rendererCenter = rview->GetRenderer()->GetCenter();
......@@ -345,7 +347,6 @@ void vtkCinemaLayerRepresentation::UpdateMapper()
this->Reslice->SetBackgroundColor(
255 * backgroundColor[0], 255 * backgroundColor[1], 255 * backgroundColor[2], 0);
}
this->Reslice->SetOutputSpacing(image->GetSpacing());
this->Reslice->SetOutputOrigin(image->GetOrigin());
this->Reslice->SetOutputExtent(image->GetExtent());
......
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