[vtkusers] (no subject)

David.Pont at ForestResearch.co.nz David.Pont at ForestResearch.co.nz
Thu Oct 30 15:29:30 EST 2003


Hi Julian,
  1 - You could use vtkClipPolyData with vtkPlane oriented and placed to
physically cut away poygons warped to z=0.
  2- I have been playing around with lookup tables in the last few days,
you could also use transparency to 'clip' unwanted regions.
Use vtkLookupTable with alpha set to 0 at the bottom of the range, this
will make a range of scalar values (and their geometry) transparent. The
effect may not be perfect, the transparency boundary will be blended and
may remove too much or too little.
For example:
            lut->SetNumberOfColors( 4 );
            lut->SetTableValue( 0, 0, 0, 0, 0 );      // alpha=0 to remove
geometry
            lut->SetTableValue( 1, 1, 0, 0, 1 );      // red
            lut->SetTableValue( 2, 0, 1, 0, 1 );      // green
            lut->SetTableValue( 3, 0, 0, 1, 1 );      // blue
Choose NumberOfColours carefully in relation to your scalar range. You
might get away with calling SetNumberOfColors, then Build, to initialise
the lookup table. Then call SetTableValue on one or more of the 'low' table
entries(Index=0, 1, ...), with alpha=0 (rgb values will not matter). This
solution (2) is probably of use when the geometry is complex and geometric
clipping will not work., so I suggest trying 1 for your problem.

  regards
     Dave P



|---------+---------------------------->
|         |           Julian Yu-Chung  |
|         |           Chen             |
|         |           <ycc at nchc.org.tw>|
|         |           Sent by:         |
|         |           vtkusers-admin at vt|
|         |           k.org            |
|         |                            |
|         |                            |
|         |           30/10/2003 16:39 |
|         |                            |
|---------+---------------------------->
  >--------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                                |
  |       To:       vtkusers at vtk.org                                                                                               |
  |       cc:                                                                                                                      |
  |       Subject:  [vtkusers] (no subject)                                                                                        |
  >--------------------------------------------------------------------------------------------------------------------------------|




Hi all,

I've got a data using dataset: StructuredPoints(with z_dimension 1)
with attribute data: scalars. And I will make it warp according to the
the scalar value, then making a surface in VTK. The pipeline is pretty
much like this:

vtkStructuredPoints(set with vtkDoubleArray in points being get) ->
vtkWarpScalar -> Mapper -> Actor

And now here's the question, some grid points in the dataset, have no
scalar values at all. I would call it undefined. But using the pipeline
mentioned above, the scalars not assigned with be filled with zeros,
then the final visualization will reflect as the number implies. Can I
make those grid point with undefined scalars, being left with 'holes'
in the final warped visualization? Or maybe any alternative pipeline
arrangements suggested?

Thanks in advance!

--
"Never ask a man what computer he uses. If it's a Mac, he'll tell you.
If it's
not, why embarass him?",
Tom Clancy

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <
http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers








More information about the vtkusers mailing list