MDL SDK API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
iimage.h
Go to the documentation of this file.
1 /***************************************************************************************************
2  * Copyright 2022 NVIDIA Corporation. All rights reserved.
3  **************************************************************************************************/
6 
7 #ifndef MI_NEURAYLIB_IIMAGE_H
8 #define MI_NEURAYLIB_IIMAGE_H
9 
11 
12 namespace mi {
13 
14 class IArray;
15 
16 namespace neuraylib {
17 
18 class ICanvas;
19 class IReader;
20 
32 class IImage :
63  public base::Interface_declare<0xca59b977,0x30ee,0x4172,0x91,0x53,0xb7,0x70,0x2c,0x6b,0x3a,0x76,
64  neuraylib::IScene_element>
65 {
66 public:
68 
69 
133  virtual Sint32 reset_file( const char* filename, const char* selector = 0) = 0;
134 
150  virtual Sint32 reset_reader(
151  IReader* reader, const char* image_format, const char* selector = 0) = 0;
152 
178  virtual Sint32 reset_reader(
179  IArray* reader, const char* image_format, const char* selector = 0) = 0;
180 
189  virtual bool set_from_canvas( const ICanvas* canvas) = 0;
190 
202  virtual bool set_from_canvas( ICanvas* canvas, bool shared = false) = 0;
203 
220  virtual bool set_from_canvas( const IArray* uvtiles) = 0;
221 
243  virtual bool set_from_canvas( IArray* uvtiles, bool shared = false) = 0;
244 
246 
248 
252  virtual bool is_animated() const = 0;
253 
255  virtual Size get_length() const = 0;
256 
264  virtual Size get_frame_number( Size frame_id) const = 0;
265 
270  virtual Size get_frame_id( Size frame_number) const = 0;
271 
273 
275 
280  virtual bool is_uvtile() const = 0;
281 
283  virtual Size get_frame_length( Size frame_id) const = 0;
284 
285 #ifdef MI_NEURAYLIB_DEPRECATED_12_1
286  inline Size get_uvtile_length() const { return get_frame_length( 0); }
287 #endif
288 
296  virtual Sint32 get_uvtile_uv( Size frame_id, Size uvtile_id, Sint32& u, Sint32& v) const = 0;
297 
298 #ifdef MI_NEURAYLIB_DEPRECATED_12_1
299  inline Sint32 get_uvtile_uv( Uint32 uvtile_id, Sint32& u, Sint32& v) const
300  { return get_uvtile_uv( 0, uvtile_id, u, v); }
301 #endif
302 
309  virtual Size get_uvtile_id( Size frame_id, Sint32 u, Sint32 v) const = 0;
310 
311 #ifdef MI_NEURAYLIB_DEPRECATED_12_1
312  inline Uint32 get_uvtile_id( Sint32 u, Sint32 v) const
313  { return static_cast<Uint32>( get_uvtile_id( 0, u, v)); }
314 #endif
315 
323  virtual void get_uvtile_uv_ranges(
324  Size frame_id, Sint32& min_u, Sint32& min_v, Sint32& max_u, Sint32& max_v) const = 0;
325 
326 #ifdef MI_NEURAYLIB_DEPRECATED_12_1
327  inline void get_uvtile_uv_ranges(
328  Sint32& min_u, Sint32& min_v, Sint32& max_u, Sint32& max_v) const
329  { return get_uvtile_uv_ranges( 0, min_u, min_v, max_u, max_v); }
330 #endif
331 
333 
335 
346  virtual const char* get_filename( Size frame_id, Size uvtile_id) const = 0;
347 
348 #ifdef MI_NEURAYLIB_DEPRECATED_12_1
349  inline const char* get_filename( Uint32 uvtile_id = 0) const
350  { return get_filename( 0, uvtile_id); }
351 #endif
352 
358  virtual const char* get_original_filename() const = 0;
359 
361  virtual const char* get_selector() const = 0;
362 
372  virtual const ICanvas* get_canvas( Size frame_id, Size uvtile_id, Uint32 level) const = 0;
373 
374 #ifdef MI_NEURAYLIB_DEPRECATED_12_1
375  inline const ICanvas* get_canvas( Uint32 level = 0, Uint32 uvtile_id = 0) const
376  { return get_canvas( 0, uvtile_id, level); }
377 #endif
378 
380 
382 
390  virtual const char* get_type( Size frame_id, Size uvtile_id) const = 0 ;
391 
392 #ifdef MI_NEURAYLIB_DEPRECATED_12_1
393  inline const char* get_type( Uint32 uvtile_id = 0) const { return get_type( 0, uvtile_id); }
394 #endif
395 
401  virtual Uint32 get_levels( Size frame_id, Size uvtile_id) const = 0;
402 
403 #ifdef MI_NEURAYLIB_DEPRECATED_12_1
404  inline Uint32 get_levels( Uint32 uvtile_id = 0) const { return get_levels( 0, uvtile_id); }
405 #endif
406 
414  virtual Uint32 resolution_x( Size frame_id, Size uvtile_id, Uint32 level) const = 0;
415 
416 #ifdef MI_NEURAYLIB_DEPRECATED_12_1
417  inline Uint32 resolution_x( Uint32 level = 0, Uint32 uvtile_id = 0) const
418  { return resolution_x( 0, uvtile_id, level); }
419 #endif
420 
428  virtual Uint32 resolution_y( Size frame_id, Size uvtile_id, Uint32 level) const = 0;
429 
430 #ifdef MI_NEURAYLIB_DEPRECATED_12_1
431  inline Uint32 resolution_y( Uint32 level = 0, Uint32 uvtile_id = 0) const
432  { return resolution_y( 0, uvtile_id, level); }
433 #endif
434 
442  virtual Uint32 resolution_z( Size frame_id, Size uvtile_id, Uint32 level) const = 0;
443 
444 #ifdef MI_NEURAYLIB_DEPRECATED_12_1
445  inline Uint32 resolution_z( Uint32 level = 0, Uint32 uvtile_id = 0) const
446  { return resolution_z( 0, uvtile_id, level); }
447 #endif
448 
450 };
451  // end group mi_neuray_misc
453 
454 } // namespace neuraylib
455 
456 } // namespace mi
457 
458 #endif // MI_NEURAYLIB_IIMAGE_H