[vtkusers] vtkInteractorStyleRubberBandPickandwtkOpenGLRenderWindow::SetRGBACharPixelData problem
John Platt
jcplatt at dsl.pipex.com
Fri Dec 4 04:51:16 EST 2009
Hi Alex,
You may have noticed that the rubber band draw is rather slow because it
copies all the pixel data in the viewport. I have a version of
vtkInteractorStyleRubberBandZoom which just copies the 4 lines of the box
and consequently is considerably quicker. It is attached if you would like
to try it.
I agree there is over duplication of RedrawRubberBand() and a common base
class for rubber band interactor styles would make sense.
John.
----- Original Message -----
From: "Alex Malyushytskyy" <alexmalvtk at gmail.com>
To: <vtkusers at vtk.org>
Sent: Thursday, December 03, 2009 11:45 PM
Subject: Re: [vtkusers]
vtkInteractorStyleRubberBandPickandwtkOpenGLRenderWindow::SetRGBACharPixelData
problem
Actually I take it back.
vtkInteractorStyleRubberBandZoom does work. I just had background
color set so line was mostly invisible.
I am going now to override all other styles I need and draw rectangle
the same way vtkInteractorStyleRubberBandZoom does.
Actually I am surprised RedrawRubberBand is not virtual and does not
belong to vtkInteractorStyle.
Also it seems having different RedrawRubberBand implementation does
not make a lot of sense.
Regards,
Alex.
>I put different graphics card and it has the same problem.
>More of that adding to the the Cone example tkInteractorStyleRubberBandPick
>shows no such problem.
>
>The only difference seems is that I am using QVTK widget. (Qt 4.4.3).
>The only idea which come to my mind is to try to upgrade QT/VTK versions
>and see if it solves the problem.
On Wed, Dec 2, 2009 at 2:24 PM, Alex Malyushytskyy <alexmalvtk at gmail.com>
wrote:
> John,
>
> vtkInteractorStyleRubberBandZoom demonstrates the same problem.
> It looks like this is graphics card/driver problem.
>
> I have ATI FireGl V3400 which already shown some weird effects when
> running multiple application at the same time.
> So this might be another problem.
>
> I will try to test on the different computer with different graphics
> card. It will just take a bit to rebuild everything n release.
>
> Thanks,
> Alex
>
>
> On Wed, Dec 2, 2009 at 2:00 AM, John Platt <jcplatt at dsl.pipex.com> wrote:
>> Hi,
>>
>> The rubber band is drawn by XORing the pixel data ( R, G, B ) with ( 255,
>> 255, 255 ) leaving A unchanged - see RedrawRubberBand(). Try
>> vtkInteractorStyleRubberBandZoom to test rubber band drawing. This uses
>> SetPixelData() instead of SetRGBACharPixelData() to see if this makes any
>> difference.
>> HTH
>>
>> John.
>>
>>
>> ----- Original Message ----- From: "Alex Malyushytskyy"
>> <alexmalvtk at gmail.com>
>> To: <vtkusers at vtk.org>
>> Sent: Tuesday, December 01, 2009 11:15 PM
>> Subject: Re: [vtkusers] vtkInteractorStyleRubberBandPick
>> andwtkOpenGLRenderWindow::SetRGBACharPixelData problem
>>
>>
>> Is anybody using vtkInteractorStyleRubberBandPick in vtk 5.4.2 stable
>> under the Windows with Opengl without this problem?
>>
>> On Tue, Dec 1, 2009 at 1:31 PM, Alex Malyushytskyy <alexmalvtk at gmail.com>
>> wrote:
>>>
>>> I am trying to implement picking within rectangular area using
>>> vtkInteractorStyleRubberBandPick.
>>> The problem I am facing is that the rectangle drawn is only visible
>>> over the defined geometry.
>>> It is not visible over the background:
>>>
>>>
>>> __________________ ___
>>> / / / Polygons
>>> - - - - / =========|| /
>>> | / || / ---
>>> Selection rectangle ( invisible part )
>>> - - - / ===========|| / === - selection
>>> rectangle ( visible part)
>>> /__________________/
>>>
>>> I narrowed problem to wtkOpenGLRenderWindow::SetRGBACharPixelData.
>>>
>>> Search on the web gave me the only possibly related problem at:
>>> http://www.cmake.org/Bug/view.php?id=7236
>>>
>>> But this fix seems already at the version I am using: vtk 5.4.2 (
>>> windows XP 64 )
>>>
>>> Any idea what can be wrong?
>>> How to figure out is it a bug or problem with graphics card/driver?
>>>
>>> Thanks in advance,
>>> Alex
>>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>>
>
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the VTK FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vtkInteractorStyleRubberBandZoom1.h
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091204/7629a0a1/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vtkInteractorStyleRubberBandZoom1.cxx
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091204/7629a0a1/attachment.txt>
More information about the vtkusers
mailing list