Article View: comp.graphics.avs
Article #173Re: Hedgehog,Streamlines, et. al.
From: Larry Gelberg
Date: Wed, 11 Nov 1992 18:28
Date: Wed, 11 Nov 1992 18:28
152 lines
7861 bytes
7861 bytes
There is no 'straight-forward' way of doing what you're looking for
because of all the squid-brained restrictions on field data types
that hedgehog imposes on both the input field as well as the sampler
field, but here is an ugly work-around for you.
Use the orthoslice to feed into samplers and set the samplers type
to 'space'. In other words, "Here is a (flat) volume of data, please
fill it with sample points and give those sample points to hedgehog."
If you're only slicing in the K direction, you only need to hit
'plane' in the samplers module and you save (N*N*N)-(N*N) samples.
You need to hit 'space' if you are slicing in the I or J directions
because the 'plane' option only produces 2D data in one direction.
Here is an example network:
------------------------------------------------------------------
#!/usr/bin/avs -network
version 5.0 (50.6 gs)
module "read field.user.1" -xy 368,12 -ex $Path/avs_library/mongo
module hedgehog.user.2 -xy 208,152 -ex $Path/avs_library/mongo
module "orthogonal slicer.user.3" -xy 168,62 -ex $Path/avs_library/mongo
module samplers.user.4 -xy 168,102 -ex $Path/avs_library/mongo
module "volume bounds.user.5" -xy 528,152 -ex $Path/avs_library/mongo
module "geometry viewer.user.6" -xy 368,332
port_connect "read field.user.1":0 "volume bounds.user.5":0
port_connect "read field.user.1":0 "orthogonal slicer.user.3":0
port_connect "read field.user.1":0 hedgehog.user.2:0
port_connect hedgehog.user.2:0 "geometry viewer.user.6":0
port_connect "orthogonal slicer.user.3":0 samplers.user.4:0
port_connect samplers.user.4:0 hedgehog.user.2:1
port_connect "volume bounds.user.5":0 "geometry viewer.user.6":0
parm_set "read field.user.1":"Read Field Browser" $Path/data/field/vector.fld
parm_set hedgehog.user.2:"Vector Scale" 0.2145190537
parm_set "orthogonal slicer.user.3":"slice plane" 15 -range 0 31
parm_set "orthogonal slicer.user.3":axis K -range "I J K" " "
parm_set samplers.user.4:choice space
parm_set samplers.user.4:"N Segment" 10
geom_set_scene -scene "geometry viewer.user.6"
geom_set_camera_name "Camera 1"
geom_resize_camera -view "Camera 1" 512 512
#
# State for view: Camera 1
#
geom_set_position -view "Camera 1" 0 0 -12
geom_set_view_modes -depth_cue 0 -view "Camera 1"
geom_set_view_modes -polygonal_spheres 0 -view "Camera 1"
geom_set_view_modes -stereo 0 -view "Camera 1"
geom_set_view_modes -head_tracking 1 -view "Camera 1"
geom_set_view_modes -z_buffer 1 -view "Camera 1"
geom_set_camera_params -view "Camera 1" -front -88 -back 112
#
# Light state
#
geom_set_light -light 1 -type directional -state 1
geom_set_light -type ambient -state 1
#
# State for object: top
#
geom_set_cur_cli_obj top
geom_set_matrix -mat \
0.165688 -0.0437175 0.0164469 0 \
0.0420894 0.113457 -0.122435 0 \
0.0202534 0.121863 0.119889 0 \
-2.97294 -2.68203 -0.602876 1
geom_set_position 0 0 -9.53674e-07
geom_set_obj_window 0 26 0 24 0 31
#
# State for object: bounds
#
geom_set_cur_cli_obj -push
geom_set_name_context "volume bounds.user.5"
geom_create_obj bounds -mod "volume bounds.user.5"
geom_set_trans_mode parent
geom_set_obj_window 0 26 0 24 0 31
geom_set_name_context
geom_set_cur_cli_obj -pop
#
# State for object: hedgehog
#
geom_set_cur_cli_obj -push
geom_set_name_context hedgehog.user.2
geom_create_obj hedgehog -mod hedgehog.user.2
geom_set_trans_mode redirect
geom_set_name_context
geom_set_cur_cli_obj -pop
shell "ui" shell
panel Application -w app_panel -p ui -xy 0,0 -wh 260,1024
panel "Top Level Stack" -w master_stack -p Application -xy 2,100 -wh 256,498
panel "read field.user.1" -w panel -p "Top Level Stack" -xy 0,64 -wh 256,324
manipulator "read field.user.1:Read Field Browser" -w browser -p "read field.user.1" \
-xy 10,10 -wh 236,194
manipulator "read field.user.1:Data Conversion" -w radio_buttons -p "read field.user.1" \
-xy 10,204 -wh 118,44
manipulator "read field.user.1:Read Status" -w textblock -p "read field.user.1" \
-xy 10,248 -wh 236,66
panel hedgehog.user.2 -w panel -p "Top Level Stack" -xy 0,152 -wh 228,346
manipulator "hedgehog.user.2:Sampling Style" -w text -p hedgehog.user.2 \
-xy 10,10 -wh 118,22
manipulator hedgehog.user.2:sample -w radio_buttons -p hedgehog.user.2 \
-xy 10,32 -wh 118,44
manipulator "hedgehog.user.2:Vector Scale" -w dial -p hedgehog.user.2 \
-xy 128,32 -wh 90,130
manipulator "hedgehog.user.2:N Segment" -w idial -p hedgehog.user.2 -hide \
-xy 10,162 -wh 90,130
manipulator hedgehog.user.2:choice -w radio_buttons -p hedgehog.user.2 -hide \
-xy 100,162 -wh 118,110
manipulator "hedgehog.user.2:arrow heads" -w toggle -p hedgehog.user.2 \
-xy 10,292 -wh 118,22
manipulator "hedgehog.user.2:Show Bounds" -w toggle -p hedgehog.user.2 \
-xy 10,314 -wh 118,22
panel "orthogonal slicer.user.3" -w panel -p "Top Level Stack" \
-xy 0,152 -wh 228,150
manipulator "orthogonal slicer.user.3:slice plane" -w idial -p "orthogonal slicer.user.3" \
-xy 10,10 -wh 90,130
manipulator "orthogonal slicer.user.3:axis" -w radio_buttons -p "orthogonal slicer.user.3" \
-xy 100,10 -wh 118,66
panel samplers.user.4 -w panel -p "Top Level Stack" -xy 0,152 -wh 228,150
manipulator samplers.user.4:choice -w radio_buttons -p samplers.user.4 \
-xy 10,10 -wh 118,110
manipulator "samplers.user.4:N Segment" -w idial -p samplers.user.4 \
-xy 128,10 -wh 90,130
panel "volume bounds.user.5" -w panel -p "Top Level Stack" \
-xy 0,152 -wh 138,196
manipulator "volume bounds.user.5:Hull" -w toggle -p "volume bounds.user.5" \
-xy 10,10 -wh 118,22
manipulator "volume bounds.user.5:Min I" -w toggle -p "volume bounds.user.5" \
-xy 10,32 -wh 118,22
manipulator "volume bounds.user.5:Max I" -w toggle -p "volume bounds.user.5" \
-xy 10,54 -wh 118,22
manipulator "volume bounds.user.5:Min J" -w toggle -p "volume bounds.user.5" \
-xy 10,76 -wh 118,22
manipulator "volume bounds.user.5:Max J" -w toggle -p "volume bounds.user.5" \
-xy 10,98 -wh 118,22
manipulator "volume bounds.user.5:Min K" -w toggle -p "volume bounds.user.5" \
-xy 10,120 -wh 118,22
manipulator "volume bounds.user.5:Max K" -w toggle -p "volume bounds.user.5" \
-xy 10,142 -wh 118,22
manipulator "volume bounds.user.5:Colored Bounds" -w toggle -p "volume bounds.user.5" \
-xy 10,164 -wh 118,22
panel "geometry viewer.user.6!display" -w container -p ui -xy 270,20 -wh 552,584\
-P zoom_coords string "0 0 0 0 0 <$NULL> 0 0 0 0"
manipulator "geometry viewer.user.6":object -w none
manipulator "geometry viewer.user.6":"Update Always" -w none
manipulator "geometry viewer.user.6":"Update Image" -w none
# End of file
---------------------------------------------------------------------
=== Larry Gelberg ============================ larryg@avs.com =======
Advanced Visual Systems Inc. (AVS Inc.)
300 Fifth Ave, Waltham, MA 02154
===== Tel: 617-890-4300 = Fax: 617-890-8287 =========================
Technical Details
Message-ID:
<1992Nov11.182829.13248@sol.ctr.columbia.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!gumby!destroyer!sol.ctr.columbia.edu!aurora!larrygReferences:
<1992Nov10.162529.22316@rtpnc.epa.gov>Show Full Headers
Complete Article Headers
Newsgroups: comp.graphics.avs Path: arc1-ca.pugleaf.net!sparky!uunet!gumby!destroyer!sol.ctr.columbia.edu!aurora!larryg From: larryg@avs.com (Larry Gelberg) Subject: Re: Hedgehog,Streamlines, et. al. References: <1992Nov10.162529.22316@rtpnc.epa.gov> Sender: nobody@ctr.columbia.edu Organization: Advanced Visual Systems Inc. Date: Wed, 11 Nov 1992 18:28:29 GMT X-Newsreader: Tin 1.1 PL4 Message-ID: <1992Nov11.182829.13248@sol.ctr.columbia.edu> X-Posted-From: aurora.avs.com NNTP-Posting-Host: sol.ctr.columbia.edu Lines: 152