[vtkusers] extending VTK's XML file formats

Bryn Lloyd lloyd at itis.ethz.ch
Tue Jan 10 12:49:12 EST 2012


What I meant was: you could pack your metadata into an array. This field 
data can be attached to the image. XML writers/readers will have no 
trouble reading/writing these fields. You will need to define you own 
convention how to pack your metadata into the array (e.g. each line of a 
document could be one element in the array).

All you need is a pack/unpack function.

You could also try to figure how to use vtkModelMetadata or how to write a
similar class for your needs:
http://www.vtk.org/doc/nightly/html/classvtkModelMetadata.html

> That class seems to deal with the old VTK formats. Something like that
> for the XML formats would be great.




>> /Bryn
>>
>>
>>
>> On 1/10/2012 5:11 PM, Tim Hutton wrote:
>>> What is the accepted way of extending VTK's XML file formats? I would
>>> like to be able to attach metadata to a vtkImageData file. Presumably
>>> the right approach involves subclassing vtkXMLImageDataWriter and
>>> vtkXMLImageDataReader but I'm not sure how to proceed. Is there an
>>> example somewhere?
>>>
>>> Thanks,
>>>
>>> Tim
>>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list