[osg-users] Determining supported file formats

Robert Osfield robert.osfield at gmail.com
Wed Jul 2 08:45:05 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.

Robert.

On Wed, Jul 2, 2008 at 4:06 PM, Paul Martz <pmartz at skew-matrix.com> wrote:
> (For reference, this is a continuation/recap of the thread ".ive plugin:
> incorrect ReadResult?" from early May.)
>
> Hi all --
>
> I think it would be useful to add a new OSG application to the core
> distribution for determining supported file formats. The output of such an
> app might be a list of extensions and whether input or output is supported
> for that extension using the Node, Image, Object, and/or HeightField
> interfaces in osgDB. Output would vary from one installation to another
> based on available plugins.
>
> Based on a lab Bob Kuehne created for our OSG training courses, I have
> crafted such an application, and Bob and I are prepared to submit it for
> inclusion in core OSG. However, the application relies on plugins being
> robust enough to return the expected value when attempting to read an empty
> file of a supported type. Currently, many plugins are not robust enough to
> meet this requirement.
>
> To explain further: To test the IVE plugin for Node input support, the
> application creates an empty .ive file and calls readNode directly on the
> plugin's ReaderWriter. Because OSG's IVE plugin supports reading .ive files
> into Nodes, the worst return value the app expects to see is
> ERROR_IN_READING_FILE. However, the IVE plugin (and many other plugins)
> "incorrectly" return FILE_NOT_HANDLED when attempting to read an empty file,
> even though the extension is supported.
>
> There are two ways I can proceed to create this app:
>
> 1) Submit what I currently have to osg-submissions, and fix issues with the
> plugins as they are encountered. I've already fixed some, but more work
> remains; this will require community effort. However, I'm optimistic we
> could have a viable application in the SIGGRAPH timeframe.
>
> 2) I'm interested in suggestions for better ways to write such an
> application -- some other technique that doesn't depend on plugins correctly
> handling empty files. Any ideas?
>
> If we all decide option 1 is the best way to go, I'll submit my code ASAP.
> Just wanted to have a little discussion first and make sure this was the
> correct route.
>
> Paul Martz
> Skew Matrix Software LLC
> http://www.skew-matrix.com <http://www.skew-matrix.com/>
> +1 303 859 9466
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



More information about the osg-users mailing list