# Storing Meta data with a vtk file

**URL:** https://discourse.vtk.org/t/storing-meta-data-with-a-vtk-file/4373
**Category:** Support
**Created:** [October 7, 2020, 2:58pm UTC](https://discourse.vtk.org/t/storing-meta-data-with-a-vtk-file/4373 "2020-10-07T14:58:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jrwrigh](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jrwrigh/32/2160_2.png) [@jrwrigh](https://discourse.vtk.org/u/jrwrigh)
#### Post date: [October 7, 2020, 2:58pm UTC](https://discourse.vtk.org/t/storing-meta-data-with-a-vtk-file/4373/1 "2020-10-07T14:58:00Z")

</div>

I’ve written a suite of tools that take in raw arrays of data from a file, combine it with an associated mesh, and then write out a vtk file. I’d like to write meta data to the output vtk file that says where the original “raw” data and mesh came from. Is that possible?

If this is not possible, the output vtk files are multiblock files, so I have the backup plan of writing a “reciept” file into the directory that stores the vtk block files. Are there any unforseen issues in doing this?

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [October 7, 2020, 3:20pm UTC](https://discourse.vtk.org/t/storing-meta-data-with-a-vtk-file/4373/2 "2020-10-07T15:20:30Z")

</div>

You can save metadata in field data. See some more details in this post:

> [@Any way to insert comments in a file created by vtkXMLImageDataWriter](https://discourse.vtk.org/t/any-way-to-insert-comments-in-a-file-created-by-vtkxmlimagedatawriter/161/2):
>
> In 3D Slicer, we use field data to store additional metadata with meshes. You can read/write using existing VTK API. Search for “fielddata” in [this](https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Core/vtkMRMLSegmentationStorageNode.cxx) file to see examples for reading/writing.
