MDL SDK API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
iimage_plugin.h
Go to the documentation of this file.
1 /***************************************************************************************************
2  * Copyright 2022 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
6 
7 #ifndef MI_NEURAYLIB_IIMAGE_PLUGIN_H
8 #define MI_NEURAYLIB_IIMAGE_PLUGIN_H
9 
11 #include <mi/base/plugin.h>
12 #include <mi/base/types.h>
14 
15 namespace mi {
16 
17 namespace neuraylib {
18 
19 class IImage_file;
20 class IWriter;
21 class IReader;
22 
23 class IPlugin_api; class ITile;
24 
38 #define MI_NEURAY_IMAGE_PLUGIN_TYPE "image v30"
40 
56 {
57 public:
63  virtual const char* get_name() const = 0;
64 
69  virtual bool init( IPlugin_api* plugin_api) = 0;
70 
75  virtual bool exit( IPlugin_api* plugin_api) = 0;
76 
82  virtual const char* get_file_extension( Uint32 index) const = 0;
83 
92  virtual const char* get_supported_type( Uint32 index) const = 0;
93 
100  virtual bool test( const Uint8* buffer, Uint32 file_size) const = 0;
101 
106  virtual Impexp_priority get_priority() const = 0;
107 
126  virtual IImage_file* open_for_writing(
127  IWriter* writer,
128  const char* pixel_type,
129  Uint32 resolution_x,
130  Uint32 resolution_y,
131  Uint32 nr_of_layers,
132  Uint32 miplevels,
133  bool is_cubemap,
134  Float32 gamma,
135  Uint32 quality) const = 0;
136 
143  virtual IImage_file* open_for_reading( IReader* reader) const = 0;
144 };
145 
151  : public base::Interface_declare<0x26db4186,0xace2,0x42e8,0xa0,0x3d,0xe0,0xfa,0xfc,0xed,0x05,0xf3>
152 {
153 public:
157  virtual const char* get_type() const = 0;
158 
163  virtual Uint32 get_resolution_x( Uint32 level = 0) const = 0;
164 
169  virtual Uint32 get_resolution_y( Uint32 level = 0) const = 0;
170 
175  virtual Uint32 get_layers_size( Uint32 level = 0) const = 0;
176 
178  virtual Uint32 get_miplevels() const = 0;
179 
183  virtual bool get_is_cubemap() const = 0;
184 
186  virtual Float32 get_gamma() const = 0;
187 
196  virtual ITile* read( Uint32 z, Uint32 level = 0) const = 0;
197 
207  virtual bool write( const ITile* tile, Uint32 z, Uint32 level = 0) = 0;
208 };
209  // end group mi_neuray_plugins
211 
212 } // namespace neuraylib
213 
214 } // namespace mi
215 
216 #endif // MI_NEURAYLIB_IIMAGE_PLUGIN_H