Commit 80b3fd63 authored by John Biddiscombe's avatar John Biddiscombe
Browse files

Fix 0014170 segfault in setting of GPU resampler input

Change-Id: I191d84244d3415054f7e09c2be771beab72a8c9c
parent 5c0c3364
......@@ -26,7 +26,6 @@
#include "vtkPiecewiseFunction.h"
#include "vtkRenderer.h"
#include "vtkRenderWindow.h"
#include "vtkTrivialProducer.h"
#include "vtkVolume.h"
#include "vtkVolumeProperty.h"
#include "vtkVolumeTextureMapper3D.h"
......@@ -528,10 +527,7 @@ void vtkSmartVolumeMapper::ConnectMapperInput(vtkVolumeMapper *m)
// make sure we not create a shallow copy each time to avoid
// performance penalty.
input2=vtkImageData::New();
vtkTrivialProducer* tp = vtkTrivialProducer::New();
tp->SetOutput(input2);
m->SetInputConnection(tp->GetOutputPort());
tp->Delete();
m->SetInputDataObject(input2);
input2->Delete();
needShallowCopy=true;
}
......@@ -557,7 +553,7 @@ void vtkSmartVolumeMapper::ConnectFilterInput(vtkImageResample *f)
// make sure we not create a shallow copy each time to avoid
// performance penalty.
input2=vtkImageData::New();
f->SetInputConnection(f->GetInputConnection(0, 0));
f->SetInputDataObject(input2);
input2->Delete();
needShallowCopy=true;
}
......
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