code: def dict_to_vtk(data, path='./dictvtk', voxel_size=1, origin=(0, 0, 0)):
      r
      vs = voxel_size
      for entry in data:
          if data[entry].dtype == bool:
              data[entry] = data[entry].astype(np.int8)
          if data[entry].flags['C_CONTIGUOUS']:
              data[entry] = np.ascontiguousarray(data[entry])
      imageToVTK(path, cellData=data, spacing=(vs, vs, vs), origin=origin)
docs: r"""
      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