MDL SDK API nvidia_logo_transpbg.gif Up
mi::neuraylib::IImage_file Class Referenceabstract

Abstract interface for image files. More...

#include <iimage_plugin.h>

Inheritance diagram for mi::neuraylib::IImage_file:

Public Member Functions

virtual const char * get_type () const =0
 Returns the pixel type of the image (or the requested channel). More...
 
virtual Uint32 get_resolution_x (Uint32 level) const =0
 Returns the resolution of the image in x direction. More...
 
virtual Uint32 get_resolution_y (Uint32 level) const =0
 Returns the resolution of the image in y direction. More...
 
virtual Uint32 get_layers_size (Uint32 level) const =0
 Returns the number of layers of the image. 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 ITileread (Uint32 z, Uint32 level) const =0
 Read pixels from the image file into a tile. More...
 
virtual bool write (const ITile *tile, Uint32 z, Uint32 level)=0
 Write pixels from a tile into the image file. More...
 
- Public Member Functions inherited from mi::base::IInterface
virtual Uint32 retain () const =0
 Increments the reference count. More...
 
virtual Uint32 release () const =0
 Decrements the reference count. More...
 
virtual const IInterfaceget_interface (const Uuid &interface_id) const =0
 Acquires a const interface from another. More...
 
template<class T>
const T * get_interface () const
 Acquires a const interface from another. More...
 
virtual IInterfaceget_interface (const Uuid &interface_id)=0
 Acquires a mutable interface from another. More...
 
template<class T>
T * get_interface ()
 Acquires a mutable interface from another. More...
 
virtual Uuid get_iid () const =0
 Returns the interface ID of the most derived interface. More...
 

Additional Inherited Members

- Public Types inherited from mi::base::Interface_declare< 0x26db4186, ... >
typedef Interface_declare< id1, ... > Self
 Own type. More...
 
typedef Uuid_t< id1, ... > IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> IID
 Declares the interface ID (IID) of this interface. More...
 
- Static Public Member Functions inherited from mi::base::Interface_declare< 0x26db4186, ... >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 
- Static Public Member Functions inherited from mi::base::IInterface
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface. 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

 get_gamma()

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

Returns the gamma value of the image.

 get_is_cubemap()

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.

 get_layers_size()

virtual Uint32 mi::neuraylib::IImage_file::get_layers_size ( Uint32  level) const
pure virtual

Returns the number of layers of the image.

Parameters
levelThe mipmap level (always 0 if the image is not a mipmap).
Returns
The number of layers of the image.

 get_miplevels()

virtual Uint32 mi::neuraylib::IImage_file::get_miplevels ( ) const
pure virtual

Returns number of miplevels.

 get_resolution_x()

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

Returns the resolution of the image in x direction.

Parameters
levelThe mipmap level (always 0 if the image is not a mipmap).
Returns
The resolution of the image in x direction.

 get_resolution_y()

virtual Uint32 mi::neuraylib::IImage_file::get_resolution_y ( Uint32  level) const
pure virtual

Returns the resolution of the image in y direction.

Parameters
levelThe mipmap level (always 0 if the image is not a mipmap).
Returns
The resolution of the image in y direction.

 get_type()

virtual const char * mi::neuraylib::IImage_file::get_type ( ) const
pure virtual

Returns the pixel type of the image (or the requested channel).

See Types for a list of supported pixel types.

 read()

virtual ITile * mi::neuraylib::IImage_file::read ( Uint32  z,
Uint32  level 
) const
pure virtual

Read pixels from the image file into a tile.

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

Parameters
zThe z layer (for 3d textures or cubemaps).
levelThe mipmap level (always 0 if the image is not a mipmap).
Returns
The tile with the read data, or NULL in case of failures.

 write()

virtual bool mi::neuraylib::IImage_file::write ( const ITile tile,
Uint32  z,
Uint32  level 
)
pure virtual

Write pixels from a tile into the image file.

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

Parameters
tileThe tile to read the data from.
zThe z layer (for 3d textures or cubemaps).
levelThe mipmap level (always 0 if the image is not a mipmap).
Returns
true if the tile was successfully written, false otherwise.