[vtkusers] Error "The interactor must be set prior to enabling the widget" using vtkResliceImageViewer

David Gobbi david.gobbi at gmail.com
Sun Mar 20 11:14:24 EDT 2016


On Sun, Mar 20, 2016 at 8:52 AM, Liu_tj <tjlp at netease.com> wrote:

> Hi, VTK guys,
>
> I am using Activiz VTK 7.0 for my C# application. I try to
> use vtkResliceImageViewer to display DICOM axial, coronal or saggital view.
> The vtkRenderWindow is defined in a WPF user control. When I run my
> application, I get this error reported:
>
> ERROR: In ..\..\..\VTK-7.0\Interaction\Widgets\vtkAbstractWidget.cxx, line
> 118
> vtkResliceCursorWidget (0000000025A638B0): The interactor must be set
> prior to enabling the widget
>
> ERROR: In ..\..\..\VTK-7.0\Interaction\Widgets\vtkAbstractWidget.cxx, line
> 118
> vtkResliceCursorWidget (0000000025A638B0): The interactor must be set
> prior to enabling the widget
>
> Below is my code. Do I miss any step?
>

I don't use vtkResliceImageViewer, but my guess is that since you call
SetRenderWindow(), you should also call SetRenderer() and SetupInteractor().

You can get the renderer from the render window with GetRenderer(), but you
will probably have to create your own interactor.

 - David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160320/0c007ea5/attachment.html>


More information about the vtkusers mailing list