[vtkusers] extending VTK's XML file formats

Tim Hutton tim.hutton at gmail.com
Tue Jan 10 12:01:18 EST 2012


On 10 January 2012 16:19, Bryn Lloyd <lloyd at itis.ethz.ch> wrote:
> Hi Tim
>
> You can add some types of meta data by add vtkFieldData to the vtkImageData,
> e.g. strings (vtkStringArray).
> Array have names, which again can be abused to add metadata (e.g. an empty
> array with the name "This data originates from XYZ").

Thanks Bryn. That would work. But I'd prefer to do it properly for
this application. In particular, I want to use the in-built XML
parsing functions, not have to parse my own strings.

> 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



-- 
Tim Hutton - http://www.sq3.org.uk - http://profiles.google.com/tim.hutton/



More information about the vtkusers mailing list