[vtkusers] vtkImagePlaneWidget in QVTKWidget

qlizhi qlizhi at gmail.com
Sun May 20 09:10:27 EDT 2012


yes, i use vs2010.




qlizhi

From: John Drescher
Date: 2012-05-20 21:03
To: qlizhi
CC: vtkusers
Subject: Re: [vtkusers] vtkImagePlaneWidget in QVTKWidget
> I use vtkImagePlaneWidget  to get a cross-sectional view, the program works
> fine; but when i combine it with Qt,  when the mouse move into the
> QVTKInteractor area , the program crash down. I suppose the reason was
> QVTKInteractor ;  Can  anybody help me ?Thank you!
> Some important codes:
>
> QVTKInteractor *iren=qVTK1->GetInteractor();
> .
> .
> .
>  vtkSmartPointer<vtkCellPicker> picker =
>   vtkSmartPointer<vtkCellPicker>::New();
>   picker->SetTolerance(0.005);
>
>   vtkSmartPointer<vtkProperty> ipwProp =
>   vtkSmartPointer<vtkProperty>::New();
>
>   vtkSmartPointer<vtkImagePlaneWidget> planeWidgetZ =
>   vtkSmartPointer<vtkImagePlaneWidget>::New();
>   planeWidgetZ->SetInteractor( iren);
>   planeWidgetZ->SetKeyPressActivationValue('z');
>   planeWidgetZ->SetPicker(picker);
>   planeWidgetZ->GetPlaneProperty()->SetColor(0,0,1);
>   planeWidgetZ->SetTexturePlaneProperty(ipwProp);
>   planeWidgetZ->TextureInterpolateOn();
>   planeWidgetZ->SetResliceInterpolateToCubic();
>   planeWidgetZ->SetInput(v16->GetOutput());
>   planeWidgetZ->SetPlaneOrientationToZAxes();
>   planeWidgetZ->SetSliceIndex(32);
>   //planeWidgetZ->SetLookupTable( planeWidgetX->GetLookupTable());
>   planeWidgetZ->SetLookupTable( hueLut);
>   planeWidgetZ->DisplayTextOn();
>   planeWidgetZ->On();
>

Are you compiling with Visual Studio?

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120520/11352e00/attachment.htm>


More information about the vtkusers mailing list