[Insight-developers] IO Question

Kent Williams norman-k-williams at uiowa . edu
Fri, 27 Jun 2003 09:57:11 -0500


I have written another reader for a Brains2 file type, to read in ROI fil=
es.=20
But unlike the file readers in Insight/Code/IO the output of this reader =
is a=20
itk::PolygonGroupSpatialObject.

Ultimately, I would like to check this into ITK, because we are beginning=
 to=20
support other University of Iowa Departments' ITK development. I'd rather=
 be=20
able to point them at a CVS checkout of ITK rather than deliver a separat=
e=20
set of files for our additions.

The question is this: Is there an appropriate place to integrate this sor=
t of=20
class?  Insight/Utililties/MetaIO is the closest analog, but that really=20
captures a file format and a parallel hierarchy of geometric representati=
ons.

What I've done for the Brains2 ROI files is ad hoc, though it copies the=20
interfaces of the ImageIO classes somewhat.  But it seems to me that it w=
ould=20
be worthwhile to come up with a standard way to read in ITK data objects=20
besides Images.  What would make the most sense design-wise would be to h=
ave=20
a base class interface that would encompase both ITK Images, Spatial Obje=
cts,=20
and anything else you'd want to store on disk.

Thoughts and direction on this is welcome.