Hi VXL users,

I'm new to VXL. I've got some very large images that I'm opening, not in one go, but via a vxl_image_resource. But I'm having a problem when I try to get a view on the resource. The problem is that I don't know ahead of time what kind of image I might be opening. They can be of various formats (e.g., TIFF, BMP, JPG, NTF), and various bit depths (e.g., 1x8, 1x16, 3x8, 4x16). So, for example, if I just naively call:

vil_image_resource_sptr pResource = vil_load_image_resource(nameAsConstChar);
vil_image_view<vil_rgb<vxl_byte>> iView = pResource->get_view(100,200,100,200);

on an image with 1x16 bit depth, I get an exception on the second line that says "Pixel formats incompatible". Is it possible to query the image resource to get this information? I looked through the documentation and couldn't find an example or a method on vil_image_resource that would provide this information. Maybe I missed it.

Any help and/or pointers to documentation would be greatly appreciated. Thanks in advance!

:) Michael