Skip to content
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
Closed

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

danlipsa opened this issue Dec 17, 2015 · 17 comments
Assignees
Milestone

Comments

@danlipsa
Copy link
Contributor

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
Copy link
Contributor Author

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

@doutriaux1
Copy link
Contributor

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
Copy link
Contributor

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

@jbeezley
Copy link
Contributor

Probably not, I know almost nothing about VTK.

@doutriaux1
Copy link
Contributor

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

@danlipsa danlipsa changed the title canvas.png writes a PNG with lables off if bg=0 canvas.png writes a PNG with labels off if bg=0 Dec 18, 2015
@chaosphere2112
Copy link
Contributor

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

@aashish24
Copy link
Contributor

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

@aashish24
Copy link
Contributor

thanks @chaosphere2112 for the reference.

@danlipsa
Copy link
Contributor Author

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
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
This also fixes BUG #78 in cdat-web.
For both bugs, VTKPlots.configureEvent is not called to reposition the labels.
@danlipsa
Copy link
Contributor Author

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
BUG #1740: plotting with bg=0 produces labels off
@danlipsa
Copy link
Contributor Author

danlipsa commented Apr 1, 2016

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

@doutriaux1
Copy link
Contributor

@danlipsa is that coming soon? Just curious.

@danlipsa
Copy link
Contributor Author

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
Copy link
Contributor

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

@danlipsa
Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Member

durack1 commented Apr 5, 2017

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

@durack1 durack1 closed this as completed Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants