[vtk-developers] Scissor in vtkOpenGLCamera

Antonella Cascitelli lenlen1982 at gmail.com
Sat Nov 7 12:16:39 EST 2015


Hi, I have prepared a merge request in the gitlab repository, here the link:
https://gitlab.kitware.com/vtk/vtk/merge_requests/882
Let me know if it's okay!
Thanks

2015-11-02 16:32 GMT+01:00 Aashish Chaudhary <aashish.chaudhary at kitware.com>
:

> Okay, I will push a API at the vtkOpenGL Camera level sometime
> today/tomorrow unless someone objects here.
>
> Thanks,
>
>
> On Thu, Oct 29, 2015 at 5:18 PM, Antonella Cascitelli <
> lenlen1982 at gmail.com> wrote:
>
>> To summarize I need to render a small part of the whole scene as Roi
>> Region Of Interest (ROI) in order to render a rectangle around an object
>> without altering its geometry and prospective.
>> Il 29 ott 2015 8:23 PM, "Aashish Chaudhary" <
>> aashish.chaudhary at kitware.com> ha scritto:
>>
>>> On Thu, Oct 29, 2015 at 3:15 PM, Antonella Cascitelli <
>>> lenlen1982 at gmail.com> wrote:
>>>
>>>> Thank you, but I'm trying to render only a smaller part of image
>>>> instead the whole image to save computational time.
>>>>
>>>
>>> If that's the case, why not have a smaller viewport? I may be missing
>>> something here.
>>>
>>>
>>>> I have just modified vtkOpenGLCamera the call to glScissor with my
>>>> custom arguments and It works... is it possible to expose a patch that
>>>> allow a custom glScissor setting? What I have done is a dirty workaround,
>>>> which would be the right class to add this new public method?
>>>>
>>>
>>> Hmm..not sure if that would be easy unless we just add an API to the
>>> vtkOpenGLCamera. I would be okay with the later option but wondering what
>>> others has to say on this.
>>>
>>> - Aashish
>>>
>>>
>>>>
>>>> 2015-10-29 19:52 GMT+01:00 Aashish Chaudhary <
>>>> aashish.chaudhary at kitware.com>:
>>>>
>>>>> You can achieve this by creating two renderers and then for the second
>>>>> one just a smaller viewport (on top of the first one). I am assuming that
>>>>> you are showing two images / data at the same time.
>>>>>
>>>>> There is no API (as far as I know) to help you with this task.
>>>>>
>>>>> On Thu, Oct 29, 2015 at 2:45 PM, Antonella Cascitelli <
>>>>> lenlen1982 at gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>> is it possible set the glScissor in vtk?
>>>>>> i.e. in vtkOpenGLCamera:
>>>>>>
>>>>>> glViewport(lowerLeft[0], lowerLeft[1], usize, vsize);
>>>>>> glEnable(GL_SCISSOR_TEST);
>>>>>> glScissor(lowerLeft[0], lowerLeft[1], usize, vsize);
>>>>>>
>>>>>> so seems that the scissor area is always the same of the viewport.
>>>>>> I want to render only a small rectangle area in the viewport like
>>>>>> using scissor with opengl.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Antonella
>>>>>>
>>>>>> _______________________________________________
>>>>>> Powered by www.kitware.com
>>>>>>
>>>>>> Visit other Kitware open-source projects at
>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>
>>>>>> Search the list archives at:
>>>>>> http://markmail.org/search/?q=vtk-developers
>>>>>>
>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>>
>>>>>
>>>>> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.
>>>>>     *
>>>>> *| http://www.kitware.com/company/team/chaudhary.html
>>>>> <http://www.kitware.com/company/team/chaudhary.html>*
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>>
>>>
>>> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.
>>>   *
>>> *| http://www.kitware.com/company/team/chaudhary.html
>>> <http://www.kitware.com/company/team/chaudhary.html>*
>>>
>>
>
>
> --
>
>
>
> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.            *
> *| http://www.kitware.com/company/team/chaudhary.html
> <http://www.kitware.com/company/team/chaudhary.html>*
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20151107/f3f483b7/attachment.html>


More information about the vtk-developers mailing list