![]() |
IOFormat C# 1.8.0
|
All API modifications will be documented in this file.
Added 2 methods StackWriter::writeFromPattern:
Added 2 options to TIFF writer: tileSize to define the tile size to apply, and forceStrips to force the writing of strips.
ioformat_config.yml can now contain a libraries section which allows selecting libraries to load as plugins.
Config file is now optional. If not present, IOFormat behavior is the same than if file is empty. Config file (old 'config.yml') is renamed into "ioformat_config.yml"
Configuration file must now be called config.yml and be located in plugins folder. This file should contain a list of plugins which must be tried in a specific order when opening a file format. See user guide plugin system chapter for more details.
several API changes:
getView becomes openViewloadImage becomes readImagesave becomes writeViewopenPattern becomes openImageFromPatternloadPattern becomes readImageFromPatternopenListFile becomes openImageFromListFileloadListFile becomes readImageFromListFileAdding ioformat::getView(const std::string& path, const std::string& format) to make user able to force a format when opening a file.
All method from IOFormat class moved to ioformat namespace. To call these factories you previously needed to write ioformat::IOFormat::getView for example, now you can write ioformat::getView.
In Python, the factories are at the module level: ioformat.IOFormat.get_view now becoming ioformat.get_view for example.
In .NET, a class to contain the functions is required, and is now named ViewIO. So you have to write IOFormat.ViewIO.GetView where you wrote IOFormat.IOformat.GetView.
New methods in StackReader factory:
openListFile that stack the files listed inside a given list file.loadListFile that do the same, and load the result in memory.New factory class StackReader with the following methods:
std::shared_ptr<ImageView> openPattern(const std::string& pattern, ImageDimension newDim)std::shared_ptr<ImageView> openPattern(const std::string& pattern)std::shared_ptr<MemoryImageView> loadPattern(const std::string& pattern, ImageDimension newDim)std::shared_ptr<MemoryImageView> loadPattern(const std::string& pattern)New method IOFormat::init() added
New Versioning class to handle version services, such as getting the version info, the version string or checking the library compatibility.
Two new constants defined in the header, in order to support these versioning utilities: IOFORMAT_VERSION and IOFORMAT_VERSION_STRING.
Many methods in IOFormat required WriteStreamAccess as an input, so they were replaced with the more generic interface DataAccess.
Changed methods:
IOFormat::saveIOFormat::openWriterWriters are now able to take all possible view types as input as long as there is no user decision or data loss in the process.
Tiff reader can now return an ImageView (one frame) or a MultiImageView (multi-frame). In the case "multi-frame", only the first frame of the file will be read until frameCount method is called. So as to not systematically read the whole file (Improvement for HTTP access)
IOFormat now uses a new version of IOPLugin, so the custom plugin must be adapted accordingly.
Little API changes:
IOFormat::getView: first argument from Storage to DataAccessIOFormat::openWriter: second argument from OStreamStorage to WriteStreamAccess in both version of the function.IOFormat::save: second argument from OStreamStorage to WriteStreamAccessOSX platform is not supported from now on.
Big rework of the existing plugins to fit the new IOPlugin API, that enable new features. There should not be big changes with the use of IOFormat itself, but plugins implemented with the previous IOPlugin API will not function properly with IOFormat.
IOF-181: Python naming conventions: method names are now lowercase, with words separated by underscores. Example: IOFormat.getView() is renamed into IOFormat.get_view().
No changes
void saveImage(std::shared_ptr<iolink::ReadImageView> view, const std::string& pathFile) is renamed save and takes a View as first argumentvoid saveImage(std::shared_ptr<iolink::View> view, std::shared_ptr<iolink::OStreamStorage> dst, const std::string& format) is renamed save and takes a View as first argumentFollowing methods take a View as first argument instead of a ReadImageView:
static std::shared_ptr<iolink::Writer> openWriter(std::shared_ptr<iolink::View> view, const std::string& pathFile)static std::shared_ptr<iolink::Writer> openWriter(std::shared_ptr<iolink::View> view, std::shared_ptr<iolink::OStreamStorage> dst, const std::string& format)static std::shared_ptr<iolink::Writer> openWriter(std::shared_ptr<iolink::View> view, std::shared_ptr<iolink::OStreamStorage> dst, const std::string& format, const std::string& plugin)No changes
std::string formatFromExtension(const std::string& extension) method into IOFormat apivoid IOFormat::setLogLevelvoid IOFormat::setFlushLevelvoid Logger::init(LogeLevel level)LogLevel Logger::logLevel()static std::shared_ptr<iolink::Writer> openWriter(std::shared_ptr<iolink::ReadImageView> image, const std::string& pathFile); to open a writer used to write an image view into a file.static std::shared_ptr<iolink::Writer> openWriter(std::shared_ptr<iolink::ReadImageView> image, std::shared_ptr<iolink::OStreamStorage> dst, const std::string& format); to open a writer used to write an image view into an output stream.static std::shared_ptr<iolink::Writer> openWriter(std::shared_ptr<iolink::ReadImageView> image, std::shared_ptr<iolink::OStreamStorage> dst, const std::string& format, const std::string& plugin); to open a writer used to write an image view into an output streamNo change
No change