View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0016049 | VTK | (No Category) | public | 2016-03-29 12:01 | 2016-08-12 09:55 | ||||
Reporter | Stefano Borini | ||||||||
Assigned To | Kitware Robot | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0016049: Incorrect rendering of Axes when rendering to an image file | ||||||||
Description | The following code does not render the axes when magnification is not 1. import sys import vtk print vtk.vtkVersion().GetVTKVersion() #.SetSolidTypeToIcosahedron(); cs = vtk.vtkConeSource() cs.SetResolution(36) cs.SetRadius(1.0) m = vtk.vtkPolyDataMapper() m.SetInputData(cs.GetOutput()) p = vtk.vtkProperty() p.SetRepresentationToWireframe() a = vtk.vtkActor() a.SetMapper(m) a.SetProperty(p) p.SetColor(0.8, .1, .9) ren = vtk.vtkRenderer() ren.SetBackground(0.7, 0.7, 0.7) ren.AddViewProp(a) ren.viewport = (0, 0, 0.5, 1.0) axes = vtk.vtkCubeAxesActor2D() axes.SetInputData(cs.GetOutput()) axes.SetCamera(ren.GetActiveCamera()) ren.AddViewProp(axes) ren.GetActiveCamera().SetPosition(0.0, 2.0, 0.0) ren.GetActiveCamera().SetFocalPoint(0.0, 0.0, 0.0) ren.GetActiveCamera().SetParallelProjection(True) renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren) iren = vtk.vtkRenderWindowInteractor() cs.Update() iren.SetRenderWindow(renWin) ren.ResetCamera() iren.Initialize() w2if = vtk.vtkWindowToImageFilter() w2if.SetMagnification(int(sys.argv[1])) w2if.SetInput(renWin) ex = vtk.vtkPNGWriter() ex.SetFileName('bar.png') ex.SetInputConnection(w2if.GetOutputPort()) cs.Update() renWin.Render() ex.Update() ex.Write() iren.Start() You can see more detail about the issue at https://github.com/enthought/mayavi/issues/314 [^] but the gist of the issue is, as far as I could gather, that the tiling disrupts the Ortho transformation, producing an incorrect vtkRenderer::WorldToView transformation. I might keep digging into the issue, but not being familiar with the internals, I don't know if this is intended behavior that is supposed to be offset somewhere else. | ||||||||
Tags | No tags attached. | ||||||||
Project | TBD | ||||||||
Type | incorrect functionality | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0035865) Stefano Borini (reporter) 2016-03-29 12:02 |
A comment: verified in vtk7, as well as older versions. |
(0037466) Kitware Robot (administrator) 2016-08-12 09:55 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2016-03-29 12:01 | Stefano Borini | New Issue | |
2016-03-29 12:02 | Stefano Borini | Note Added: 0035865 | |
2016-08-12 09:55 | Kitware Robot | Note Added: 0037466 | |
2016-08-12 09:55 | Kitware Robot | Status | backlog => closed |
2016-08-12 09:55 | Kitware Robot | Resolution | open => moved |
2016-08-12 09:55 | Kitware Robot | Assigned To | => Kitware Robot |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |