[Ves] Passing data from VES to objective-C

Aashish Chaudhary aashish.chaudhary at kitware.com
Thu Apr 19 11:13:45 EDT 2012


Hi Dan,

On Thu, Apr 19, 2012 at 10:46 AM, Belsey, Daniel (UK)
<Daniel.Belsey at baesystems.com> wrote:
> 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.

If I recall this sounds correct.

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);

I will let Pat give you more details on it but I would think that you
can derive your own representation from
vesKiwiBrainAtlasRepresentation and  then add a new  method that can
give
a string name of the model, call this method findModel(x,y) or something.

HTH,
Aashish



>


>
>
> 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.
> ********************************************************************
>
>
> _______________________________________________
> Ves mailing list
> Ves at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/ves
>



-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com



More information about the Ves mailing list