MDL SDK API nvidia_logo_transpbg.gif Up
iimage.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_IIMAGE_H
8#define MI_NEURAYLIB_IIMAGE_H
9
12
13namespace mi {
14
15class IArray;
16
17namespace neuraylib {
18
19class ICanvas;
20class IReader;
21
63class IImage :
64 public base::Interface_declare<0xca59b977,0x30ee,0x4172,0x91,0x53,0xb7,0x70,0x2c,0x6b,0x3a,0x76,
65 neuraylib::IScene_element>
66{
67public:
69
70
135 virtual Sint32 reset_file( const char* filename, const char* selector = 0) = 0;
136
154 IReader* reader, const char* image_format, const char* selector = 0) = 0;
155
185 IArray* reader, const char* image_format, const char* selector = 0) = 0;
186
198 virtual bool set_from_canvas(
199 const ICanvas* canvas, const char* selector = 0) = 0;
200
215 virtual bool set_from_canvas(
216 ICanvas* canvas, const char* selector = 0, bool shared = false) = 0;
217
218#ifdef MI_NEURAYLIB_DEPRECATED_14_0
219 inline bool set_from_canvas( ICanvas* canvas, bool shared)
220 { return set_from_canvas( canvas, 0, shared); }
221#endif
222
243 virtual bool set_from_canvas(
244 const IArray* uvtiles, const char* selector = 0) = 0;
245
270 virtual bool set_from_canvas(
271 IArray* uvtiles, const char* selector = 0, bool shared = false) = 0;
272
273#ifdef MI_NEURAYLIB_DEPRECATED_14_0
274 inline bool set_from_canvas( IArray* uvtiles, bool shared)
275 { return set_from_canvas( uvtiles, 0, shared); }
276#endif
277
279
281
285 virtual bool is_animated() const = 0;
286
288 virtual Size get_length() const = 0;
289
297 virtual Size get_frame_number( Size frame_id) const = 0;
298
303 virtual Size get_frame_id( Size frame_number) const = 0;
304
306
308
313 virtual bool is_uvtile() const = 0;
314
316 virtual Size get_frame_length( Size frame_id) const = 0;
317
325 virtual Sint32 get_uvtile_uv( Size frame_id, Size uvtile_id, Sint32& u, Sint32& v) const = 0;
326
333 virtual Size get_uvtile_id( Size frame_id, Sint32 u, Sint32 v) const = 0;
334
343 Size frame_id, Sint32& min_u, Sint32& min_v, Sint32& max_u, Sint32& max_v) const = 0;
344
346
348
359 virtual const char* get_filename( Size frame_id, Size uvtile_id) const = 0;
360
366 virtual const char* get_original_filename() const = 0;
367
369 virtual const char* get_selector() const = 0;
370
380 virtual const ICanvas* get_canvas( Size frame_id, Size uvtile_id, Uint32 level) const = 0;
381
383
385
393 virtual const char* get_type( Size frame_id, Size uvtile_id) const = 0 ;
394
400 virtual Uint32 get_levels( Size frame_id, Size uvtile_id) const = 0;
401
409 virtual Uint32 resolution_x( Size frame_id, Size uvtile_id, Uint32 level) const = 0;
410
418 virtual Uint32 resolution_y( Size frame_id, Size uvtile_id, Uint32 level) const = 0;
419
427 virtual Uint32 resolution_z( Size frame_id, Size uvtile_id, Uint32 level) const = 0;
428
430};
431 // end group mi_neuray_misc
433
434} // namespace neuraylib
435
436} // namespace mi
437
438#endif // MI_NEURAYLIB_IIMAGE_H
This interface represents static arrays, i.e., arrays with a fixed number of elements.
Definition: iarray.h:37
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
Abstract interface for a canvas represented by a rectangular array of tiles.
Definition: icanvas.h:89
This interface represents a pixel image file.
Definition: iimage.h:66
virtual Size get_frame_length(Size frame_id) const =0
Returns the number of uv-tiles for a given frame (or 0 if frame_id is out of bounds).
virtual Size get_frame_id(Size frame_number) const =0
Returns the frame ID for a given frame number.
virtual Sint32 reset_file(const char *filename, const char *selector=0)=0
Sets the image to a file identified by filename.
virtual bool set_from_canvas(const IArray *uvtiles, const char *selector=0)=0
Sets the frames/uv-tiles of this image to the passed canvases (without sharing).
virtual Uint32 resolution_y(Size frame_id, Size uvtile_id, Uint32 level) const =0
Returns the vertical resolution of a canvas.
virtual Sint32 reset_reader(IArray *reader, const char *image_format, const char *selector=0)=0
Sets the image to the frame/uv-tile data provided by an array of readers.
virtual Sint32 reset_reader(IReader *reader, const char *image_format, const char *selector=0)=0
Sets the image to the data provided by a reader.
virtual Size get_frame_number(Size frame_id) const =0
Returns the frame number for a give frame ID.
virtual const char * get_type(Size frame_id, Size uvtile_id) const =0
Returns the pixel type of a mipmap.
virtual bool is_animated() const =0
Indicates whether this image represents an animated texture.
virtual void get_uvtile_uv_ranges(Size frame_id, Sint32 &min_u, Sint32 &min_v, Sint32 &max_u, Sint32 &max_v) const =0
Returns the ranges of u- and v-coordinates.
virtual const char * get_selector() const =0
Returns the selector (or NULL).
virtual const ICanvas * get_canvas(Size frame_id, Size uvtile_id, Uint32 level) const =0
Returns a canvas with the pixel data of the image.
virtual bool set_from_canvas(ICanvas *canvas, const char *selector=0, bool shared=false)=0
Sets the image to the passed canvas (possibly sharing the pixel data).
virtual bool set_from_canvas(const ICanvas *canvas, const char *selector=0)=0
Sets the image to the passed canvas (without sharing).
virtual Size get_uvtile_id(Size frame_id, Sint32 u, Sint32 v) const =0
Returns the uv-tile ID corresponding to u- and v-coordinates.
virtual bool set_from_canvas(IArray *uvtiles, const char *selector=0, bool shared=false)=0
Sets the frames/uv-tiles of this image based to the passed canvases (possibly sharing the pixel data)...
virtual const char * get_original_filename() const =0
Returns the unresolved file as passed to reset_file().
virtual Sint32 get_uvtile_uv(Size frame_id, Size uvtile_id, Sint32 &u, Sint32 &v) const =0
Returns the u- and v- coordinates corresponding to a uv-tile ID.
virtual bool is_uvtile() const =0
Indicates whether this image represents a uvtile sequence.
virtual Uint32 resolution_z(Size frame_id, Size uvtile_id, Uint32 level) const =0
Returns the number of layers of a canvas.
virtual const char * get_filename(Size frame_id, Size uvtile_id) const =0
Returns the resolved file name of a mipmap of the image.
virtual Size get_length() const =0
Returns the number of frames of this image. Never zero.
virtual Uint32 resolution_x(Size frame_id, Size uvtile_id, Uint32 level) const =0
Returns the horizontal resolution of a canvas.
virtual Uint32 get_levels(Size frame_id, Size uvtile_id) const =0
Returns the number of levels in the mipmap pyramid.
A reader supports binary block reads and string-oriented line reads that zero-terminate the result.
Definition: ireader.h:27
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Base class for all scene elements.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5
Major and minor version number and an optional qualifier.