neuray API Programmer's Manual

iimage_plugin.h File Reference

Description

Image plugin API.

Code Example

iimage_plugin.h

‎//*****************************************************************************
// Copyright 1986, 2016 NVIDIA Corporation. All rights reserved.
// ****************************************************************************
// ****************************************************************************

#ifndef MI_NEURAYLIB_IIMAGE_PLUGIN_H
#define MI_NEURAYLIB_IIMAGE_PLUGIN_H

#include <mi/base/interface_declare.h>
#include <mi/base/plugin.h>
#include <mi/base/types.h>
#include <mi/neuraylib/iimpexp_base.h>
#include <mi/neuraylib/version.h>

namespace mi {

namespace neuraylib {

class IImage_file;
class IWriter;
class IReader;

class IPlugin_api; class ITile;


#define MI_NEURAY_IMAGE_PLUGIN_TYPE "image v8"

class IImage_plugin : public base::Plugin
{
public:
    virtual const char* get_name() const = 0;

    virtual bool init( IPlugin_api* plugin_api) = 0;
        
    virtual bool exit( IPlugin_api* plugin_api) = 0;

    virtual const char* get_file_extension( Uint32 index) const = 0;

    virtual const char* get_supported_type( Uint32 index) const = 0;

    virtual bool test( const Uint8* buffer, Uint32 file_size) const = 0;

    virtual Impexp_priority 
               get_priority() const = 0;

    virtual IImage_file* open_for_writing(
        IWriter* writer,
        const char* pixel_type,
        Uint32 resolution_x,
        Uint32 resolution_y,
        Uint32 nr_of_layers,
        Uint32 miplevels,
        bool is_cubemap,
        Float32 gamma,
        Uint32 quality) const = 0;

    virtual IImage_file* open_for_reading( IReader* reader) const = 0;
};

class IImage_file
  : public base::Interface_declare<0x26db4186,0xace2,0x42e8,0xa0,0x3d,0xe0,0xfa,0xfc,0xed,0x05,0xf3>
{
public:
    virtual const char* get_type() const = 0;

    virtual Uint32 
               get_resolution_x( Uint32 level = 0) const = 0;

    virtual Uint32 
               get_resolution_y( Uint32 level = 0) const = 0;

    virtual Uint32 
               get_layers_size( Uint32 level = 0) const = 0;

    virtual Uint32 
               get_tile_resolution_x( Uint32 level = 0) const = 0;

    virtual Uint32 
               get_tile_resolution_y( Uint32 level = 0) const = 0;

    virtual Uint32 
               get_miplevels() const = 0;

    virtual bool get_is_cubemap() const = 0;

    virtual Float32 
               get_gamma() const = 0;    

    virtual bool read(
        ITile* tile, Uint32 x, Uint32 y, Uint32 z, Uint32 level = 0) const = 0;

    virtual bool write(
        const ITile* tile, Uint32 x, Uint32 y, Uint32 z, Uint32 level = 0) = 0;
};
 // end group mi_neuray_plugins

} // namespace neuraylib

#ifdef MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
using neuraylib::IImage_file;
using neuraylib::IImage_plugin;
using neuraylib::IReader;
using neuraylib::IWriter;
using neuraylib::Impexp_priority;
#endif // MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION

} // namespace mi

#endif // MI_NEURAYLIB_IIMAGE_PLUGIN_H

Namespaces

namespace 
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...
namespace 
Namespace for the neuray API. More...

Classes

class 
Abstract interface for image files. More...
class 
Abstract interface for image plugins. More...

Defines

#define  "image v8"
Type of image plugins. More...