Skip to content
  • Will Schroeder's avatar
    Added support to write out VTK Legacy 4.2 files · 7f76b9e9
    Will Schroeder authored
    The VTK legacy writers can now write out the older
    4.2 file format (as well as version 5.1). Use the
    method SetFileVersion() to control this. The VTK
    legacy readers have also been updated to report
    the FileVersion of the file they read. Major and
    minor version numbers are also provided.
    
    The major difference between file versions 4.2 and 5.1
    is the format for cell arrays (which affects vtkPolyData
    and vtkUnstructuredGrid and related classes). In version
    4.2, cells were listed using a count of vertices, followed
    by the vertices, repeated for each cell. In version 5.1,
    in order to support 32-/64-bit cell arrays, and provide
    random access, the cell array is produced in two parts:
    1) the list of vertices for each cell, and 2) for each
    cell, an offset array into the vertices list which
    indicates the starting location for each cell's vertices.
    
    Expanded test to unstructured grids
    7f76b9e9