<div dir="ltr"><div><div><div>Jamie, you could try using the Kiwi scene file. The scene file can be used to load one or more datasets and set visualization properties of the datasets and scene, including background color (solid color, gradient color, or textured image background). The scene file is supported in the KiwiViewer 2.0 for iOS, but for Android you need to download the 2.0 apk from this link instead of the Google Play store:<br>
<br><a href="http://packages.kitware.com/packages/application/view?applicationId=14">http://packages.kitware.com/packages/application/view?applicationId=14</a><br><br><br></div>For an example of the scene file, check out this zip file here:<br>
<br><a href="https://midas3.kitware.com/midas/item/34777">https://midas3.kitware.com/midas/item/34777</a><br><br><br></div>More documentation of the scene file format is here:<br><br><a href="http://www.vtk.org/Wiki/VES/KiwiViewer_Scene_File#JSON_scene_file_for_KiwiViewer_v2.0">http://www.vtk.org/Wiki/VES/KiwiViewer_Scene_File#JSON_scene_file_for_KiwiViewer_v2.0</a><br>
<br></div>You can either bundle datasets with a .kiwi scene file in a zip, or distribute the .kiwi file standalone and reference datasets by url, KiwiViewer will download the data using http or ftp.<br><div><div><br><br>
Pat<br>
</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 20, 2014 at 8:21 AM, Wright James (NHS Greater Glasgow & Clyde) <span dir="ltr"><<a href="mailto:jamie.wright@nhs.net" target="_blank">jamie.wright@nhs.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="FONT-FAMILY:Tahoma;DIRECTION:ltr;COLOR:#000000;FONT-SIZE:x-small">
<div>Hi Pat and Aashish,</div>
<div><font face="tahoma"></font> </div>
<div><font face="tahoma">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. </font></div>
<div><font face="tahoma"></font> </div>
<div><font face="tahoma">Thanks for developing the VES and Kiwi libraries, I am sure they will very useful in the future</font></div>
<div><font face="tahoma"></font> </div>
<div><font face="tahoma">Jamie</font></div>
<div>
<div><font>
<div><br>
Jamie Wright | Clinical Scientist | Nuclear Medicine </div>
<div><a href="mailto:jamie.wright@nhs.net" target="_blank">jamie.wright@nhs.net</a></div>
</font></div>
</div>
<div dir="ltr"><font color="#000000" face="Tahoma"></font> </div>
<div style="DIRECTION:ltr">
<hr>
<font color="#000000" face="Tahoma"><b>From:</b> Pat Marion [<a href="mailto:james.patrick.marion@gmail.com" target="_blank">james.patrick.marion@gmail.com</a>]<br>
<b>Sent:</b> 19 May 2014 21:01<div class=""><br>
<b>To:</b> Wright James (NHS Greater Glasgow & Clyde)<br>
</div><b>Cc:</b> Aashish Chaudhary; <a href="mailto:ves@public.kitware.com" target="_blank">ves@public.kitware.com</a><div class=""><br>
<b>Subject:</b> Re: [Ves] Android Kiwiviewer: change KiwiGlSurfaceView background color<br>
</div></font><br>
</div>
<div></div>
<div><div class="">
<div dir="ltr">
<div>Hi Jamie,<br>
<br>
</div>
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.<br>
<br>
Pat<br>
</div>
</div><div><div class="h5"><div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Mon, May 19, 2014 at 3:52 PM, Wright James (NHS Greater Glasgow & Clyde)
<span dir="ltr"><<a href="mailto:jamie.wright@nhs.net" target="_blank">jamie.wright@nhs.net</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
I had seen that method but I couldn't see where it was actually used to set the blue background.<br>
<br>
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<br>
<br>
Jamie<br>
<br>
________________________________________<br>
From: Aashish Chaudhary [<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>]<br>
Sent: 19 May 2014 17:01<br>
To: Wright James (NHS Greater Glasgow & Clyde)<br>
Cc: <a href="mailto:ves@public.kitware.com" target="_blank">ves@public.kitware.com</a><br>
Subject: Re: [Ves] Android Kiwiviewer: change KiwiGlSurfaceView background color<br>
<div><br>
Have a look at the vesKiwiBaseApp.h and this method: setBackgroundColor.<br>
<br>
Let me know if this helps.<br>
<br>
- Aashish<br>
<br>
<br>
<br>
</div>
<div>
<div>On Mon, May 19, 2014 at 11:58 AM, Wright James (NHS Greater Glasgow & Clyde) <<a href="mailto:jamie.wright@nhs.net" target="_blank">jamie.wright@nhs.net</a><mailto:<a href="mailto:jamie.wright@nhs.net" target="_blank">jamie.wright@nhs.net</a>>> wrote:<br>
Dear All,<br>
<br>
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.<br>
<br>
thanks, Jamie<br>
<br>
<br>
********************************************************************************************************************<br>
<br>
This message may contain confidential information. If you are not the intended recipient please inform the<br>
sender that you have received the message in error before deleting it.<br>
Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:<br>
to do so is strictly prohibited and may be unlawful.<br>
<br>
Thank you for your co-operation.<br>
<br>
NHSmail is the secure email and directory service available for all NHS staff in England and Scotland<br>
NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients<br>
NHSmail provides an email address for your career in the NHS and can be accessed anywhere<br>
<br>
********************************************************************************************************************<br>
<br>
</div>
</div>
_______________________________________________<br>
Ves mailing list<br>
<a href="mailto:Ves@public.kitware.com" target="_blank">Ves@public.kitware.com</a><mailto:<a href="mailto:Ves@public.kitware.com" target="_blank">Ves@public.kitware.com</a>><br>
<div><a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ves" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/ves</a><br>
<br>
<br>
<br>
<br>
--<br>
| Aashish Chaudhary<br>
| Technical Leader<br>
| Kitware Inc.<br>
| <a href="http://www.kitware.com/company/team/chaudhary.html" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a><br>
<br>
</div>
<div>********************************************************************************************************************<br>
<br>
This message may contain confidential information. If you are not the intended recipient please inform the<br>
sender that you have received the message in error before deleting it.<br>
Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:<br>
to do so is strictly prohibited and may be unlawful.<br>
<br>
Thank you for your co-operation.<br>
<br>
NHSmail is the secure email and directory service available for all NHS staff in England and Scotland<br>
NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients<br>
NHSmail provides an email address for your career in the NHS and can be accessed anywhere<br>
<br>
********************************************************************************************************************<br>
</div>
<div>
<div>_______________________________________________<br>
Ves mailing list<br>
<a href="mailto:Ves@public.kitware.com" target="_blank">Ves@public.kitware.com</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ves" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/ves</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div></div></div>
</div><div><div class="h5">
<br>
<font color="Black" face="Courier New">********************************************************************************************************************<br>
<br>
This message may contain confidential information. If you are not the intended recipient please inform the<br>
sender that you have received the message in error before deleting it.<br>
Please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents:<br>
to do so is strictly prohibited and may be unlawful.<br>
<br>
Thank you for your co-operation.<br>
<br>
NHSmail is the secure email and directory service available for all NHS staff in England and Scotland<br>
NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and GSi recipients<br>
NHSmail provides an email address for your career in the NHS and can be accessed anywhere<br>
<br>
********************************************************************************************************************<br>
</font>
</div></div></div>
</blockquote></div><br></div>