neuray API Programmer's Manual

iimage.h File Reference

Description

Scene element Image.

Code Example

iimage.h

‎/***************************************************************************************************
 * Copyright 2023 NVIDIA Corporation. All rights reserved.
 **************************************************************************************************/

#ifndef MI_NEURAYLIB_IIMAGE_H
#define MI_NEURAYLIB_IIMAGE_H

#include <mi/neuraylib/iscene_element.h>

namespace mi {

class IArray;

namespace neuraylib {

class ICanvas;
class IReader;































class IImage :
    public base::Interface_declare<0xca59b977,0x30ee,0x4172,0x91,0x53,0xb7,0x70,0x2c,0x6b,0x3a,0x76,
                                   neuraylib::IScene_element>
{
public:


    virtual Sint32 
               reset_file( const char* filename, const char* selector = 0) = 0;

    virtual Sint32 
               reset_reader(
        IReader* reader, const char* image_format, const char* selector = 0) = 0;

    virtual Sint32 
               reset_reader(
        IArray* reader, const char* image_format, const char* selector = 0) = 0;

    virtual bool set_from_canvas(
        const ICanvas* canvas, const char* selector = 0) = 0;

    virtual bool set_from_canvas(
        ICanvas* canvas, const char* selector = 0, bool shared = false) = 0;

#ifdef MI_NEURAYLIB_DEPRECATED_14_0
    inline bool set_from_canvas( ICanvas* canvas, bool shared)
    { return set_from_canvas( canvas, 0, shared); }
#endif

    virtual bool set_from_canvas(
        const IArray* uvtiles, const char* selector = 0) = 0;

    virtual bool set_from_canvas(
        IArray* uvtiles, const char* selector = 0, bool shared = false) = 0;

#ifdef MI_NEURAYLIB_DEPRECATED_14_0
    inline bool set_from_canvas( IArray* uvtiles, bool shared)
    { return set_from_canvas( uvtiles, 0, shared); }
#endif




    virtual bool is_animated() const = 0;

    virtual Size 
               get_length() const = 0;

    virtual Size 
               get_frame_number( Size frame_id) const = 0;

    virtual Size 
               get_frame_id( Size frame_number) const = 0;




    virtual bool is_uvtile() const = 0;

    virtual Size 
               get_frame_length( Size frame_id) const = 0;

#ifdef MI_NEURAYLIB_DEPRECATED_12_1
    inline Size get_uvtile_length() const { return get_frame_length( 0); }
#endif

    virtual Sint32 
               get_uvtile_uv( Size frame_id, Size uvtile_id, Sint32& u, Sint32& v) const = 0;

#ifdef MI_NEURAYLIB_DEPRECATED_12_1
    inline Sint32 
               get_uvtile_uv( Uint32 uvtile_id, Sint32& u, Sint32& v) const
    { return get_uvtile_uv( 0, uvtile_id, u, v); }
#endif

    virtual Size 
               get_uvtile_id( Size frame_id, Sint32 u, Sint32 v) const = 0;

#ifdef MI_NEURAYLIB_DEPRECATED_12_1
    inline Uint32 
               get_uvtile_id( Sint32 u, Sint32 v) const
    { return static_cast<Uint32>( get_uvtile_id( 0, u, v)); }
#endif

    virtual void get_uvtile_uv_ranges(
        Size frame_id, Sint32& min_u, Sint32& min_v, Sint32& max_u, Sint32& max_v) const = 0;

#ifdef MI_NEURAYLIB_DEPRECATED_12_1
    inline void get_uvtile_uv_ranges(
        Sint32& min_u, Sint32& min_v, Sint32& max_u, Sint32& max_v) const
    { return get_uvtile_uv_ranges( 0, min_u, min_v, max_u, max_v); }
#endif




    virtual const char* get_filename( Size frame_id, Size uvtile_id) const = 0;

#ifdef MI_NEURAYLIB_DEPRECATED_12_1
    inline const char* get_filename( Uint32 uvtile_id = 0) const
    { return get_filename( 0, uvtile_id); }
#endif

    virtual const char* get_original_filename() const = 0;

    virtual const char* get_selector() const = 0;

    virtual const ICanvas* get_canvas( Size frame_id, Size uvtile_id, Uint32 level) const = 0;

#ifdef MI_NEURAYLIB_DEPRECATED_12_1
    inline const ICanvas* get_canvas( Uint32 level = 0, Uint32 uvtile_id = 0) const
    { return get_canvas( 0, uvtile_id, level); }
#endif




    virtual const char* get_type( Size frame_id, Size uvtile_id) const = 0 ;

#ifdef MI_NEURAYLIB_DEPRECATED_12_1
    inline const char* get_type( Uint32 uvtile_id = 0) const { return get_type( 0, uvtile_id); }
#endif

    virtual Uint32 
               get_levels( Size frame_id, Size uvtile_id) const = 0;

#ifdef MI_NEURAYLIB_DEPRECATED_12_1
    inline Uint32 
               get_levels( Uint32 uvtile_id = 0) const { return get_levels( 0, uvtile_id); }
#endif

    virtual Uint32 
               resolution_x( Size frame_id, Size uvtile_id, Uint32 level) const = 0;

#ifdef MI_NEURAYLIB_DEPRECATED_12_1
    inline Uint32 
               resolution_x( Uint32 level = 0, Uint32 uvtile_id = 0) const
    { return resolution_x( 0, uvtile_id, level); }
#endif

    virtual Uint32 
               resolution_y( Size frame_id, Size uvtile_id, Uint32 level) const = 0;

#ifdef MI_NEURAYLIB_DEPRECATED_12_1
    inline Uint32 
               resolution_y( Uint32 level = 0, Uint32 uvtile_id = 0) const
    { return resolution_y( 0, uvtile_id, level); }
#endif

    virtual Uint32 
               resolution_z( Size frame_id, Size uvtile_id, Uint32 level) const = 0;

#ifdef MI_NEURAYLIB_DEPRECATED_12_1
    inline Uint32 
               resolution_z( Uint32 level = 0, Uint32 uvtile_id = 0) const
    { return resolution_z( 0, uvtile_id, level); }
#endif

};
 // end group mi_neuray_misc

} // namespace neuraylib

} // namespace mi

#endif // MI_NEURAYLIB_IIMAGE_H

Namespaces

namespace 
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...
namespace 
Namespace for the neuray API. More...

Classes

class 
This interface represents a pixel image file. More...