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

Liu_tj tjlp at netease.com
Sun Mar 20 22:00:02 EDT 2016


Hi, David,

I thought vtkResliceViewer provides the method SliceScrollOnMouseWheelOn() which support DICOM slice switching according to the mouse wheel forward or backward. If we don't use vtkResliceViewer, what class do you use for displaying the three 2D views of DICOM supporting reslice?


Thanks
Liu Peng


在2016-03-20,"David Gobbi" <david.gobbi at gmail.com> 写道: -----原始邮件-----
发件人:"David Gobbi" <david.gobbi at gmail.com>
发送时间:2016年03月20日 星期日
收件人:"Liu_tj" <tjlp at netease.com>
抄送:"vtkusers" <vtkusers at vtk.org>
主题:Re: [vtkusers] Error "The interactor must be set prior to enabling the widget" using vtkResliceImageViewer






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/20160321/601ae29f/attachment.html>


More information about the vtkusers mailing list