NVIDIA Iray API Home  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 1986, 2016 NVIDIA Corporation. All rights reserved.
3 // ****************************************************************************
6 // ****************************************************************************
7 
8 #ifndef MI_NEURAYLIB_IIMAGE_PLUGIN_H
9 #define MI_NEURAYLIB_IIMAGE_PLUGIN_H
10 
12 #include <mi/base/plugin.h>
13 #include <mi/base/types.h>
15 #include <mi/neuraylib/version.h>
16 
17 namespace mi {
18 
19 namespace neuraylib {
20 
21 class IImage_file;
22 class IWriter;
23 class IReader;
24 
25 class IPlugin_api; class ITile;
26 
31 #define MI_NEURAY_IMAGE_PLUGIN_TYPE "image v8"
33 
48 class IImage_plugin : public base::Plugin
49 {
50 public:
56  virtual const char* get_name() const = 0;
57 
62  virtual bool init( IPlugin_api* plugin_api) = 0;
63 
68  virtual bool exit( IPlugin_api* plugin_api) = 0;
69 
75  virtual const char* get_file_extension( Uint32 index) const = 0;
76 
85  virtual const char* get_supported_type( Uint32 index) const = 0;
86 
93  virtual bool test( const Uint8* buffer, Uint32 file_size) const = 0;
94 
99  virtual Impexp_priority get_priority() const = 0;
100 
119  virtual IImage_file* open_for_writing(
120  IWriter* writer,
121  const char* pixel_type,
122  Uint32 resolution_x,
123  Uint32 resolution_y,
124  Uint32 nr_of_layers,
125  Uint32 miplevels,
126  bool is_cubemap,
127  Float32 gamma,
128  Uint32 quality) const = 0;
129 
136  virtual IImage_file* open_for_reading( IReader* reader) const = 0;
137 };
138 
144  : public base::Interface_declare<0x26db4186,0xace2,0x42e8,0xa0,0x3d,0xe0,0xfa,0xfc,0xed,0x05,0xf3>
145 {
146 public:
150  virtual const char* get_type() const = 0;
151 
156  virtual Uint32 get_resolution_x( Uint32 level = 0) const = 0;
157 
162  virtual Uint32 get_resolution_y( Uint32 level = 0) const = 0;
163 
168  virtual Uint32 get_layers_size( Uint32 level = 0) const = 0;
169 
177  virtual Uint32 get_tile_resolution_x( Uint32 level = 0) const = 0;
178 
186  virtual Uint32 get_tile_resolution_y( Uint32 level = 0) const = 0;
187 
189  virtual Uint32 get_miplevels() const = 0;
190 
194  virtual bool get_is_cubemap() const = 0;
195 
197  virtual Float32 get_gamma() const = 0;
198 
214  virtual bool read(
215  ITile* tile, Uint32 x, Uint32 y, Uint32 z, Uint32 level = 0) const = 0;
216 
232  virtual bool write(
233  const ITile* tile, Uint32 x, Uint32 y, Uint32 z, Uint32 level = 0) = 0;
234 };
235  // end group mi_neuray_plugins
237 
238 } // namespace neuraylib
239 
240 #ifdef MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
243 using neuraylib::IReader;
244 using neuraylib::IWriter;
246 #endif // MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
247 
248 } // namespace mi
249 
250 #endif // MI_NEURAYLIB_IIMAGE_PLUGIN_H