[vtkusers] Disable mouse interaction on overlaid image

David Gobbi david.gobbi at gmail.com
Mon Apr 18 12:40:17 EDT 2016


Great.  I've made one more minor change, I renamed
SetCurrentImageToNthImage() to SetCurrentImageNumber().
https://gitlab.kitware.com/vtk/vtk/merge_requests/1421/diffs

I'll try to get this change merged into VTK.

Cheers,
 - David



On Mon, Apr 18, 2016 at 12:42 AM, Jothybasu Selvaraj <jothybasu at gmail.com>
wrote:

> Hi David
>
> Yup, it works on my system.
>
> Thanks a lot!
>
> Jothy
>
> On Fri, Apr 15, 2016 at 11:46 PM, David Gobbi <david.gobbi at gmail.com>
> wrote:
>
>> Hi Jothy,
>>
>> Have you had a chance to test the changes yet?
>>
>>  - David
>>
>> On Wed, Apr 13, 2016 at 5:53 PM, Jothybasu Selvaraj <jothybasu at gmail.com>
>> wrote:
>>
>>> Great!
>>>
>>> Thanks very much!
>>>
>>> Jothy
>>>
>>> On Thu, Apr 14, 2016 at 9:08 AM, David Gobbi <david.gobbi at gmail.com>
>>> wrote:
>>>
>>>> Hi Jothy,
>>>>
>>>> I've added a change so that SetCurrentImageToNthImage is public:
>>>> https://gitlab.kitware.com/vtk/vtk/merge_requests/1421/diffs
>>>>
>>>> If you're not sure about how to get the changes with git, then you can
>>>> download the files here:
>>>>
>>>> https://gitlab.kitware.com/vtk/vtk/raw/81d49118/Interaction/Style/vtkInteractorStyleImage.h
>>>>
>>>> https://gitlab.kitware.com/vtk/vtk/raw/81d49118/Interaction/Style/vtkInteractorStyleImage.cxx
>>>>
>>>> Please test to see if this solves the issue.
>>>>
>>>>  - David
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Apr 12, 2016 at 6:18 PM, Jothybasu Selvaraj <
>>>> jothybasu at gmail.com> wrote:
>>>>
>>>>> I would rather like to have this SetCurrentImageToNthImage to be
>>>>> public and user definable.
>>>>>
>>>>>
>>>>> Jothy
>>>>>
>>>>> On Wed, Apr 13, 2016 at 10:15 AM, Jothybasu Selvaraj <
>>>>> jothybasu at gmail.com> wrote:
>>>>>
>>>>>> Hi David
>>>>>>
>>>>>> I am not familiar with using Gitlab. So, I subclassed
>>>>>> vtkInteractorStyleImage and override SetCurrentImageToNthImage().
>>>>>>
>>>>>> Still it didn't work, because the layer number is hardcoded into StartWindowLevel()
>>>>>> with this->SetCurrentImageToNthImage(-1); So the mouse only interacts with
>>>>>> the last image. I changed it to "0" so that it pick the first image.
>>>>>>
>>>>>> It solves my problem. I only want to interact with the first image :).
>>>>>>
>>>>>>
>>>>>> Thank a lot for your inputs.
>>>>>>
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>> Jothy
>>>>>>
>>>>>> On Wed, Apr 13, 2016 at 8:42 AM, David Gobbi <david.gobbi at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Jothy,
>>>>>>>
>>>>>>> Can you try the code change in the following merge request to
>>>>>>> see if it fixes the problem?
>>>>>>>
>>>>>>> https://gitlab.kitware.com/vtk/vtk/merge_requests/1421
>>>>>>>
>>>>>>>  - David
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Apr 12, 2016 at 4:05 PM, Jothybasu Selvaraj <
>>>>>>> jothybasu at gmail.com> wrote:
>>>>>>>
>>>>>>>> Yes, I use vtkInteractorStyleImage.
>>>>>>>>
>>>>>>>> Cheers
>>>>>>>>
>>>>>>>> Jothy
>>>>>>>>
>>>>>>>> On Tue, Apr 12, 2016 at 10:16 PM, David Gobbi <
>>>>>>>> david.gobbi at gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi Jothy,
>>>>>>>>>
>>>>>>>>> Are you using vtkInteractionStyleImage?  I checked the code, and
>>>>>>>>> it doesn't
>>>>>>>>> seem to check the pickability of the image.  Specifically, I mean
>>>>>>>>> the code in
>>>>>>>>> SetCurrentImageToNthImage(), which is called by StartWindowLevel().
>>>>>>>>>
>>>>>>>>>  - David
>>>>>>>>>
>>>>>>>>> On Tue, Apr 12, 2016 at 12:44 AM, Jothybasu Selvaraj <
>>>>>>>>> jothybasu at gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Dear All
>>>>>>>>>>
>>>>>>>>>> I an image overlaid on another image. I only want mouse
>>>>>>>>>> interaction such as window level change on only one image. How do I do that?
>>>>>>>>>>
>>>>>>>>>> I tried pickable off,on the second image but it doesn't work.
>>>>>>>>>>
>>>>>>>>>> Any help is highly appreciated!
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>>
>>>>>>>>>> Jothy
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160418/76d23e12/attachment.html>


More information about the vtkusers mailing list