[Ves] Passing data from VES to objective-C

Belsey, Daniel (UK) Daniel.Belsey at baesystems.com
Thu Apr 19 10:46:23 EDT 2012


Hi,

I'm new to all of VES, VTK, objective-C and iOS dev - so apologies if any of this is obvious!

My initial task is to modify the brain atlas example included in Kiwiviewer, so that when a part of the brain is double-tapped, instead of the part's name appearing as it does now, it instead appears in a message-box. The idea being, further down the line we'll be storing a web link instead of the part's name, and then hopefully get some content from the web link and display this in the message box.

We were originally going to do it with Android, but we don't have a linux machine available and had no joy getting it working on my windows machine (and then found from this mailing list that Cygwin was unsupported too!) so now there's a Mac in the process of being set up and I've been asked to do it for iOS instead.

I'm having trouble wrapping my head around how to do this, however. I've got a rough idea - presumably EAGLView.mm's handleDoubleTapGesture method can be modified to show a UIAlertView, but I don't know quite how to get the data from the app's handleDoubleTap method.

I'm assuming (and please correct me on this!) that vesKiwiViewerApp::handleDoubleTap gets called first, and that then calls BrainRepresentation::handleDoubleTap. I'm not sure if this is true because I don't really understand the use of rep; but, if this is true, I'm guessing it wouldn't be too hard to change the return types to String in both cases (and make sure the conditionals still make sense), but even if this is true, I'm then not sure how to handle this on the object-C side of things. Would it just be as simple as adding:

NSString* name = self->renderer.app->handleDoubleTap(currentLocation.x, currentLocation.y);

Apologies for the vague email - I think I just need some direction!

Many thanks in advance,

Dan


********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ves/attachments/20120419/ace79df9/attachment.html>


More information about the Ves mailing list