<html><div style='background-color:'><DIV>
<P><FONT size=1>Hi Alex,</FONT></P>
<P><FONT size=1>I have done this sort of thing some years back, so my recollections are a bit rusty. If the tubes are discontinuous at each point you might have specified a set of distinct lines, defined by adjacent pairs of points. Try creating polylines, I think this will help. Then the only discontinuities should be where branches meet. To overcome this extend each polyline back into its parent branch. Eg:</FONT></P>
<P><FONT size=1>1 5<BR> \ /<BR> 2 4<BR> \ /<BR> 3<BR> |<BR> 6<BR> |<BR> 7</FONT></P>
<P><FONT size=1>polyline 1 could be: 7,6,3; polyline 2: 6,3,2,1; polyline 3: 6,3,4,5. This will give overlap where the polylines meet which would hide any gap, but might cause problems with protruding ends. In that case insert a new point (#8), at the same location as 6, with a lower scalar value and use that to extend the branch polylines, ie 8,3,2,1 and 8,3,4,5. This should ensure the overlapping parts remain hidden inside. </FONT><FONT size=1>A spline is a good idea to get smoother shapes.</FONT></P>
<P><FONT size=1>I think vtkProbeFilter should allow you to sample your volume with the resulting "tree" geometry, this part I have not done. I guess the overlapping tubes will result in some redundant sampling, but that should be ok.</FONT></P>
<P><FONT size=1>I can think of another way to approach your problem which would involve some C++ programming... so let me know if you get stuck.</FONT></P>
<P><FONT size=1> regards</FONT></P>
<P><FONT size=1> Dave Pont</FONT></P></DIV><FONT size=1>>From: "Alex Lear" <ALEX_LEAR@HOTMAIL.COM></FONT>
<DIV></DIV><FONT size=1>>To: vtkusers@public.kitware.com </FONT>
<DIV></DIV><FONT size=1>>CC: krs@cs.uncc.edu </FONT>
<DIV></DIV><FONT size=1>>Subject: Re: [vtkusers] How to create a better surface than tubefilter? </FONT>
<DIV></DIV><FONT size=1>>Date: Tue, 16 Apr 2002 22:04:46 -0600 </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>I like the idea of the spline and will give it more thought, </FONT>
<DIV></DIV><FONT size=1>>although it may </FONT>
<DIV></DIV><FONT size=1>>get tricky at branch split points. I am interested in preserving </FONT>
<DIV></DIV><FONT size=1>>the </FONT>
<DIV></DIV><FONT size=1>>original data but smooth the connections. I would also like to make </FONT>
<DIV></DIV><FONT size=1>>it into </FONT>
<DIV></DIV><FONT size=1>>more of a surface than tubes. </FONT>
<DIV></DIV><FONT size=1>>When I used capping for the tubes, it used literally a circle </FONT>
<DIV></DIV><FONT size=1>>instead of a </FONT>
<DIV></DIV><FONT size=1>>sphere, is this the normal behavior? </FONT>
<DIV></DIV><FONT size=1>>To answer the question, Yes it is a completely seperate volume </FONT>
<DIV></DIV><FONT size=1>>dataset and I </FONT>
<DIV></DIV><FONT size=1>>would like to color the branches from this volume dataset. </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>Alex </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>******** </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>Turn endcapping on and it will put spheres at the ends If you want </FONT>
<DIV></DIV><FONT size=1>>something </FONT>
<DIV></DIV><FONT size=1>>of higher quality, use the points to fit a spline to it </FONT>
<DIV></DIV><FONT size=1>>(vtkKochanekBartelsSpline), resample and get more points and put the </FONT>
<DIV></DIV><FONT size=1>>tube </FONT>
<DIV></DIV><FONT size=1>>filter around them. </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>a completely separate volume dataset? You want the tubes to be </FONT>
<DIV></DIV><FONT size=1>>colored </FONT>
<DIV></DIV><FONT size=1>>based on the data? </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>> -- krs </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>*********** </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>I am using a point set to represent the branches of a 3 dimentional </FONT>
<DIV></DIV><FONT size=1>>object </FONT>
<DIV></DIV><FONT size=1>>like a tree. I connect the points with lines to show the branches. </FONT>
<DIV></DIV><FONT size=1>>Then I </FONT>
<DIV></DIV><FONT size=1>>use the radius information and the vtkTubeFilter to create the </FONT>
<DIV></DIV><FONT size=1>>cylindrical </FONT>
<DIV></DIV><FONT size=1>>branch sturcture that varies by radius at each point. </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>I have two problems with this: </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>1) The first is the tubes are discontinuous at each point making it </FONT>
<DIV></DIV><FONT size=1>>look </FONT>
<DIV></DIV><FONT size=1>>like cylinders backed up to each other rather than a smooth branch. </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>2) The second problem is I would like to (probe?) the data from a </FONT>
<DIV></DIV><FONT size=1>>volume and </FONT>
<DIV></DIV><FONT size=1>>color the branch structure with these values. </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>I am not sure how to accomplish this because I am not aware of </FONT>
<DIV></DIV><FONT size=1>>everything </FONT>
<DIV></DIV><FONT size=1>>vtk can do. I think I need to do some sort of transformation after </FONT>
<DIV></DIV><FONT size=1>>the tube </FONT>
<DIV></DIV><FONT size=1>>filter is applied. Like a surface reconstruction of some kind. </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>Any help is appreciated. Thanks! </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>Alex Lear </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>_________________________________________________________________ </FONT>
<DIV></DIV><FONT size=1>>Join the world’s largest e-mail service with MSN Hotmail. </FONT>
<DIV></DIV><FONT size=1>>http://www.hotmail.com </FONT>
<DIV></DIV><FONT size=1>> </FONT>
<DIV></DIV><FONT size=1>>_______________________________________________ </FONT>
<DIV></DIV><FONT size=1>>This is the private VTK discussion list. </FONT>
<DIV></DIV><FONT size=1>>Please keep messages on-topic. Check the FAQ at: </FONT>
<DIV></DIV><FONT size=1>></FONT><FONT size=1> </FONT>
<DIV></DIV><FONT size=1>>Follow this link to subscribe/unsubscribe: </FONT>
<DIV></DIV><FONT size=1>>http://public.kitware.com/mailman/listinfo/vtkusers </FONT>
<DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://g.msn.com/1HM204201/f'>http://explorer.msn.com</a>.<br></html>