[Paraview] Writing new readers for paraview

Berk Geveci berklist at nycap . rr . com
03 Oct 2003 13:45:28 -0400


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:

1. GetOutput(int n) - must return a subclass of vtkDataSet
2. Set/Get pair for each property to be set from the user interface
3. If you want to allow array selection, you also need the following:

  // Get the data array selection tables used to configure which data
  // arrays are loaded by the reader.
  vtkGetObjectMacro(PointDataArraySelection, vtkDataArraySelection);
  vtkGetObjectMacro(CellDataArraySelection, vtkDataArraySelection);
  
  // Description:  
  // Get the number of point or cell arrays available in the input.
  int GetNumberOfPointArrays();
  int GetNumberOfCellArrays();
  
  // Description:
  // Get the name of the point or cell array with the given index in
  // the input.
  const char* GetPointArrayName(int index);
  const char* GetCellArrayName(int index);
  
  // Description:
  // Get/Set whether the point or cell array with the given name is to
  // be read.
  int GetPointArrayStatus(const char* name);
  int GetCellArrayStatus(const char* name);
  void SetPointArrayStatus(const char* name, int status);  
  void SetCellArrayStatus(const char* name, int status); 

4. Parallel readers should work properly in data parallel mode; i.e
they need to set the WholeExtent or the MaximumNumberOfPieces in
ExecuteInformation() and fill in the right Extent or Piece in Execute()
If you need a controller, you can get it with vtkMultiProcessController::GetGlobalController()

I have described how to add the reader with an xml file in a previous
e-mail: http://public . kitware . com/pipermail/paraview/2003-September/000290 . html

-Berk
 

> I have a question about writing a new reader for paraview. Can I just write 
> the reader as if it
> were just for VTK and have it work with paraview or is there some
special 
> paraview class I
> must inherit from? When running paraview in parallel does it use the
same 
> pipeline parallelism
> mode as the paralleliso example? I have heard there is a guide of
sorts 
> under development.
> Would there be a developers section somewhere? I would appreciate
having a 
> look at even a
> alpha version of such a doc.