[vtkusers] Disable mouse interaction on overlaid image

Jothybasu Selvaraj jothybasu at gmail.com
Tue Apr 12 20:18:08 EDT 2016


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/20160413/9ddc49ad/attachment.html>


More information about the vtkusers mailing list