dict_to_vtk

dict_to_vtk(data, filename, voxel_size=1, origin=(0, 0, 0))[source]

Accepts multiple images as a dictionary and compiles them into a vtk file

Parameters:
  • data (dict) – A dictionary of key: value pairs, where the key is the name of the scalar property stored in each voxel of the array stored in the corresponding value.

  • path (string) – Path to output file

  • voxel_size (int) – The side length of the voxels (voxels are cubic)

  • origin (float) – data origin (according to selected voxel size)

Notes

Outputs a vtk, vtp or vti file that can opened in ParaView

Examples

Click here to view online example.