You can use the key ‘i’ to enable or disable the vtkSliderWidget object defaultly. Here is a post about how to use vtkSliderWidget to control other model, Control The Size Of Model By VtkSliderWidget.

But we don’t want the shortcut key to influence the program UI sometimes. So let’s forbid it.

#include <iostream>
#include <vtkSmartPointer.h>
#include <vtkSphereSource.h>
#include <vtkActor.h>
#include <vtkConeSource.h>
#include <vtkRenderer.h>
#include <vtkRenderWindow.h>
#include <vtkPolyDataMapper.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkSliderWidget.h>
#include <vtkSliderRepresentation.h>
#include <vtkSliderRepresentation3D.h>
#include <vtkWidgetEventTranslator.h>
#include <vtkTransform.h>
#include <vtkWidgetEvent.h>

//...
    vtkSmartPointer<vtkSliderWidget> sliderWidget =
        vtkSmartPointer<vtkSliderWidget>::New();

//...
    sliderWidget->KeyPressActivationOff();
Categories: VTK

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Image Color Picker
: Image Color Picker help you to read color information on image.

X
A prohibited operation
0
Would love your thoughts, please comment.x
()
x