[vtkusers] Modified vtkTubeFilter

Ficker, Michael ficmic01 at evergreen.edu
Mon Mar 10 11:42:37 EST 2003


Hello all vtk users,

I have made a simple modification to vtkTubeFilter.  I'll just include the
e-mail I sent to kitware.

------------------

Dear Kitware,

I have made a minor modification to VTK that I would like to see included.

The modification is to the class vtkTubeFilter.  This class offers a method
to vary the radius of the tubes being generated by scalar values,
SetVaryRadiusToVaryRadiusByScalar.  This method linearly adjusts the radius
of the tubes based on the scalar value.  I added just one method which I
call SetVaryRadiusToVaryRadiusByAbsoluteScalar.  This method sets the radius
of the tubes to be exactly the scalar value.  A warning is generated if
there are negative values in the scalar data but the filter continues.  On a
line-by-line basis in the GeneratePoints() method the scalar values are
checked.  If a line is found to have negative scalar values a warning is
generated, the line is skipped, and GeneratePoints() returns 0.

I created this method because I have several types of data where I know the
centerline of a tubular structure and I also know the exact radius at each
point.  This method would be useful anytime you have a centerline and radius
values (e.g vascular networks).

I have put together a small web page with the modified source code, screen
shots, sample data, and a sample script.
Please check it out at ...

http://kermit.evergreen.edu/tubeFilter/

Sincerely,

Michael Ficker
Lab Manager / Lead Developer
Scientific Database Laboratory
The Evergreen State College
Olympia, WA
(360) 867-5943
ficmic01 at evergreen.edu
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030310/a7142d1d/attachment.htm>


More information about the vtkusers mailing list