Just to clarify, I’m not advocating for any particular change. Now that I know this about the vtk image file format, I’ll simply work around this issue. I guess I’m more surprised than anything. It seems like, as a community, we’ve had this understood stringency with respect to the physical consistency of images and other objects. For example, I’m thinking of the check that you put in, if I remember correctly, the ImageToImageFilter where consistency in spacing, origin, and direction is strictly enforced. I also remember from the old insight-users list where Luis cautioned somebody about using the ChangeImageInformationFilter and advocated (paraphrasing) “you should think about it first, then grab a cup of coffee, and think about it some more.”
If the community doesn’t think a warning is good idea, or if changing the ImageIO to explicitly set some sort of flag (as you mention) is not a good option, there are other possibilities. For example, assigning the direction to be identity is completely arbitrary. But it’s not only arbitrary, it’s perhaps the most common set of values for that variable. So not only is the information changed from an unknown quantity to an arbitrary value, that arbitrary value has a greater likelihood of bypassing the check that you put in. An alternative to a warning or flag could be to simply assign a random rotation (and/or random spacing, origin, etc.) when that field is not specified.
Again, I’m not attached to any particular solution (including the status quo). Just thought I’d clarify a bit with some additional thoughts.