[Ves] Android Kiwiviewer: change KiwiGlSurfaceView background color

Wright James (NHS Greater Glasgow & Clyde) jamie.wright at nhs.net
Tue May 20 08:21:38 EDT 2014


Hi Pat and Aashish,

Thanks for your help in this. The task I'm trying to achieve is porting some VTK pipelines to visualise medical data that I have written in python onto an Android application for remote and portable viewing. Not being a programmer by trade, and not being able to work on this full time I am stretching the limits of my coding abilities trying to integrate the c++ api into the Android framework. I may have to go back and learn about Java JNI programming and openGL ES before I can achieve my aims.

Thanks for developing the VES and Kiwi libraries, I am sure they will very useful in the future

Jamie

Jamie Wright | Clinical Scientist | Nuclear Medicine
jamie.wright at nhs.net

________________________________
From: Pat Marion [james.patrick.marion at gmail.com]
Sent: 19 May 2014 21:01
To: Wright James (NHS Greater Glasgow & Clyde)
Cc: Aashish Chaudhary; ves at public.kitware.com
Subject: Re: [Ves] Android Kiwiviewer: change KiwiGlSurfaceView background color

Hi Jamie,

Ideally, the entire kiwi c++ api would be available to you to call directly from the java files.  The idea would be to use a tool like Swig to automatically generate java bindings.  I started a work-in-progress branch that explored using Swig to generate java and python bindings to Kiwi, but that work was not completed.  So for now, you must manually extend KiwiNative.java and KiwiNative.cpp to hand-write jni interface methods.  So you could do that, write a new jni interface, to set the background color from Java.  Or you could set the background color one time just in the setupGraphics() method of KiwiNative.cpp.  I guess I'd recommend going the jni route for most flexibility.  The jni methods are defined in KiwiNative.cpp and in KiwiNative.java.

Pat


On Mon, May 19, 2014 at 3:52 PM, Wright James (NHS Greater Glasgow & Clyde) <jamie.wright at nhs.net<mailto:jamie.wright at nhs.net>> wrote:
I had seen that method but I couldn't see where it was actually used to set the blue background.

When using the vesKiwi cpp files is the idea to access them through the JNI by calling them in KiwiNative.java and using them in other .java files? Or should I be editing the vesKiwi*.cpp files directly and rebuilding kiwiviewer each time? Apologies if this is explained on the wiki or elsewhere but I haven't been able to Google any results

Jamie

________________________________________
From: Aashish Chaudhary [aashish.chaudhary at kitware.com<mailto:aashish.chaudhary at kitware.com>]
Sent: 19 May 2014 17:01
To: Wright James (NHS Greater Glasgow & Clyde)
Cc: ves at public.kitware.com<mailto:ves at public.kitware.com>
Subject: Re: [Ves] Android Kiwiviewer: change KiwiGlSurfaceView background color

Have a look at the vesKiwiBaseApp.h and this method: setBackgroundColor.

Let me know if this helps.

- Aashish



On Mon, May 19, 2014 at 11:58 AM, Wright James (NHS Greater Glasgow & Clyde) <jamie.wright at nhs.net<mailto:jamie.wright at nhs.net><mailto:jamie.wright at nhs.net<mailto:jamie.wright at nhs.net>>> wrote:
Dear All,

I am trying to integrate VES into an Android application using the Kiwiviewer example application as a start. At present the default background color in the GlSurfaceView in this application is light blue. How can I change this to a different color? Apologies if this is an easy question but it's got me stumped.

thanks, Jamie


********************************************************************************************************************

This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.

Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and Scotland
NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients
NHSmail provides an email address for your career in the NHS and can be accessed anywhere

********************************************************************************************************************

_______________________________________________
Ves mailing list
Ves at public.kitware.com<mailto:Ves at public.kitware.com><mailto:Ves at public.kitware.com<mailto:Ves at public.kitware.com>>
http://public.kitware.com/cgi-bin/mailman/listinfo/ves




--
| Aashish Chaudhary
| Technical Leader
| Kitware Inc.
| http://www.kitware.com/company/team/chaudhary.html

********************************************************************************************************************

This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.

Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and Scotland
NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients
NHSmail provides an email address for your career in the NHS and can be accessed anywhere

********************************************************************************************************************
_______________________________________________
Ves mailing list
Ves at public.kitware.com<mailto:Ves at public.kitware.com>
http://public.kitware.com/cgi-bin/mailman/listinfo/ves


********************************************************************************************************************

This message may contain confidential information. If you are not the intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.

Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS staff in England and Scotland
NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients
NHSmail provides an email address for your career in the NHS and can be accessed anywhere

********************************************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20140520/39bb9684/attachment-0003.html>


More information about the Ves mailing list