[vtk-developers] C interface to write VTK XML files

Mathieu Malaterre mathieu.malaterre at kitware.com
Tue Jun 28 12:12:26 EDT 2005


> 
> I'm curious as to where all these #defines are coming from. How does
> one know a VTK_UNSTRUCTURED_GRID is 4? I also saw this type of thing in
> the testing interface (TestXMLCInterface.c).
> Could we perhaps have a C-includable header that would allow us to use
> the symblic constants?

This is in VTK CVS:

VTK/Common/vtkType.h

You can also note the trick about static_cast to use this file both in 
C++ and C.

About the use of value instead of #define, I had this discussion with 
Brad King and I wanted to keep the C example as close as possible to 
what a fortran code would look like. Since we cannot include this header 
(vtkType.h)  file in a fortran code (as far as I know), the only 
solution was to comment the code but still use the value instead of the 
#define.

> I didn't see anything about pieces in a quick grep. Does this support
> splitting the data up, like
> vtkXMLStructuredDataWriter::SetNumberOfPieces(int)? Although with raw
> access to the arrays, splitting the data isn't very hard anyway...

Thanks for report, I guess this should be fairly easy to add.

Mathieu



More information about the vtk-developers mailing list