From 50dd94f7930c852762f5cd8310afe127f56b07eb Mon Sep 17 00:00:00 2001 From: Astrid <astrid.beyer@etu.univ-amu.fr> Date: Fri, 5 May 2023 16:24:25 +0200 Subject: [PATCH] feat: translate in dot file --- vpt2dot.cxx | 4 +++- vtkPolyDataToGraph.cxx | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/vpt2dot.cxx b/vpt2dot.cxx index 59997eb..885c00c 100644 --- a/vpt2dot.cxx +++ b/vpt2dot.cxx @@ -5,6 +5,7 @@ #include "vtkPolyDataToGraph.h" #include "vtkBoostGraphAdapter.h" +#include <vtkNew.h> #include <boost/graph/graphviz.hpp> #include <vtkCallbackCommand.h> @@ -72,7 +73,8 @@ int main(int argc, char *argv[]) reader->Update(); // VTK_CREATE(vtkPolyDataToGraph, filter); - vtkSmartPointer<vtkPolyDataToGraph> filter; + // vtkSmartPointer<vtkPolyDataToGraph> filter; + vtkNew<vtkPolyDataToGraph> filter; filter->SetInputConnection(0, reader->GetOutputPort()); filter->AddObserver(vtkCommand::AnyEvent, eventCallbackVTK); filter->Update(); diff --git a/vtkPolyDataToGraph.cxx b/vtkPolyDataToGraph.cxx index 31bf792..43eccd7 100644 --- a/vtkPolyDataToGraph.cxx +++ b/vtkPolyDataToGraph.cxx @@ -42,6 +42,11 @@ int vtkMeshToGraph::FillOutputPortInformation( } */ +vtkPolyDataToGraph *vtkPolyDataToGraph::New() +{ + return new vtkPolyDataToGraph; +} + //---------------------------------------------------------------------------- int vtkPolyDataToGraph::FillInputPortInformation( int vtkNotUsed(port), vtkInformation *info) -- GitLab