Pick is 'weird' in the world of DX modules. It works as follows:
1. Pick doesn't actually have to connect to anything, it just has to be in the net somewhere.
2. The modules that create the object(s) to be picked are upstream of Image in the net.
3. There is no necessary 'ordering' of Pick and those other modules (it can come before or after).
4. There is no necessary connection to the input(s) of Pick from any other module.
5. It is illegal (in data-flow) to connect the output of Image to the input of Pick (or to any other module upstream of Image).

So how does Pick get an answer from Image?
It's a secret trap-door arrangement.

1. By virtue of at least one Pick module in a net, the Image View Controls will light up the "Pick" menu with the user-specified or default names of each Pick module. Choose the one you want.
2. Click on an object in the Image. Presumably, as a beginner, you have NOT constrained the Pick to be permitted on a subset of the Image scene (though this is an option). Thus, by clicking on the object, you will have made a successful Pick.
3. The result of Pick is now internally passed back from Image to the named Pick module. Technically, it WILL be passed back on the NEXT execution of the net. So if you are in Execute Once mode, you Pick and nothing happens. But if you are in Execute on Change mode, your pick is returned immediately back up to the corresponding Pick module.*
4. The way to get the creamy goodness out of Pick is to attach a Print("rd"). This will reveal the internal structure of the Pick'ed result.
5. To do something useful with that mess, unhook the Print, and connect and Extract("positions") or ("data") or ("closest vertex") or whatever part you want to see or export. You can have multiple Extracts side-by-side all fed by different outputs of the same Pick.

*Because initially there is no Pick, asking for the output of Pick (with Print for example) before making the pick creates a whiny error message "there is no pick". Ignore it; make a pick, error gone. There is a more elegant way to deal with this: later.

6. I usually put a Select(0) right after each Extract to guarantee I get the first (or only) value returned in each Extract array.
7. Feed the outputs of the Select's to a Format to construct a readable string, then send that to Caption and Collect the Caption with the objects you are picking on, and send to Image.
8. Now, in Execute On Change mode, as you make each pick, the Caption will update to show the result of the most current pick.

9. I almost always set Pick(interpolate=1). I believe Pick(interpolate=0) means you must hit an object precisely (often difficult with points or lines). interpolate=1 means DX will take your sloppy pick, magnetically snap to the nearest real position in the object, then report the uninterpolated value(s) at the real position ('closest vertex'), as well as the sloppy actual pick position (garbage usually) and the uninterpolated real data values found at closest vertex. interpolate=2 will map the data from nearby vertices to your sloppy pick point. This is usually not desirable.



On Wednesday, Dec 1, 2004, at 10:49 America/New_York, Herman, David ((NIH/NIMH)) wrote:

Hello,
Thank you for your replies. I'm still having a little trouble
working it out.

Details:
What I have are brain images, 30,000 pts on each hemisphere. The points are
imported to dx from a file in which the points are rendered in loops from
front to back like you were tracing the outline of a brain that was sliced
from front to back.

Questions:
1) despite reading the manual on pick, I can't seem to figure out how to
connect the pick tool. I was able to have the output of image (image
renderable) connect to the input of pick, but when I try to output the
result of the pick to caption, I get the error "output parameter type and
input parameter type do not match". Does anyone know how I can get the
output displayed (that is, the 3 coordinates and the 4th data variable), and
also how I can save them to a text file?

2) when I look in the locations bar in pick, I see that when I click on a
point, it's adds to it 2 numbers. Any idea what these are? The data isn't
2-d, it's 4-d (x,y,z,data).

3) I'm try to select the actual points that make EXACTLY with the input
coordinates from the actual data file. I can't seem to figure out which
option in pick to make sure I get these values.

4) some one mentioned used map, would this be better?

Thank sooo much for your help,
Dave
p.s. I'm obviously new to data explorer, so please excuse my confusion.
Thanks!



-----Original Message-----
From: Allen H. Nugent [mailto:[EMAIL PROTECTED]
Sent: Friday, November 26, 2004 11:41 PM
To: [email protected]
Subject: Re: [opendx-users] coordinate selecting protocol



In addition to Chris' advice, you can display the coords (as found with
{Pick}) using {Caption}.

Regards,

Allen H. Nugent
Graduate School of Biomedical Engineering
University of New South Wales
Sydney NSW 2052 Australia
Tel: +61 2 9385 3916 Fax: +61 2 9663 2108


_______________________________
Chris Pelkie
Scientific Visualization Producer
622 Rhodes Hall, Cornell Theory Center
Ithaca, NY 14853

Reply via email to