[vtkusers] Getting text to follow the active camera.

Will Schroeder will.schroeder at kitware.com
Thu Feb 1 06:52:21 EST 2001

Hi Andrew-

Every vtkDataSet (and subclasses) respond to the GetBounds() method. So:

vtkDataSetReader reader
reader SetFileName yadaya
set bounds [[reader GetOutput] GetBounds]
set numPoints [[reader GetOutput] GetNumberOfPoints]

At this point you could connect the rest of the filters to the reader. The 
method in this filter has the side effect of causing the reader to execute 
(because the
output type is not known without reading the file).  Note there are more 
GetOutput() methods (e.g., GetPolyDataOutput()) which allow you to hook up 
that take specialized input.


At 04:05 PM 2/1/2001 +1100, Andrew Maclean wrote:

>I am reading in data using the vtkDataSetReader class. How do I determine 
>the number of points and the bounds of the data?
>To get the bounds I am creating a temporary vtkDataSetMapper object and 
>using the GetBounds function and then deleting the object (I am not sure 
>that this is the best way!). But I don t know how to determine the number 
>of points. I need this information before the pipeline processing begins.
>Is there something that I can feed the output of vtkDataSetReader into to 
>get this information?
>If you have an answer, many thanks in advance!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20010201/23ae8ee3/attachment.htm>

More information about the vtkusers mailing list