From 5084aa4dbbdae8fd7868134a9e9675ce09cf66a7 Mon Sep 17 00:00:00 2001 From: Anton Piccardo-Selg Date: Tue, 5 May 2015 16:41:55 +0100 Subject: [PATCH] Refs #11690 Extend chain for MDHisto to 1D --- .../ParaViewSources/MDHWSource/vtkMDHWSource.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Code/Mantid/Vates/ParaviewPlugins/ParaViewSources/MDHWSource/vtkMDHWSource.cxx b/Code/Mantid/Vates/ParaviewPlugins/ParaViewSources/MDHWSource/vtkMDHWSource.cxx index 390dd1472fd2..9a902f199978 100644 --- a/Code/Mantid/Vates/ParaviewPlugins/ParaViewSources/MDHWSource/vtkMDHWSource.cxx +++ b/Code/Mantid/Vates/ParaviewPlugins/ParaViewSources/MDHWSource/vtkMDHWSource.cxx @@ -15,6 +15,8 @@ #include "MantidVatesAPI/TimeToTimeStep.h" #include "MantidVatesAPI/vtkMDHistoHex4DFactory.h" #include "MantidVatesAPI/vtkMDHistoHexFactory.h" +#include "MantidVatesAPI/vtkMDHistoQuadFactory.h" +#include "MantidVatesAPI/vtkMDHistoLineFactory.h" #include "MantidVatesAPI/FilteringUpdateProgressAction.h" #include "MantidVatesAPI/IgnoreZerosThresholdRange.h" @@ -171,11 +173,16 @@ int vtkMDHWSource::RequestData(vtkInformation *, vtkInformationVector **, vtkInf ThresholdRange_scptr thresholdRange(new IgnoreZerosThresholdRange()); /* - Will attempt to handle drawing in 4D case and then in 3D case if that fails. + Will attempt to handle drawing in 4D case and then in 3D case if that fails, and so on down to 1D */ - vtkMDHistoHexFactory* successor = new vtkMDHistoHexFactory(thresholdRange, "signal"); + vtkMDHistoLineFactory* lineFactory = new vtkMDHistoLineFactory(thresholdRange, "signal"); + vtkMDHistoQuadFactory* quadFactory = new vtkMDHistoQuadFactory(thresholdRange, "signal"); + vtkMDHistoHexFactory* hexFactory = new vtkMDHistoHexFactory(thresholdRange, "signal"); vtkMDHistoHex4DFactory *factory = new vtkMDHistoHex4DFactory(thresholdRange, "signal", m_time); - factory->SetSuccessor(successor); + + factory->SetSuccessor(hexFactory); + hexFactory->SetSuccessor(quadFactory); + quadFactory->SetSuccessor(lineFactory); vtkDataSet* product = m_presenter->execute(factory, loadingProgressUpdate, drawingProgressUpdate);