[vtkusers] How to adjust VTK Image brightness and contrast with QT Slider

David Doria daviddoria at gmail.com
Fri Feb 10 13:30:19 EST 2012


On Fri, Feb 10, 2012 at 1:25 PM, yarram <somasekhar.vit at gmail.com> wrote:

> Hi,
>    I want to control the VTK rendered image brightness and contrast. Please
> help me with the corresponding snippet. I couldn't find any perfect and
> clear post of this kind. Thank you in advance.
>
> Sincerely,
> Yarram (somasekhar.vit at gmail.com)


These are two very separate questions:

1) How do I use a slider widget?
http://programmingexamples.net/wiki/Qt/Widgets/Slider

2) How do I change the brightness and contrast of an image in VTK?
You can use the vtkImageShiftScale filter:
 http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/ImageShiftScale
Shift by brightness, scale by contrast.

3) You'll need to use a QVTKWidget to link the two together:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Qt/RenderWindowUIMultipleInheritance

Good luck,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120210/5d25ca4b/attachment.htm>


More information about the vtkusers mailing list