New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

canvas.png writes a PNG with labels off if bg=0 #1740

Closed
danlipsa opened this Issue Dec 17, 2015 · 17 comments

Comments

Projects
None yet
6 participants
@danlipsa
Contributor

danlipsa commented Dec 17, 2015

Running this test
test2.txt
produces
bad
Uncommenting the line that sets bg to 1 fixes the problem.

@danlipsa danlipsa self-assigned this Dec 17, 2015

@danlipsa

This comment has been minimized.

Contributor

danlipsa commented Dec 17, 2015

@aashish24 @doutriaux1 Is this important? Should we fix it before the release?

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Dec 17, 2015

actually yes! Lots of people run things in batch mode. Is it going to be long? Let's see if we can get the other PR in before we move to this one!

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Dec 17, 2015

@jbeezley do you think you can help with this one? Looks like it's bugging you as well.

@jbeezley

This comment has been minimized.

Contributor

jbeezley commented Dec 17, 2015

Probably not, I know almost nothing about VTK.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Dec 17, 2015

Is there such a person at Kitware? 😉 No worries.

@danlipsa danlipsa changed the title from canvas.png writes a PNG with lables off if bg=0 to canvas.png writes a PNG with labels off if bg=0 Dec 18, 2015

@chaosphere2112

This comment has been minimized.

Contributor

chaosphere2112 commented Feb 5, 2016

@danlipsa @doutriaux1 This is the issue that I filed ages ago with VTK; we have it as #1148.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Feb 5, 2016

@danlipsa I can look into it after I finish my sprint tasks let me know.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Feb 5, 2016

thanks @chaosphere2112 for the reference.

@danlipsa

This comment has been minimized.

Contributor

danlipsa commented Feb 5, 2016

@aashish24 @doutriaux1 @chaosphere2112 I looked at this briefly when I filed it. The reason why the labels are off seems to be that the display happens on a very large screen which is not available if bg=0. There these events that have to be dealt with properly: ModifiedEvent and ConfigureEvent. This is in VTKPlots.py

That is not to say that there is not a VTK bug somewhere as well :-) I have not seen Sam's bug report at all when I looked at this.

@doutriaux1 doutriaux1 added this to the 2.6 milestone Feb 8, 2016

danlipsa added a commit that referenced this issue Mar 1, 2016

BUG #1740: plotting with bg=0 produces labels off
This also fixes BUG #78 in cdat-web.
For both bugs, VTKPlots.configureEvent is not called to reposition the labels.

danlipsa added a commit that referenced this issue Mar 1, 2016

BUG #1740: plotting with bg=0 produces labels off
This also fixes BUG #78 in cdat-web.
For both bugs, VTKPlots.configureEvent is not called to reposition the labels.
@danlipsa

This comment has been minimized.

Contributor

danlipsa commented Mar 2, 2016

The case when you don't specify a window size (as the test is written) has been fixed by:
#1821
When we specify a window size bigger than the screen size:
x=vcs.init()
x.open(4000, 3000)
we still produce the wrong result.
This seems to be related to the fact that vtkXOpenGLRenderWindow.GetSize() returns (4000,3000) even if the window has been resized to the screen size.

danlipsa added a commit that referenced this issue Mar 7, 2016

Merge pull request #1862 from UV-CDAT/labels-off
BUG #1740: plotting with bg=0 produces labels off
@danlipsa

This comment has been minimized.

Contributor

danlipsa commented Apr 1, 2016

This might be fixed when we switch VTK to OpenGL2 - a new, much faster, rendering backend in VTK

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Apr 1, 2016

@danlipsa is that coming soon? Just curious.

@danlipsa

This comment has been minimized.

Contributor

danlipsa commented Apr 1, 2016

@doutriaux1 @aashish24 This new backend is the default in VTK and ParaView now. So, we could bite the bullet and switch UVCDAT to it soon. I think there are some changes to export to PS/PDF which might cause some issues The new backend requires OpenGL: >= 3.2 and Mesa >= 11.2 I think. If one has a hardware driver there should not be any problems. Mesa might need a rebuild as certain distributions have older versions.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Apr 1, 2016

@danlipsa we build our own mesa anyway so it shouldnt be an issue.

@danlipsa

This comment has been minimized.

Contributor

danlipsa commented Apr 1, 2016

@doutriaux1 Sounds good. See
https://blog.kitware.com/messing-with-mesa-for-paraview-5-0vtk-7-0/
for some options for building the new mesa.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Apr 2, 2016

There should be a new Mesa out so hopefully instead of the patch (which I believe the blog mentiond) we can try it directly.

@durack1

This comment has been minimized.

Member

durack1 commented Apr 5, 2017

@danlipsa: @chaosphere2112 @durack1 @doutriaux1 This works with vcs SHA f6a88670f89bcbd476c106c6d5695902581ca565 from Apr 5.

@durack1 durack1 closed this Apr 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment