[vtkusers] scale of rendered object in vtkEGLRenderWindow (Android)

Brian Miller b1.miller at samsung.com
Thu Sep 8 15:14:02 EDT 2016




Hello:


I am working on some code that is based initially on the example from VTK 7.0.0
in
Examples/Android/JavaVTK

My Android view extends GLSurfaceView, as in that example, with the
same EGLContext and EGLConfig as in that example.

I have been able to modify this Android example to display a JPG image from
/sdcard/DCIM/Camera/*.jpg

on the screen, after using vtkImageImport to import it and vtkImageActor as the actor

However, the image is being displayed at a reduced size, about half of the original,
in the middle of the screen, with a lot of black border around it.
I verified that VTK is able to draw to the entire screen, and I can change the black
border to red / green / blue by calling SetBackground(r, g, b) on the vtkRenderer.

I have tried a number of the VTK APIs such as
SetSize, SetScale, SetAspect, SetFullScreen(true), etc ...
but it continues to display only at a reduced size.

I am testing on a screen with resolution 2560 * 1440
and the JPEG file I am reading is that same resolution also.

Any ideas on how to get the image to display full screen when rendered by VTK ?

Brian Miller

 


More information about the vtkusers mailing list