Re: [GtkGLExt] gtkglext or goocanvas?
- From: Mitchell Laks <mlaks post harvard edu>
- To: gtkglext-list gnome org
- Subject: Re: [GtkGLExt] gtkglext or goocanvas?
- Date: Wed, 30 Apr 2008 18:39:56 -0400
On 21:35 Wed 30 Apr , z pekar gmail com wrote:
> I mean, I should be able to react(by calling a callback) on a click
> made on an ellipse and I should know which ellipse it was - just like
> in a regular gtk button - I want to attach a callback to an ellipse...
> > drawing_area
> > then you use the drawing_area set_events method
> > to include button-press-mask etc.
> thats exactly what goocanvas is for(as far as I understand) - it deals
> with low level mouse click events and checks whether it meets
> perimeter criteria so that I can work with such an ellipse as with a
> normal gtk widget - I surely do not want to implement all this stuff
> myself - I'll better take goocanvas. The question is - do I have to or
> maybe gtkglext also offers such functionality.
Zeev,
gtkglext just wraps opengl for gtk. That is all. It provides a way to use the OpenGL API engine
that your software emulation (MESA) or your high end video card ( nvidia or ati etc), provides to you.
Now OpenGL is not really intended to do windows type stuff. That you were supposed to do that
with other software. So for instance in the beginning Mark Kilgard wrote GLUT to give some basic windowing stuff.
for which you can refer to:
http://www.opengl.org/resources/libraries/glut/
They reference a bunch of toolkits (not including gtk+ for some reason ...) which are also available.
Now, I am not an expert in opengl, just a beginner, so you would need to ask one if there is some OpenGL extension that
allows you to pick subobjects such as an ellipse within a drawingarea, and I am unaware of any.
> >
> > I use gtkglext with perl for similar stuff to display medical images
> > and draw on them. While I don't count mouseclicks - I need to be aware
> > of them :).
> it is exactly what I need - I have to mark with ellipse certain areas
> on an ultrasound image and then be aware of clicks on those marked
> areas.
Are you working within an application framework on a ultrasound machine or in a radiology reading workstation?
>
> >
> > If you want code for gtkglextmm or gtkglext and mouse events
> > just combine drawingarea and standard gtk code for mouse click events.
> > drawingarea is the simplest interface to low level gtk events. look
> > up scribble tutorials for gtk.
> I didn't understand - do you use gtkglext for this kind of things or
> do you take drawingarea?
I use the low level gdk/gtk functions to address points and locations in the window buffer.
As far as I know That is what we do it with gtkglext.
If you can use a canvas, then that might make sense. I have never looked in to them.
Why do you need to draw ellise on an ultrasound and then check position? I can imagine
drawing ROI circles, but then to check position just do all work with origin and distance to origin of circle.
Why do you need a full canvas api?
> And, if it is not a problem, could you, please, provide a sample of
> code where you display medical images and draw on them.
I have not begun drawing on them I just display and scroll stacks of images and then will
be implementing ROI with ellipse or circle or square to get valuess. I just
implemented display.
My code is not yet ready for display. On the other hand you can look at OsiriX for macc
and aeskulap project which is nice gtkmm application that displays medical images
however not via opengl. aeskulap is available on debian.
Mitchell
>
> תודה רבה
> Meshulum Laks
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > >
> > > On Wed, Apr 30, 2008 at 4:35 PM, Mitchell Laks <mlaks post harvard edu> wrote:
> > > > On 22:22 Sat 26 Apr , z pekar gmail com wrote:
> > > > > Hi, I need to upload an image to my app and place clickable ellipses
> > > > > on it (and connect a signal handler to them) - I was told I should use
> > > > > goocanvas to do it.
> > > >
> > > > I am not sure what you mean by clickable ellipses ...
> > > > :)
> > > >
> > > > I guess you want to display a composite of the picture and '...' next to it.
> > > >
> > > > You can certainly use gtkglext to display your image in any gtk widget,
> > > > which can then be placed in a HBox next to a button or widget which displays
> > > > the ...-.
> > > >
> > > > I guess you have to see if it looks nice to you :).
> > > >
> > > > Mitchell
> > > >
> > > >
> > > > >I already use gtkglext in my program, so the
> > > > > question is whether gtkglext can do the job or I anyway have to take
> > > > > goocanvas? (I just don't want to have a new unnecessary dependence).
> > > > >
> > > > > thank you in advance
> > > > > Zeev Pekar
> > > > > _______________________________________________
> > > > > gtkglext-list mailing list
> > > > > gtkglext-list gnome org
> > > > > http://mail.gnome.org/mailman/listinfo/gtkglext-list
> > > > _______________________________________________
> > > > gtkglext-list mailing list
> > > > gtkglext-list gnome org
> > > > http://mail.gnome.org/mailman/listinfo/gtkglext-list
> > > >
> > > _______________________________________________
> > > gtkglext-list mailing list
> > > gtkglext-list gnome org
> > > http://mail.gnome.org/mailman/listinfo/gtkglext-list
> >
> _______________________________________________
> gtkglext-list mailing list
> gtkglext-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkglext-list
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]