<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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5<BR>&nbsp;\&nbsp;&nbsp;&nbsp;&nbsp;  /<BR>&nbsp; 2&nbsp;&nbsp; 4<BR>&nbsp;&nbsp; \ /<BR>&nbsp;&nbsp;&nbsp; 3<BR>&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; 6<BR>&nbsp;&nbsp;&nbsp; |<BR>&nbsp;&nbsp;&nbsp; 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&nbsp;protruding ends. In that case insert a new point (#8), at&nbsp;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>&nbsp; regards</FONT></P>
<P><FONT size=1>&nbsp;&nbsp;&nbsp; Dave Pont</FONT></P></DIV><FONT size=1>&gt;From: "Alex Lear" <ALEX_LEAR@HOTMAIL.COM></FONT>
<DIV></DIV><FONT size=1>&gt;To: vtkusers@public.kitware.com </FONT>
<DIV></DIV><FONT size=1>&gt;CC: krs@cs.uncc.edu </FONT>
<DIV></DIV><FONT size=1>&gt;Subject: Re: [vtkusers] How to create a better surface than tubefilter? </FONT>
<DIV></DIV><FONT size=1>&gt;Date: Tue, 16 Apr 2002 22:04:46 -0600 </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;I like the idea of the spline and will give it more thought, </FONT>
<DIV></DIV><FONT size=1>&gt;although it may </FONT>
<DIV></DIV><FONT size=1>&gt;get tricky at branch split points. I am interested in preserving </FONT>
<DIV></DIV><FONT size=1>&gt;the </FONT>
<DIV></DIV><FONT size=1>&gt;original data but smooth the connections. I would also like to make </FONT>
<DIV></DIV><FONT size=1>&gt;it into </FONT>
<DIV></DIV><FONT size=1>&gt;more of a surface than tubes. </FONT>
<DIV></DIV><FONT size=1>&gt;When I used capping for the tubes, it used literally a circle </FONT>
<DIV></DIV><FONT size=1>&gt;instead of a </FONT>
<DIV></DIV><FONT size=1>&gt;sphere, is this the normal behavior? </FONT>
<DIV></DIV><FONT size=1>&gt;To answer the question, Yes it is a completely seperate volume </FONT>
<DIV></DIV><FONT size=1>&gt;dataset and I </FONT>
<DIV></DIV><FONT size=1>&gt;would like to color the branches from this volume dataset. </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;Alex </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;******** </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;Turn endcapping on and it will put spheres at the ends If you want </FONT>
<DIV></DIV><FONT size=1>&gt;something </FONT>
<DIV></DIV><FONT size=1>&gt;of higher quality, use the points to fit a spline to it </FONT>
<DIV></DIV><FONT size=1>&gt;(vtkKochanekBartelsSpline), resample and get more points and put the </FONT>
<DIV></DIV><FONT size=1>&gt;tube </FONT>
<DIV></DIV><FONT size=1>&gt;filter around them. </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;a completely separate volume dataset? You want the tubes to be </FONT>
<DIV></DIV><FONT size=1>&gt;colored </FONT>
<DIV></DIV><FONT size=1>&gt;based on the data? </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt; -- krs </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;*********** </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;I am using a point set to represent the branches of a 3 dimentional </FONT>
<DIV></DIV><FONT size=1>&gt;object </FONT>
<DIV></DIV><FONT size=1>&gt;like a tree. I connect the points with lines to show the branches. </FONT>
<DIV></DIV><FONT size=1>&gt;Then I </FONT>
<DIV></DIV><FONT size=1>&gt;use the radius information and the vtkTubeFilter to create the </FONT>
<DIV></DIV><FONT size=1>&gt;cylindrical </FONT>
<DIV></DIV><FONT size=1>&gt;branch sturcture that varies by radius at each point. </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;I have two problems with this: </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;1) The first is the tubes are discontinuous at each point making it </FONT>
<DIV></DIV><FONT size=1>&gt;look </FONT>
<DIV></DIV><FONT size=1>&gt;like cylinders backed up to each other rather than a smooth branch. </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;2) The second problem is I would like to (probe?) the data from a </FONT>
<DIV></DIV><FONT size=1>&gt;volume and </FONT>
<DIV></DIV><FONT size=1>&gt;color the branch structure with these values. </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;I am not sure how to accomplish this because I am not aware of </FONT>
<DIV></DIV><FONT size=1>&gt;everything </FONT>
<DIV></DIV><FONT size=1>&gt;vtk can do. I think I need to do some sort of transformation after </FONT>
<DIV></DIV><FONT size=1>&gt;the tube </FONT>
<DIV></DIV><FONT size=1>&gt;filter is applied. Like a surface reconstruction of some kind. </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;Any help is appreciated. Thanks! </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;Alex Lear </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;_________________________________________________________________ </FONT>
<DIV></DIV><FONT size=1>&gt;Join the world’s largest e-mail service with MSN Hotmail. </FONT>
<DIV></DIV><FONT size=1>&gt;http://www.hotmail.com </FONT>
<DIV></DIV><FONT size=1>&gt; </FONT>
<DIV></DIV><FONT size=1>&gt;_______________________________________________ </FONT>
<DIV></DIV><FONT size=1>&gt;This is the private VTK discussion list. </FONT>
<DIV></DIV><FONT size=1>&gt;Please keep messages on-topic. Check the FAQ at: </FONT>
<DIV></DIV><FONT size=1>&gt;</FONT><FONT size=1> </FONT>
<DIV></DIV><FONT size=1>&gt;Follow this link to subscribe/unsubscribe: </FONT>
<DIV></DIV><FONT size=1>&gt;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>