15 #ifndef vtkXMLWriterF_h 16 #define vtkXMLWriterF_h 26 #if defined(__cplusplus) 27 # error "This should be included only by a .c file." 39 #define VTK_XMLWRITERF_MAX 256 48 #if !defined(VTK_FORTRAN_NAME) 49 # define VTK_FORTRAN_NAME(name, NAME) name##__ 51 #if !defined(VTK_FORTRAN_ARG_STRING_POINTER) 52 # define VTK_FORTRAN_ARG_STRING_POINTER(name) const char* name##_ptr_arg 54 #if !defined(VTK_FORTRAN_ARG_STRING_LENGTH) 55 # define VTK_FORTRAN_ARG_STRING_LENGTH(name) , const long int name##_len_arg 57 #if !defined(VTK_FORTRAN_REF_STRING_POINTER) 58 # define VTK_FORTRAN_REF_STRING_POINTER(name) name##_ptr_arg 60 #if !defined(VTK_FORTRAN_REF_STRING_LENGTH) 61 # define VTK_FORTRAN_REF_STRING_LENGTH(name) ((int)name##_len_arg) 108 "vtkXMLWriterF_Delete called with invalid id %d.\n",
118 void VTK_FORTRAN_NAME(vtkxmlwriterf_setdatamodetype, VTKXMLWRITERF_SETDATAMODETYPE)(
119 const int*
self,
const int* objType
129 "vtkXMLWriterF_SetDataModeType called with invalid id %d.\n",
136 void VTK_FORTRAN_NAME(vtkxmlwriterf_setdataobjecttype, VTKXMLWRITERF_SETDATAOBJECTTYPE)(
137 const int*
self,
const int* objType
147 "vtkXMLWriterF_SetDataObjectType called with invalid id %d.\n",
155 const int*
self,
int extent[6]
165 "vtkXMLWriterF_SetExtent called with invalid id %d.\n",
173 const int*
self,
const int* dataType,
185 "vtkXMLWriterF_SetPoints called with invalid id %d.\n",
193 const int*
self,
double origin[3]
203 "vtkXMLWriterF_SetOrigin called with invalid id %d.\n",
211 const int*
self,
double spacing[3]
221 "vtkXMLWriterF_SetSpacing called with invalid id %d.\n",
228 void VTK_FORTRAN_NAME(vtkxmlwriterf_setcoordinates, VTKXMLWRITERF_SETCOORDINATES)(
229 const int*
self,
const int* axis,
const int* dataType,
void*
data,
236 *dataType,
data, *numCoordinates);
241 "vtkXMLWriterF_SetCoordinates called with invalid id %d.\n",
248 void VTK_FORTRAN_NAME(vtkxmlwriterf_setcellswithtype, VTKXMLWRITERF_SETCELLSWITHTYPE)(
249 const int*
self,
const int* cellType,
const vtkIdType* ncells,
256 *ncells, cells, *cellsSize);
261 "vtkXMLWriterF_SetCellsWithType called with invalid id %d.\n",
268 void VTK_FORTRAN_NAME(vtkxmlwriterf_setcellswithtypes, VTKXMLWRITERF_SETCELLSWITHTYPES)(
269 const int*
self,
int* cellTypes,
const vtkIdType* ncells,
276 *ncells, cells, *cellsSize);
281 "vtkXMLWriterF_SetCellsWithTypes called with invalid id %d.\n",
288 void VTK_FORTRAN_NAME(vtkxmlwriterf_setpointdata, VTKXMLWRITERF_SETPOINTDATA)(
301 char* name_buffer = malloc(name_length+1);
304 char* role_buffer = malloc(role_length+1);
305 if(!name_buffer || !role_buffer)
308 "vtkXMLWriterF_SetPointData failed to allocate name or role.\n");
309 if(name_buffer) { free(name_buffer); }
310 if(role_buffer) { free(role_buffer); }
313 memcpy(name_buffer, name_ptr, name_length);
314 name_buffer[name_length] = 0;
315 memcpy(role_buffer, role_ptr, role_length);
316 role_buffer[role_length] = 0;
320 *dataType,
data, *numTuples, *numComponents,
330 "vtkXMLWriterF_SetPointData called with invalid id %d.\n",
337 void VTK_FORTRAN_NAME(vtkxmlwriterf_setcelldata, VTKXMLWRITERF_SETCELLDATA)(
350 char* name_buffer = malloc(name_length+1);
353 char* role_buffer = malloc(role_length+1);
354 if(!name_buffer || !role_buffer)
357 "vtkXMLWriterF_SetCellData failed to allocate name or role.\n");
358 if(name_buffer) { free(name_buffer); }
359 if(role_buffer) { free(role_buffer); }
362 memcpy(name_buffer, name_ptr, name_length);
363 name_buffer[name_length] = 0;
364 memcpy(role_buffer, role_ptr, role_length);
365 role_buffer[role_length] = 0;
369 *dataType,
data, *numTuples, *numComponents,
379 "vtkXMLWriterF_SetCellData called with invalid id %d.\n",
386 void VTK_FORTRAN_NAME(vtkxmlwriterf_setfilename, VTKXMLWRITERF_SETFILENAME)(
396 char* name_buffer = malloc(name_length+1);
400 "vtkXMLWriterF_SetFileName failed to allocate name.\n");
403 memcpy(name_buffer, name_ptr, name_length);
404 name_buffer[name_length] = 0;
415 "vtkXMLWriterF_SetFileName called with invalid id %d.\n",
423 const int*
self,
int* success
433 "vtkXMLWriterF_Write called with invalid id %d.\n",
440 void VTK_FORTRAN_NAME(vtkxmlwriterf_setnumberoftimesteps, VTKXMLWRITERF_SETNUMBEROFTIMESTEPS)(
441 const int*
self,
const int* numTimeSteps
452 "vtkXMLWriterF_SetNumberOfTimeSteps called with invalid id %d.\n",
470 "vtkXMLWriterF_Start called with invalid id %d.\n",
477 void VTK_FORTRAN_NAME(vtkxmlwriterf_writenexttimestep, VTKXMLWRITERF_WRITENEXTTIMESTEP)(
478 const int*
self,
const double* timeValue
488 "vtkXMLWriterF_WriteNextTimeStep called with invalid id %d.\n",
506 "vtkXMLWriterF_Stop called with invalid id %d.\n",
struct vtkXMLWriterC_s vtkXMLWriterC
vtkXMLWriterC is an opaque structure holding the state of an individual writer object.
#define VTK_FORTRAN_REF_STRING_LENGTH(name)
VTKIOXML_EXPORT void vtkXMLWriterC_SetCellsWithTypes(vtkXMLWriterC *self, int *cellTypes, vtkIdType ncells, vtkIdType *cells, vtkIdType cellsSize)
Set a cell array on the data object to be written.
VTKIOXML_EXPORT void vtkXMLWriterC_SetPointData(vtkXMLWriterC *self, const char *name, int dataType, void *data, vtkIdType numTuples, int numComponents, const char *role)
Set a point or cell data array by name.
VTKIOXML_EXPORT void vtkXMLWriterC_SetCellsWithType(vtkXMLWriterC *self, int cellType, vtkIdType ncells, vtkIdType *cells, vtkIdType cellsSize)
Set a cell array on the data object to be written.
#define VTK_FORTRAN_ARG_STRING_POINTER(name)
VTKIOXML_EXPORT void vtkXMLWriterC_Delete(vtkXMLWriterC *self)
Delete the writer object.
#define VTK_XMLWRITERF_MAX
VTKIOXML_EXPORT void vtkXMLWriterC_SetPoints(vtkXMLWriterC *self, int dataType, void *data, vtkIdType numPoints)
Set the points of a point data set.
#define VTK_FORTRAN_NAME(name, NAME)
VTKIOXML_EXPORT void vtkXMLWriterC_Start(vtkXMLWriterC *self)
Start writing a time-series to the output file.
VTKIOXML_EXPORT void vtkXMLWriterC_SetNumberOfTimeSteps(vtkXMLWriterC *self, int numTimeSteps)
Set the number of time steps that will be written between upcoming Start and Stop calls...
VTKIOXML_EXPORT void vtkXMLWriterC_SetOrigin(vtkXMLWriterC *self, double origin[3])
Set the origin of an image data set.
VTKIOXML_EXPORT void vtkXMLWriterC_SetDataObjectType(vtkXMLWriterC *self, int objType)
Set the VTK data object type that will be written.
VTKIOXML_EXPORT void vtkXMLWriterC_SetCoordinates(vtkXMLWriterC *self, int axis, int dataType, void *data, vtkIdType numCoordinates)
Set the coordinates along one axis of a rectilinear grid data set.
#define VTK_FORTRAN_ARG_STRING_LENGTH(name)
VTKIOXML_EXPORT void vtkXMLWriterC_SetDataModeType(vtkXMLWriterC *self, int datamodetype)
Set the VTK writer data mode to either:
VTKIOXML_EXPORT int vtkXMLWriterC_Write(vtkXMLWriterC *self)
Write the data to a file immediately.
VTKIOXML_EXPORT void vtkXMLWriterC_SetSpacing(vtkXMLWriterC *self, double spacing[3])
Set the spacing of an image data set.
VTKIOXML_EXPORT void vtkXMLWriterC_SetFileName(vtkXMLWriterC *self, const char *fileName)
Set the name of the file into which the data are to be written.
#define VTK_FORTRAN_REF_STRING_POINTER(name)
static vtkXMLWriterC * vtkXMLWriterF_Table[VTK_XMLWRITERF_MAX+1]
VTKIOXML_EXPORT void vtkXMLWriterC_WriteNextTimeStep(vtkXMLWriterC *self, double timeValue)
Write one time step of a time-series to the output file.
VTKIOXML_EXPORT vtkXMLWriterC * vtkXMLWriterC_New(void)
Create a new instance of vtkXMLWriterC.
VTKIOXML_EXPORT void vtkXMLWriterC_SetExtent(vtkXMLWriterC *self, int extent[6])
Set the extent of a structured data set.
VTKIOXML_EXPORT void vtkXMLWriterC_SetCellData(vtkXMLWriterC *self, const char *name, int dataType, void *data, vtkIdType numTuples, int numComponents, const char *role)
VTKIOXML_EXPORT void vtkXMLWriterC_Stop(vtkXMLWriterC *self)
Stop writing a time-series to the output file.