[Paraview] Writing new readers for paraview

Jean M. Favre jfavre at cscs . ch
Wed, 08 Oct 2003 18:07:09 +0200


Berk Geveci wrote:
> There is no document yet, not even an alpha. Sorry. ParaView can use
> any reader that can be created in Tcl as long as it's interface
> meets certain requirements:
> 

Thanks Berk for the detailled mail. Yet, I wonder if you could add one 
more detail.

I have a multi-block reader, which produces 120 StructuredGrids (120 for 
the particular dataset). The Tcl version of the reader works very well 
with VTK, I am able to Append all geometries and display the full 
domain, without any warnings, etc..

Here is a code segment:

vtkTECPLOTReader reader
   reader SetFileName cyl.dat
   reader Udpate

vtkAppendPolyData append

for {set i 0} { $i < 120} { incr i} {
   vtkGeomFilter geo$i
   geo$i SetInput [reader GetOutput $i]
   append AddInput [geo$i GetOutput]
}

Mapper + Actor and voila

The same reader in ParaView only shows the first block, i.e. [reader 
GetOutput 0].

What is missing? I suspect that one more requirement to add to Berk's 
list is that the reader should be able to return its number of Outputs 
early on. Exactly when is my question. During ExecuteInformation?

Thanks for any tip.

Jean
-- 
Dr. Jean M. Favre,                            email:favre at cscs . ch
http://www . cscs . ch/people/Favre . html
CSCS, Swiss Center for Scientific Computing | Tel:  +41 (91) 610.82.40
Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82