[Paraview] TCL/Paraview Wrapping Trickery Question

John Biddiscombe biddisco at cscs.ch
Fri Jul 8 08:25:31 EDT 2005


I want to compile a class which can be either an image algorithm or a 
rectilinear grid algorithm.

#ifdef CSCS_BUILD_NETCDF_RECTILINEAR
  #include "vtkRectilinearGridAlgorithm.h"
  #define vtkNetCDFAlgorithm vtkRectilinearGridAlgorithm
#else
  #include "vtkImageAlgorithm.h"
  #define vtkNetCDFAlgorithm vtkImageAlgorithm
#endif

//BTX (because the TCL/Paraview wrapper doesn't like it
class VTK_vtkCSCSNetCDF_EXPORT vtkNetCDFReader : public vtkNetCDFAlgorithm
{
public:
  vtkTypeRevisionMacro(vtkNetCDFReader,vtkNetCDFAlgorithm);
//ETX

compiles fine, but I can't set a conditional TCL wrapping option. I can 
of course create two classes, one Rectilinear and the other image data, 
but for now I want to keep all the code centralized and have a cmake 
option as to which is generated.

Can the TCL wrapper (and Paraview CS wrapper) be tricked (without 
modifying vtkWrapTcl or vtkParse.I etc etc)

10 points to anyone who can tell me how to do it.

cheers

JB
(Of course in the real world I want to output 2 datasets one ImageData, 
the other Rectilinear Grid, but Paraview won't buy it).




More information about the ParaView mailing list