Operating system: macOS 10.14.6
Slicer version: 4.10.2
Hello,
I want to set and apply a transformation on a vtkMRMLModelNode by its polyData. I did it like this :
> vtkSmartPointer<vtkPolyData> cylinder = vtkMRMLModelNode::SafeDownCast(node)->GetPolyData();
>
> / create transform filter
> vtkSmartPointer<vtkTransform> translation = vtkSmartPointer<vtkTransform>::New();
> translation->Translate(vectranslation[0], vectranslation[1], vectranslation[2]);
>
> // apply filter on cylinder
> vtkSmartPointer<vtkTransformPolyDataFilter> transformFilter = vtkSmartPointer<vtkTransformPolyDataFilter>::New();
> transformFilter->SetInputData(m_cylinder);
> transformFilter->SetTransform(translation);
> transformFilter->Update();
> cylinder->ShallowCopy(transformFilter->GetOutput());
But it would not display the modifications in Slicer. Can you help me to do it, please ?
Thanks