[Insight-developers] Get rid of ITK_OnDiskStorageTypeName?

kent williams norman-k-williams at uiowa.edu
Fri Nov 12 11:31:05 EST 2010


In removing the dependence on dynamic_cast and typeid in the Code/IO
classes, I happened upon some code that needs to go away, where the
attribute ITK_OnDiskStorageTypeName is set during the ImageIOBase::Read
method.

Here's why I think it needs to go away:

1. In general, what scalar type was used on-disk is irrelevant once you've
read the image into an itk::Image of your specified type.  That's rather the
whole point of ImageIO

If you really need to find that out, you can instantiate the appropriate
ImageIO class and 'sniff' the file without reading it.

2. The only classes I actually put this code in were the ones I wrote in
2003, and most ImageIO classes don't bother setting that MetaDataDictionary
attribute.  So I doubt anyone is depending on it being there, precisely
because you CAN'T depend on it being there.

3. It's the last place where typeid is used in ImageIO.

Anyone object?



More information about the Insight-developers mailing list