comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » VECTOR_FIELD trouble
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
VECTOR_FIELD trouble [message #49859] Tue, 22 August 2006 04:12
Jo Klein is currently offline  Jo Klein
Messages: 54
Registered: January 2006
Member
Dear IDL wizards,
Has anyone got experience with the use of VECTOR_FIELD? The data I have
is quite simple: It's a volume of vectors, where for each spatial
position of a 3D regular grid I've got x, y and z as the projections of
a unit-length vector centred on those grid locations. It's volume data
from diffusion tensor MRI, and the vectors describe apparent diffusion
directions at any given point in the object studied (a brain, in this
case). So, to visualise the vectors, I browsed the docs and thought
VECTOR_FIELD should do the job, but I can't figure out how to use it.
One slice extracted from the data looks like this (z dimension of the
vectors dropped):
IDL> help,myslice
MYSLICE FLOAT = Array[2, 128, 104]
IDL> print,myslice[*,60:62,50]
-0.393992 0.305778
-0.353878 0.368543
-0.505301 0.394556
I set up my vectors like this:
IDL> vector_field,myslice,outverts,outconn
IDL> plots,outverts
.. and the result is a window with just a wobbly looking vertical line,
instead of lots of little vectors on a rectangular region.
IDL> print,outverts[*,10000:10002]
8.00000 39.0000
8.00000 39.0000
9.00000 39.0000

I suppose I'm misinterpreting how IDL would like my input data to be
formatted, but as there are no examples in the VECTOR_FIELD docs, I'm a
bit at a loss here.
I'd appreciate any help you can give.
Thanks a lot everyone,
Jo
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: NCDF_ATTCOPY and typecasting
Next Topic: jpeg text field

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:18:14 PDT 2025

Total time taken to generate the page: 0.00567 seconds