ossimlabs / ossim

Core OSSIM (Open Source Software Image Map) package including C++ code for OSSIM library, command-line applications, tests, and build system
MIT License
299 stars 142 forks source link

Documentation of ossimImageHandlerRegistry::instance()->openConnection #231

Open rddesmond opened 5 years ago

rddesmond commented 5 years ago

In Nov 2016, a new openConnection interface was added to ossimInfo, and some other apps.

      // Go through new interface that passes a stream around. (drb 10 Nov. 2016)
      // ossimRefPtr<ossimImageHandler> result = ossimImageHandlerRegistry::instance()->open(file);
      result = ossimImageHandlerRegistry::instance()->
openConnection(file);

It seems like this might be a preferable* way to do things, but it doesn't have doxygen comments in ossimImageHandlerRegistry.h, which makes it seem like it's not preferable. What is the current state? If it is better, newer, more accurate, does documentation be added?

* One particular case where the new version is important: We are trying to load a JP2 NITF. For whatever reason, it can load with the kakadu plugin but not the built-in reader. But with open, the kakadu plugin rejects it because it doesn't list NITF as a supported suffix. With openConnection, it sees that it is, in fact, a suitable file.