Skip to content

Commit

Permalink
Refs #4240. Switching to different dataset factory.
Browse files Browse the repository at this point in the history
Taking advantage of the dataset factory that was created for the
MDHistoWorkspace object. Plugin still not ready as it looks like a new
presenter needs to be created.
  • Loading branch information
Michael Reuter committed Dec 1, 2011
1 parent 9790ab1 commit 6d062d2
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#include "MantidVatesAPI/MDEWInMemoryLoadingPresenter.h"
#include "MantidVatesAPI/MDLoadingViewAdapter.h"
#include "MantidVatesAPI/ADSWorkspaceProvider.h"
#include "MantidVatesAPI/vtkMDEWHexahedronFactory.h"
#include "MantidVatesAPI/TimeStepToTimeStep.h"
#include "MantidVatesAPI/vtkThresholdingUnstructuredGridFactory.h"
#include "MantidVatesAPI/FilteringUpdateProgressAction.h"
#include "MantidVatesAPI/IgnoreZerosThresholdRange.h"

Expand Down Expand Up @@ -89,17 +90,15 @@ int vtkMDHWSource::RequestData(vtkInformation *, vtkInformationVector **, vtkInf
//get the info objects
vtkInformation *outInfo = outputVector->GetInformationObject(0);


if (outInfo->Has(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS()))
{
// usually only one actual step requested
m_time =outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEPS())[0];
}

FilterUpdateProgressAction<vtkMDHWSource> updateHandler(this);
vtkMDEWHexahedronFactory* hexahedronFactory = new vtkMDEWHexahedronFactory(ThresholdRange_scptr(new IgnoreZerosThresholdRange()), "signal");
hexahedronFactory->setTime(m_time);
vtkDataSet* product = m_presenter->execute(hexahedronFactory, updateHandler);
vtkThresholdingUnstructuredGridFactory<TimeStepToTimeStep> *factory = new vtkThresholdingUnstructuredGridFactory<TimeStepToTimeStep>(ThresholdRange_scptr(new IgnoreZerosThresholdRange()), "signal", m_time);
vtkDataSet* product = m_presenter->execute(factory, updateHandler);

//-------------------------------------------------------- Corrects problem whereby boundaries not set propertly in PV.
vtkBox* box = vtkBox::New();
Expand Down

0 comments on commit 6d062d2

Please sign in to comment.