[osg-users] Determining supported file formats

Paul Martz pmartz at skew-matrix.com
Thu Jul 3 10:06:04 PDT 2008


> Hi Paul,
> 
> I can certainly see value in such a application.  To support 
> it you might want to directly extend the ReaderWriter base 
> class with a
> supportedFormats() method of some kind, perhaps this is 
> something that might fall in besides the need to generalise 
> the handling of different protocols i.e. http, https etc or a 
> per plugin bases.

Thanks, Robert -- I agree it might be useful to enhance the ReaderWriter
interface at some point in the future to support this application.

For now, I'm going to go ahead and submit what I have. We will encounter
some issues with plugins returning error codes, which, hopefully, the
community will chip in and help resolve, and we'll also encounter problems
with the 3rdparty dependencies spewing error messages into our output
stream. Not sure what we can do about that.

Here's some brief usage notes regarding the submission:

I'm submitting this as a new application (rather than example) and calling
it "osgio". Simple usage is as follows:

  osgio
  osgio -csv
  osgio flt obj 3ds bmp

In the first form, osgio builds a list of potentially supported extensions,
tests OSG for support, and outputs the extension and ReaderWriter class name
if OSG supports that extension.

In the second form, osgio outputs in CSV format. Each line represents the
support status of a given extension. Columns contain the extension name,
ReaderWriter class name, and support for read/write of Nodes, Images,
Objects, and HeightFields represented by an "X" (absence of "X" indicates a
lack of support).

The third form tests a specific set of given extensions.

The second and third forms may be combined to output a set of specific
extensions in CSV format.

Will post to osg-submissions shortly...

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466




More information about the osg-users mailing list