View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011852VTK(No Category)public2011-02-14 07:462013-07-22 19:57
Reporterthorbenk 
Assigned ToClinton Stimpson 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformGentoo LinuxOSLinuxOS Version2.6.34-gentoo
Product Version 
Target VersionFixed in Version5.10.0 
Summary0011852: QVTKWidget and QVTKWidget behave differently; resizing breaks interactor for QVTKWidget2
DescriptionThe attached small python test case shows some problems with QVTKWidget and QVTKWidget2. I'm using the latest VTK built from git HEAD.

1.) QVTKWidget and QVTKWidget2 behave differently. When the mouse moves over the plane, it gets highlighted green for QVTKWidget but no highlighting happens for QVTKWidget2. Is this a bug or a feature?

To reproduce, run
python test-qvtkwidget.py 1 // to use QVTKWidget
python test-qvtkwidget.py 2 // to use QVTKWidget2

2.) Try resizing the window when using QVTKWidget2 (see above). Now the plane
cannot be dragged anymore. I have tracked this problem down, one can work around this by resizing the interactor in a resizeEvent like this:

def resizeEvent(self, event):
        #ordering is important here
        #1.) Let the QVTKWidget2 resize itself
        QVTKWidget2.resizeEvent(self,event)
        
        w,h = self.width(), self.height()
        #2.) Make sure the interactor is assigned a correct new size
        self.renderWindow.GetInteractor().SetSize(w,h)
Tagspython, qt
ProjectTBD
Typeincorrect functionality
Attached Files? file icon test-qvtkwidget.py [^] (1,052 bytes) 2011-02-14 07:46
? file icon test-qvtkwidgetInLayout.py [^] (2,717 bytes) 2011-02-23 08:17
png file icon screenShotForOption3.png [^] (1,676,658 bytes) 2011-02-23 08:19
? file icon test-qvtkwidget2_TestCaseWindowsTranparency.py [^] (2,218 bytes) 2011-02-24 05:15

 Relationships

  Notes
(0025560)
Christoph Sommer (reporter)
2011-02-23 08:26

The same problem appears on Windows 7.

PyQt4 = 4.7.3
Qt = 4.6.2
Python = 2.6.5
VTK = git checkout from 22.02.2011

Additionally, after embedding the QVTKWidget2 into a layout of a MainWindow, the transparency is disabled. See attached screenshot.
(0025561)
Oliver Petra (reporter)
2011-02-23 08:45

I can confirm the issues raised in the first bugreport on a Mac Book Pro (OS X 10.6.6, core i5, 8GB RAM). I have compiled VTK from git (version from last week) using all dependencies installed from macports.

However, using
python test-qvtkwidgetInLayout 3
the slicing plane widget is transparent and not opaque as reported above for the Windows platform.

Here are the relevant versions of dependencies:
Python python26 @2.6.6_1 (active)
Qt qt4-mac @4.7.1_1+quartz (active)
PyQt py26-pyqt4 @4.8.3_1 (active)
SIP py26-sip @4.12.1_0 (active)
VTK de74b8e628b5c9683544079d5980b12fc816893d
(0025566)
Clinton Stimpson (developer)
2011-02-23 18:57

Some fixes committed here. Can you give it a try?
http://vtk.org/gitweb?p=VTK.git;a=commit;h=1d2817 [^]

I can't reproduce the transparency being disabled. However, if you want to help track it down, its probably a matter of OpenGLInit() being called at the right time.
(0025569)
thorbenk (reporter)
2011-02-24 03:32

Thank you very much for having a look at this bug. I've tested your patch on an Ubuntu 10.10 system and it fixes all the issues I reported :-)

As soon as I get my hands on a Windows machine, I'll try looking at the "no transparency" bug. Looking at QVTKWidget2.cxx, OpenGLInit() is only called from SetRenderWindow, so I'll try placing this call somewhere else.

Cheers,

Thorben
(0025571)
Christoph Sommer (reporter)
2011-02-24 05:18

Tried it on Windows 7. Patch worked nicely! Thanks a lot.

I've attached a testCase for Windows where the order of inits is important.

if you call test-qvtkwidget2_TestCaseWindowsTranparency.py <number>
with <number> smaller than 6 the plane is opaque, otherwise semi-transparent (as expected)

Cheers,
Christoph
(0025573)
Oliver Petra (reporter)
2011-02-24 07:55

Seems like the patch works for Mac OS X 10.6.6 too. Thank you very much for your effort and the very quick help. Awesome!


Best regards,
Oliver
(0025586)
Clinton Stimpson (developer)
2011-02-25 23:24

Ok, I think this transparency issue is fixed.
http://vtk.org/gitweb?p=VTK.git;a=commit;h=bccc28 [^]

 Issue History
Date Modified Username Field Change
2011-02-14 07:46 thorbenk New Issue
2011-02-14 07:46 thorbenk File Added: test-qvtkwidget.py
2011-02-23 08:17 Christoph Sommer File Added: test-qvtkwidgetInLayout.py
2011-02-23 08:19 Christoph Sommer File Added: screenShotForOption3.png
2011-02-23 08:26 Christoph Sommer Note Added: 0025560
2011-02-23 08:45 Oliver Petra Note Added: 0025561
2011-02-23 09:23 thorbenk Tag Attached: python
2011-02-23 09:23 thorbenk Tag Attached: qt
2011-02-23 18:57 Clinton Stimpson Note Added: 0025566
2011-02-24 03:32 thorbenk Note Added: 0025569
2011-02-24 05:15 Christoph Sommer File Added: test-qvtkwidget2_TestCaseWindowsTranparency.py
2011-02-24 05:18 Christoph Sommer Note Added: 0025571
2011-02-24 07:55 Oliver Petra Note Added: 0025573
2011-02-25 23:23 Clinton Stimpson Assigned To => Clinton Stimpson
2011-02-25 23:23 Clinton Stimpson Status backlog => tabled
2011-02-25 23:24 Clinton Stimpson Note Added: 0025586
2011-06-16 13:12 Zack Galbreath Category Development => (No Category)
2011-10-03 17:32 Clinton Stimpson Project => TBD
2011-10-03 17:32 Clinton Stimpson Type => incorrect functionality
2011-10-03 17:32 Clinton Stimpson Status backlog => todo
2011-10-03 17:32 Clinton Stimpson Resolution open => fixed
2011-10-03 17:32 Clinton Stimpson Fixed in Version => 5.8
2011-10-03 17:32 Clinton Stimpson Status todo => active development
2013-07-22 19:57 Dave DeMarle Status active development => closed
2013-07-22 19:57 Dave DeMarle Fixed in Version 5.8 => 5.10.0


Copyright © 2000 - 2018 MantisBT Team