[vtkusers] how to query vtkInformation

Matthias Langer mlangc at gmx.at
Fri Dec 9 15:58:39 EST 2005


On Fri, 2005-12-09 at 20:59 +0100, Florian Drescher wrote:
> > printInfo for vtkConeSource
> >   input ports:
> >     no input ports
> >   output ports:
> >     port 0 :
> >       Debug: Off
> >       Modified Time: 317
> >       Reference Count: 1
> >       Registered Events: (none)
> >       DATA_TYPE_NAME: vtkPolyData
> >       PORT_REQUIREMENTS_FILLED: 1
> >
> > Now i'm intersted in finding out how to get the DATA_TYPE_NAME filed
> > directly by an apprpriate method call to vtkInformation.
> 
> Try the functions
> virtual const char *GetClassName()
> virtual int IsA (const char *type)
> int IsTypeOf (const char *type)
> 

I know these functions; what i want to do, is to obtain information from
vtkAlgorithm via *vtkInformation. I'm not intersetd in knowing the
concrete type of the *vtkAlgorithm, but i'm interested in the types the
(input/output)-ports accept/generate.

In detail:
Suppose i've got a vtkAlgorithm *p_algo from somewhere. Now i'm
interested in:

	- how many output ports has p_algo
		- what kind of data is produced by p_algo
	- how may input ports has p_algo
		- what kind of data is accepted by p_algo

If p_algo is for example a cone source i only need to know:

	- we've got one output port 0
	- this port produces vtkPolyData
	- we have no input ports

I hope that it is now clearer what i mean.

Matthias


	




More information about the vtkusers mailing list