Hi Jothy,<br>On digging further, I found the right click was linked to vtkImagePlaneWidget::WindowLevel<br><br>Where window size and leve of the histogram were calculated and modified based on mouse movements, to get rmin and rmax .<br>
Finally , the lookuptable was modified LookupTable-&gt;SetTableRange( rmin, rmax ); to adjust brightness/contrast.<br><br>So, I am planning to do the following:<br><br>from my vtkImagePLanewidget I would  GetLookupTable () and set its table range rmin/rmax based on the Qt slider.<br>
However I am not very clear between the relation of brightness/contrast   and   rmin/rmax in   LookupTable-&gt;SetTableRange( rmin, rmax );<br><br>I think the window/level refer to the following in a histogram:<br><pre>             ____________<br>
            /<br>           /<br>__________/<br>         | ^ |<br>           L<br>         &lt;-W-&gt;<br></pre><br>and they are related to brightness/contrast by the following:<br><br>   minval = min(image)<br>   maxval = max(image)<br>
   level = (1-brightness/100.)*(maxVal - minVal) + minVal<br>   window = (1-contrast/100.)*(maxVal - minVal)<br>where brightness/contrast can vary from 0 to 100.<br><br>So what value should I use for rmin/rmax in LookupTable-&gt;SetTableRange( rmin, rmax ); ?<br>
<br>Regards,<br>Somi<br><br><div class="gmail_quote">On Fri, Apr 30, 2010 at 11:29 AM, Jothy <span dir="ltr">&lt;<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I don&#39;t have exact answer for this. But , I think you need to<br>
manipulate the observers.HAve a look at this<br>
<br>
<a href="http://www.cmake.org/Wiki/VTK_Examples#User_Interaction" target="_blank">http://www.cmake.org/Wiki/VTK_Examples#User_Interaction</a><br>
<font color="#888888"><br>
Jothy<br>
</font><div><div></div><div class="h5"><br>
On Fri, Apr 30, 2010 at 3:58 PM, somi &lt;<a href="mailto:seesomi@gmail.com">seesomi@gmail.com</a>&gt; wrote:<br>
&gt; Hi Jothy,<br>
&gt; I want the brightness/control through a user control slider (in Qt). I also<br>
&gt; show the surface overlaid over the image plane widget<br>
&gt;<br>
&gt;  Which function should I override to implement my own brightness/contrast<br>
&gt; control ? I didn&#39;t find anything specific @<br>
&gt; <a href="http://www.vtk.org/doc/nightly/html/classvtkInteractorStyleImage.html" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkInteractorStyleImage.html</a><br>
&gt;<br>
&gt; Also while playing with the interactor, I noticed that if my mouse is over<br>
&gt; an image and I drag left/right I can adjust contrast and if I click and drag<br>
&gt; up/down I can adjust contrast.<br>
&gt; Do I have to imement my own interactor style and override right click ?<br>
&gt; Isn&#39;t there any SetContrast/SetBrightness interface ?<br>
&gt;<br>
&gt; Regards,<br>
&gt; Somi<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Apr 30, 2010 at 10:44 AM, Jothy &lt;<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I think by  setting Interacto Style to InteractorStyleToImage<br>
&gt;&gt;<br>
&gt;&gt; Jothy<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Apr 30, 2010 at 3:31 PM, somi &lt;<a href="mailto:seesomi@gmail.com">seesomi@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt; I have a 3D volume (vtkImage) which I show through 3 orthogonal<br>
&gt;&gt; &gt; vtkImagePlaneWidgets. How can I add brightness and contrast control to<br>
&gt;&gt; &gt; this<br>
&gt;&gt; &gt; widget ?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Regards, Somi<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>