Expose ImageToImageFilter::VerifyInputInformation() as a usable True/False function
Description
When checking a large number of images before processing, say by reading just the metadata rather than the voxel data, it would be worthwhile to be able to check if they're all "in the same space" before doing expensive processing.
Exposing the logic of ImageToImageFilter::VerifyInputInformation() as a function for using a test on a pair of images would be helpful in this regard.
Expected behavior
newFunction(img1, img2) returns True if the images would pass the same test in ImageToImage Filter (i.e. same origins, spacings, Directions etc)
Actual behavior
NA
Additional Information
Inspired by question here, https://discourse.itk.org/t/quick-test-for-are-images-in-the-same-space-aka-overalpping-simpleitk/5249/5
Possibly add it to ImageBase, as a method named SameImageGridAs(ImageBase* otherImage).
One thing to clarify here, I'd like it to be usable without loading voxel data, as I would intend to use it as a preflight check before heavy IO and computation, which I do in SimpleITK by with ImageFileReader/ReadImageInformation.
Possibly add it to
ImageBase, as a method namedSameImageGridAs(ImageBase* otherImage).
The current implementation in ImageToImageFilter also uses a member variables m_CoordinateTolerance and m_DirectionTolerance so the proposed method would need to have these arguments too.
There are only a 3-5 lines of code to do the comparison, most it is just printing an error message. The error code would not be appropriate for the proposed method IMHO.