cratepy.ioput.miscoutputfiles.vtkoutput.XMLGenerator

class XMLGenerator(type, version, byte_order, format, precision, header_type)[source]

Bases: object

VTK XML files generation methods.

_indent

Formatting indentation.

Type:

str

write_file_header(self, vtk_file)[source]

Write VTK file header.

Write VTK file footer.

write_open_dataset_elem(self, vtk_file, dataset_parameters)[source]

Open (write) VTK dataset element.

write_close_dataset_elem(self, vtk_file)[source]

Close (write) VTK dataset element.

write_open_dataset_piece(self, vtk_file, piece_parameters)[source]

Open (write) VTK dataset element piece.

write_close_dataset_piece(self, vtk_file)[source]

Close (write) VTK dataset element piece.

write_open_point_data(self, vtk_file)[source]

Open (write) VTK point data element.

write_close_point_data(self, vtk_file)[source]

Close (write) VTK point data element.

write_open_cell_data(self, vtk_file)[source]

Open (write) VTK cell data element.

write_close_cell_data(self, vtk_file)[source]

Close (write) VTK cell data element.

write_cell_data_array(self, vtk_file, data_list, data_parameters)[source]

Write VTK cell data element.

enclose(x)[source]

Enclose input in literal quotation marks.

VTK XML file constructor.

Parameters:
  • type (str) – VTK file type.

  • version (str) – VTK version.

  • byte_order (str) – VTK byte order.

  • format (str) – VTK file format.

  • precision ({'SinglePrecision', 'DoublePrecision'}) – VTK file data precision.

  • header_type (str) – VTK header type.

List of Public Methods

enclose

Enclose input in literal quotation marks.

write_cell_data_array

Write VTK cell data element.

write_close_cell_data

Close (write) VTK cell data element.

write_close_dataset_elem

Close (write) VTK dataset element.

write_close_dataset_piece

Close (write) VTK dataset element piece.

write_close_point_data

Close (write) VTK point data element.

write_file_footer

Write VTK file footer.

write_file_header

Write VTK file header.

write_open_cell_data

Open (write) VTK cell data element.

write_open_dataset_elem

Open (write) VTK dataset element.

write_open_dataset_piece

Open (write) VTK dataset element piece.

write_open_point_data

Open (write) VTK point data element.

Methods

__init__(type, version, byte_order, format, precision, header_type)[source]

VTK XML file constructor.

Parameters:
  • type (str) – VTK file type.

  • version (str) – VTK version.

  • byte_order (str) – VTK byte order.

  • format (str) – VTK file format.

  • precision ({'SinglePrecision', 'DoublePrecision'}) – VTK file data precision.

  • header_type (str) – VTK header type.

static enclose(x)[source]

Enclose input in literal quotation marks.

Parameters:

x (str) – Input to be converted into a string enclosed in literal quotation marks.

Returns:

str – Input converted into a string enclosed in literal quotation marks.

Return type:

str

write_cell_data_array(vtk_file, data_list, data_parameters)[source]

Write VTK cell data element.

Parameters:
  • vtk_file (file) – VTK file.

  • data_list (list) – Sorted data of cell element.

  • data_parameters (dict) – Parameters of cell element.

write_close_cell_data(vtk_file)[source]

Close (write) VTK cell data element.

Parameters:

vtk_file (file) – VTK file.

write_close_dataset_elem(vtk_file)[source]

Close (write) VTK dataset element.

Parameters:

vtk_file (file) – VTK file.

write_close_dataset_piece(vtk_file)[source]

Close (write) VTK dataset element piece.

Parameters:

vtk_file (file) – VTK file.

write_close_point_data(vtk_file)[source]

Close (write) VTK point data element.

Parameters:

vtk_file (file) – VTK file.

write_file_footer(vtk_file)[source]

Write VTK file footer.

Parameters:

vtk_file (file) – VTK file.

write_file_header(vtk_file)[source]

Write VTK file header.

Parameters:

vtk_file (file) – VTK file.

write_open_cell_data(vtk_file)[source]

Open (write) VTK cell data element.

Parameters:

vtk_file (file) – VTK file.

write_open_dataset_elem(vtk_file, dataset_parameters)[source]

Open (write) VTK dataset element.

Parameters:
  • vtk_file (file) – VTK file.

  • dataset_parameters (dict) – VTK dataset element parameters.

write_open_dataset_piece(vtk_file, piece_parameters)[source]

Open (write) VTK dataset element piece.

Parameters:
  • vtk_file (file) – VTK file.

  • piece_parameters (dict) – VTK dataset element piece parameters.

write_open_point_data(vtk_file)[source]

Open (write) VTK point data element.

Parameters:

vtk_file (file) – VTK file.