[Insight-developers] MetaIO - versioning

Stephen Aylward stephen.aylward at kitware.com
Sun Jan 23 11:59:04 EST 2011


Hi ITK'ers.

Proposal
=======
I am writing to propose adding version information to metaObject
files, including meta images.

Problem addressed
===============
Meta was created 14+ years ago and needs updating.   This will allow
us to better support images of vectors of vectors, spacing per slice,
...

Method
======
We could add a Met_ReadVersion function for meta object developers
that returns a version number for a file's format.   The version
number can be read from a file without reading the other contents of a
file.   MetaObject readers would be able to adjust the fields they
read from a file based on that version.  MetaObject writers should be
able to write to older version formats as well as the current version
format.

The version tag will be set to 1.0 for all object formats at this
time.   Thus, if a version number hasn't been specified in the file,
the MET_ReadVersion function returns 1 (corresponding to the current
version of meta).   Moving forward, each object can increase its
version - that is, there will not be a global version number, it will
be object specific.

Justification for design: Currently, there is a function
"Met_ReadForm" that allows a developer to query the type of object in
a meta file (e.g., image, matrix, arrow, tube,...).    The proposed
MET_ReadVersion function follows that pattern.

The file tag will be "ObjectVersion".
The value of ObjectVersion with be an unsigned int.  (no concept of
minor/major versioning will be provided).
-- The tag is ObjectVersion and not FileVersion because the content of
the file/object will change, not just its organization in the file.

Comments / suggestions / concerns?

s

-- 

==============================
Stephen R. Aylward, Ph.D.
Director of Medical Imaging Research
Kitware, Inc. - North Carolina Office
http://www.kitware.com
stephen.aylward (Skype)
(919) 969-6990 x300


More information about the Insight-developers mailing list