[vtkusers] writing VTK XML file using vtkXMLWriterC.h...

Mathieu Malaterre mathieu.malaterre at kitware.com
Thu Sep 21 11:43:39 EDT 2006


fred wrote:
> fred a écrit :
> 
>> Hi all,
>>
>> I'm trying to write VTK files in XML format for unstructured grid using
>> vtkXMLWriterC.h.
>>
>> I read the TestXMLCInterface.c example, which displays _one_ cell.
>>  
>>
> Moreover, this example write XML files in base64.
> 
> I would want to write them in raw format, because files are smaller than
> in base64.
> But I did not see anything how to write files in raw format instead of
> base64 in
> vtkXMLWriterC.h or in VTK/IO dir.


Look at vtkXMLWriterC.cxx, you need to add something like:

void vtkXMLWriterC_SetType(int t)
{
   switch(t)
     {
     case BINARY:
     self->Writer->SetToBinaryType();
   ...
}

HTH
Mathieu



More information about the vtkusers mailing list