<div dir="ltr"><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">Hi, </div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
I have question concerning vtkPlaneWidget.</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">I need to scale vtkPlaneWidget. </div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
I can not scalling well these widget.</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><font color="#ff0000"><b>planeWidget->GetProp3D()->SetScale(scale, scale, scale);</b></font></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
It doesn't work well. </div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">I always received an exception : </div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">TestImagePlaneWidget.exe: 0xC0000005: Access violation reading location 0x00000000.<br>
</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">Could You help me please ? </div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">Tested program :</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<div>int main ( int argc, char *argv[] )</div><div>{</div><div> vtkSmartPointer<vtkSphereSource> sphereSource = vtkSmartPointer<vtkSphereSource>::New();</div><div> vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();</div>
<div> mapper->SetInputConnection(sphereSource->GetOutputPort());</div><div> vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();</div><div> actor->SetMapper(mapper);</div><div> </div>
<div> // Visualization</div><div> vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();</div><div> vtkSmartPointer<vtkRenderWindow> renderWindow =vtkSmartPointer<vtkRenderWindow>::New();</div>
<div> renderWindow->AddRenderer(renderer);</div><div> vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor = vtkSmartPointer<vtkRenderWindowInteractor>::New();</div><div> renderWindowInteractor->SetRenderWindow(renderWindow);</div>
<div><br></div><div> vtkSmartPointer<vtkSplineWidget2> splineWidget = vtkSmartPointer<vtkSplineWidget2>::New();</div><div> splineWidget->SetInteractor(renderWindowInteractor);</div><div> </div><div> vtkSmartPointer<vtkImagePlaneWidget> planeWidget = vtkSmartPointer<vtkImagePlaneWidget>::New();</div>
<div> planeWidget->SetInteractor(renderWindowInteractor);</div><div> /* double iso_scale[3] = {1,1,0};</div><div> double p1[3] = {0,0,0};</div><div> double p2[3] = {0,100,0};*/</div><div> double scale = 10;</div><div>
//planeWidget->GetPoint1(p1);</div><div> //planeWidget->GetPoint2(p2);</div><div><b><font color="#ff0000"> planeWidget->GetProp3D()->SetScale(scale, scale, scale); // ? </font></b></div><div> </div><div> // planeWidget->GetProp3D()->SetScale(iso_scale);</div>
<div><br></div><div> renderer->AddActor(actor);</div><div> renderer->ResetCamera();</div><div> planeWidget->On();</div><div> splineWidget->On();</div><div> renderer->SetBackground(.3, .6, .3); </div><div>
renderWindow->Render();</div><div> renderWindowInteractor->Start();</div><div> </div><div> return EXIT_SUCCESS;</div><div>}</div></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">I would appreciate for any help please :)</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">Agatte</div></div>