NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::IImage_file Class Referenceabstract

Abstract interface for image files. More...

Inheritance diagram for mi::neuraylib::IImage_file:
Inheritance graph
[legend]

Public Member Functions

virtual const char *  get_type () const =0
  Returns the pixel type of the image. More...
 
virtual Uint32  get_resolution_x (Uint32 level=0) const =0
  Returns the resolution of the image in x direction. More...
 
virtual Uint32  get_resolution_y (Uint32 level=0) const =0
  Returns the resolution of the image in y direction. More...
 
virtual Uint32  get_layers_size (Uint32 level=0) const =0
  Returns the number of layers of the image. More...
 
virtual Uint32  get_tile_resolution_x (Uint32 level=0) const =0
  Returns the size of a tile in x direction. More...
 
virtual Uint32  get_tile_resolution_y (Uint32 level=0) const =0
  Returns the size of a tile in y direction. More...
 
virtual Uint32  get_miplevels () const =0
  Returns number of miplevels. More...
 
virtual bool  get_is_cubemap () const =0
  Indicates whether the image represents a cubemap. More...
 
virtual Float32  get_gamma () const =0
  Returns the gamma value of the image. More...
 
virtual bool  read (ITile *tile, Uint32 x, Uint32 y, Uint32 z, Uint32 level=0) const =0
  Read pixels from the image file into a tile. More...
 
virtual bool  write (const ITile *tile, Uint32 x, Uint32 y, Uint32 z, Uint32 level=0)=0
  Write pixels from a tile into the image file. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x26db4186, 0xace2, 0x42e8, 0xa0, 0x3d, 0xe0, 0xfa, 0xfc, 0xed, 0x05, 0xf3 >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
  Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
  Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x26db4186, 0xace2, 0x42e8, 0xa0, 0x3d, 0xe0, 0xfa, 0xfc, 0xed, 0x05, 0xf3 >
static bool  compare_iid (const Uuid &iid)
  Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

Abstract interface for image files.

Instance of this interface are created by mi::neuraylib::IImage_plugin::open_for_writing() or mi::neuraylib::IImage_plugin::open_for_reading().

Member Function Documentation

virtual Float32 mi::neuraylib::IImage_file::get_gamma ( ) const
pure virtual

Returns the gamma value of the image.

virtual bool mi::neuraylib::IImage_file::get_is_cubemap ( ) const
pure virtual

Indicates whether the image represents a cubemap.

Returns
if the image represents a cubemap, false otherwise.
virtual Uint32 mi::neuraylib::IImage_file::get_layers_size ( Uint32  level = 0) const
pure virtual

Returns the number of layers of the image.

Parameters
level The mipmap level (always 0 if the image is not a mipmap).
Returns
The number of layers of the image.
virtual Uint32 mi::neuraylib::IImage_file::get_miplevels ( ) const
pure virtual

Returns number of miplevels.

virtual Uint32 mi::neuraylib::IImage_file::get_resolution_x ( Uint32  level = 0) const
pure virtual

Returns the resolution of the image in x direction.

Parameters
level The mipmap level (always 0 if the image is not a mipmap).
Returns
The resolution of the image in x direction.
virtual Uint32 mi::neuraylib::IImage_file::get_resolution_y ( Uint32  level = 0) const
pure virtual

Returns the resolution of the image in y direction.

Parameters
level The mipmap level (always 0 if the image is not a mipmap).
Returns
The resolution of the image in y direction.
virtual Uint32 mi::neuraylib::IImage_file::get_tile_resolution_x ( Uint32  level = 0) const
pure virtual

Returns the size of a tile in x direction.

This method indicates the native tile size of the image file (if any). However, read() and write() must be able to handle arbitrary tiles.

Parameters
level The mipmap level (always 0 if the image is not a mipmap).
Returns
The size of a tile in x direction.
virtual Uint32 mi::neuraylib::IImage_file::get_tile_resolution_y ( Uint32  level = 0) const
pure virtual

Returns the size of a tile in y direction.

This method indicates the native tile size of the image file (if any). However, read() and write() must be able to handle arbitrary tiles.

Parameters
level The mipmap level (always 0 if the image is not a mipmap).
Returns
The size of a tile in y direction.
virtual const char* mi::neuraylib::IImage_file::get_type ( ) const
pure virtual

Returns the pixel type of the image.

See Types for a list of supported pixel types.

virtual bool mi::neuraylib::IImage_file::read ( ITile tile,
Uint32  x,
Uint32  y,
Uint32  z,
Uint32  level = 0 
) const
pure virtual

Read pixels from the image file into a tile.

Border tiles are passed as full tiles and the method must fill the pixel data for areas that are visible in the image. The tile size may be arbitrary, and in particular, not the same as indicated by get_tile_resolution_x() and get_tile_resolution_y().

This method will never be called if this instance was obtained from mi::neuraylib::IImage_plugin::open_for_writing().

Parameters
tile The tile to read the data into.
x The x position of the lower left corner of the tile.
y The y position of the lower left corner of the tile.
z The z layer (for 3d textures or cubemaps).
level The mipmap level (always 0 if the image is not a mipmap).
Returns
true if the tile was successfully read, false otherwise.
virtual bool mi::neuraylib::IImage_file::write ( const ITile tile,
Uint32  x,
Uint32  y,
Uint32  z,
Uint32  level = 0 
)
pure virtual

Write pixels from a tile into the image file.

Border tiles are passed as full tiles but only contain valid pixel data in areas that are visible in the image. The tile size may be arbitrary, and in particular, not the same as indicated by get_tile_resolution_x() and get_tile_resolution_y().

This method will never be called if this instance was obtained from mi::neuraylib::IImage_plugin::open_for_reading().

Parameters
tile The tile to read the data from.
x The x position of the lower left corner of the tile.
y The y position of the lower left corner of the tile.
z The z layer (for 3d textures or cubemaps).
level The mipmap level (always 0 if the image is not a mipmap).
Returns
true if the tile was successfully written, false otherwise.