[vtkusers] how to get the mouse position and scalar value on that position i

dean.inglis at camris.ca dean.inglis at camris.ca
Mon Aug 28 09:22:43 EDT 2006


Hi James,

just cast to vtkProp since vtkImageActor
inherits from it:

coordWidget->SetProp((vtkProp*)(ImageViewer->GetImageActor()));

Dean

>   
>   vtkImageCoordinateWidget *coordWidget = vtkImageCoordinateWidget::New();
>   coordWidget->SetInput(reader->GetOutput());
>   coordWidget->SetProp(ImageViewer->GetImageActor()); // this line has problem
>   
>   But the last line of the above codes has problem, the error information is as follows:
>   
>   error C2664: 'SetPropA' : cannot convert parameter 1 from 'class vtkImageActor *' to 'class vtkProp *'
>   Types pointed to are unrelated; conversion requires reinterpret_cast,  C-style cast or function-style cast Error executing cl.exe.





More information about the vtkusers mailing list