Re: [Plib-users] Interface Question
Brought to you by:
sjbaker
|
From: Steve B. <sjb...@ai...> - 2002-04-07 04:04:18
|
peter n squire wrote: > I am working on creating a Virtual MRI using Opengl and PUI. I read in > a MRI data set that prints about 1,000 or so pixels. My main for writing > the last question was I want to do functions/operations within a set/stationary > sized window. I want to do a couple of things with the pixels, that right now > I am having diffculty doing. OK. > 1. Alter the size of the pixels using the glScale()... That won't work. The size of GL_POINTS primitives is set with glPointSize() the glScale command scales the vertices you send into OpenGL - but a point is always a point. Some OpenGL implementations also support glPointParameterfvEXT which is an OpenGL *extension* that allows you to do nice things like have points whose size changes with distance. > 2. I would like to have a user be able to select a section with in the image > that they would like to display. For example I would receive min_x and min_y > and max_x and max_y points from the user; for the desiganted area with in > the pixels that they want to examine. From these points selection I would > like to be able to show the selected area as the same size as the previous > pixel picture was shown. Well, for this kind of complexity, you wouldn't want to draw the points inside a PUI widget anyway - I think you should just render them in the regular GLUT window in your redraw callback function. You can use the mouse motion callback to remember the coordinates of the mouse when the button is pressed (and PUI said it didn't use the click) - then note when the button is still held down and render a 'selection box'. When the mouse is released again, you'll know the extent of the box and you'll need to figure out how much you need to scale the image to make it do what you want. > Basically I would like to setup a 50 by 50 viewing area with in the window > that I would be able to conduct pixel manipulation on and always have the > redrawn pixels with in that frame. I have attached the code that I am working > with for further clarification. I don't have the time to work through all your problems - they really aren't PLIB-related. ----------------------------- Steve Baker ------------------------------- Mail : <sjb...@ai...> WorkMail: <sj...@li...> URLs : http://www.sjbaker.org http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net http://freeglut.sf.net http://toobular.sf.net http://lodestone.sf.net |