stencil->SetBackgroundValue(128);
stencil->Update();
- if(ImageOutput)
- {
- ImageOutput->Delete();
- }
- ImageOutput = vtkImageData::New();
- ImageOutput->DeepCopy(stencil->GetOutput());
+// if(ImageOutput)
+// {
+// ImageOutput->Delete();
+// }
+// ImageOutput = vtkImageData::New();
+// ImageOutput->DeepCopy(stencil->GetOutput());
+
+ output->ShallowCopy( stencil->GetOutput() );
+ stencil->Delete();
+
return 1;
}
//-------------------------------------------------------------------------------------------
-vtkImageData* SurfaceRenderingImageStencilExport::GetOutputData()
-{
- return ImageOutput;
-}
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ vtkImageData* SurfaceRenderingImageStencilExport::GetOutputData()
+ {
+ return ImageOutput;
+ }
+#else
+ // ..
+#endif
+
#if VTK_MAJOR_VERSION <= 5
#include <vtkDataSetToImageFilter.h>
#else
- #include "vtkPolyDataAlgorithm.h"
+ #include "vtkImageAlgorithm.h"
#include "vtkDataObject.h"
#include "vtkInformation.h"
#include "vtkDemandDrivenPipeline.h"
#if VTK_MAJOR_VERSION <= 5
class SurfaceRenderingImageStencilExport : public vtkDataSetToImageFilter
#else
-class SurfaceRenderingImageStencilExport : public vtkPolyDataAlgorithm
+class SurfaceRenderingImageStencilExport : public vtkImageAlgorithm
#endif
{
public:
static SurfaceRenderingImageStencilExport *New();
- vtkTypeMacro(SurfaceRenderingImageStencilExport,vtkPolyDataAlgorithm)
-
#if VTK_MAJOR_VERSION <= 5
+ vtkTypeMacro(SurfaceRenderingImageStencilExport,vtkDataSetToImageFilter)
virtual void Update();
+ virtual vtkImageData* GetOutputData();
#else
- // ..
+ vtkTypeMacro(SurfaceRenderingImageStencilExport,vtkImageAlgorithm)
#endif
- virtual vtkImageData* GetOutputData();
protected:
//EED 2017-01-01 Migration VTK7
}
#else
-/*
- int vtkClosePolyData::ProcessRequest( vtkInformation *request,
- vtkInformationVector **inputVector,
- vtkInformationVector *outputVector)
- {
-printf("EED Warning ERROR ! vtkClosePolyData::ProcessRequest not implemented VTK7 migration");
- // generate the data
- if(request->Has(vtkDemandDrivenPipeline::REQUEST_INFORMATION()))
- {
- // specify that the output (only one for this filter) will be double
- vtkInformation* outInfo = outputVector->GetInformationObject(0);
- outInfo->Set(vtkDataObject::SCALAR_TYPE(),VTK_DOUBLE);
- return 1;
- }
- return this->Superclass::ProcessRequest(request,inputVector,outputVector);
- }
-*/
int vtkClosePolyData::RequestData( vtkInformation *vtkNotUsed(request), vtkInformationVector **inputVector, vtkInformationVector *outputVector)
{