mi::nservices::ITonemap_operator Class Reference
[Tonemapping]
Description
Provides a contract for tone mapping implementations. A mixin class is provided to facilitate the implementation of tonemap operators. See Tonemap_operator.
Public Member Functions
- virtual void finish( ITonemap_context* tonemap_context) =0
- Finalize tonemapping. More...
- virtual bool full_control() const =0
- Indicates if the operator wants full control over tone mapping. More...
- virtual mi::Sint32 init( ITonemap_context* tonemap_context) =0
- Initialize the tonemap operator. More...
- virtual void process( ITonemap_context* tonemap_context) =0
- Processes the entire canvas. More...
- virtual void process_pixel( ITonemap_context* tonemap_context, const mi::Float32* color_in, mi::Float32* color_out, mi::Uint32 x_coord, mi::Uint32 y_coord) =0
- Processes a given pixel. More...
Member Functions
- virtual void mi::nservices::ITonemap_operator::finish( ITonemap_context* tonemap_context) [pure virtual]
-
Finalize tonemapping. This method is called after tonemapping completes and should destroy any dynamically allocated data.
Parameters
- tonemap_context
- The current tonemapping context.
- virtual bool mi::nservices::ITonemap_operator::full_control() const [pure virtual]
-
Indicates if the operator wants full control over tone mapping. Tells the tonemapping framework whether to process the entire canvas or to process per pixel.
Returns
True if the operator wants full control of the tonemapping operation.
- virtual mi::Sint32 mi::nservices::ITonemap_operator::init( ITonemap_context* tonemap_context) [pure virtual]
-
Initialize the tonemap operator. This function is called before tone mapping begins. Attributes should be read from the context and any pre-calculation done. If the operator is locally adaptive and will need access to the full canvas to tonemap individual pixels then the operator should make an internal copy of the canvas.
Parameters
- tonemap_context
- The current tonemapping context.
Returns
- NRS_ERROR_NONE : success.
- NRS_ERROR_INVALID_PARAMETER : A parameter was invalid.
- NRS_ERROR_NOT_FOUND : A required parameter was not found.
- NRS_ERROR_MEMORY : Insufficient memory to complete initialization.
- virtual void mi::nservices::ITonemap_operator::process( ITonemap_context* tonemap_context) [pure virtual]
-
Processes the entire canvas. This method is called if full_control returns true. Called once by the framework to tonemap the entire canvas.
Parameters
- tonemap_context
- The current tonemapping context.
- virtual void mi::nservices::ITonemap_operator::process_pixel( ITonemap_context* tonemap_context, const mi::Float32* color_in, mi::Float32* color_out, mi::Uint32 x_coord, mi::Uint32 y_coord) [pure virtual]
-
Processes a given pixel. This method is called if full_control returns false. Called during the iteration phase of tone mapping to tonemap a pixel.
Parameters
- tonemap_context
- The current tonemapping context.
- color_in
- The input color. Represented by an array of size 4.
- color_out
- The final tone mapped color: An array of size 4.
- x_coord
- The x coordinate of the pixel being tone mapped. Provided for adaptive tone map operators.
- y_coord
- The y coordinate of the pixel being tone mapped. Provided for adaptive tone map operators.