Thank you so much for your comprehensive
reply!
I think I got most of it figured out now,
but I has just another question.
I have this connection
Pick_1 extract ("data") select format caption collect (which also has the objects collecting here) image, image, image (three branches to image views)
When I run it, I get this error "FORMAT:
Bad parameter: template must be a string"
I didn't make any changes to any of
the tools, expect pick_1, in which I checked the interpolate box, and set it to
1.
Any ideas?
Thanks soo much,
Dave
p.s. do you know hwo to get rid of the
previous picks? Once I want to select a different pick, the last one doesn't
go away.
-Original Message-
From: Chris Pelkie
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 01, 2004
12:40 PM
To:
opendx2-users@lists.berlios.de
Subject: Re: [opendx-users]
coordinate selecting protocol
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