<div dir="ltr">Because Prop3D is 0, try to set it first.<div>Anka<br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 3, 2014 at 9:43 AM, Agata Krasoń <span dir="ltr"><<a href="mailto:agatakrason@gmail.com" target="_blank">agatakrason@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>