Function rs2_processing_block_register_simple_option

Function Documentation

int rs2_processing_block_register_simple_option(rs2_processing_block *block, rs2_option option_id, float min, float max, float step, float def, rs2_error **error)

This method adds a custom option to a custom processing block. This is a simple float that can be accessed via rs2_set_option and rs2_get_option This is an infrastructure function aimed at middleware developers, and also used by provided blocks such as save_to_ply, etc..

Parameters:
  • block[in] Processing block

  • option_id[in] an int ID for referencing the option

  • min[in] the minimum value which will be accepted for this option

  • max[in] the maximum value which will be accepted for this option

  • step[in] the granularity of options which accept discrete values, or zero if the option accepts continuous values

  • def[in] the default value of the option. This will be the initial value.

  • error[out] if non-null, receives any error that occurs during this call, otherwise, errors are ignored

Returns:

true if adding the option succeeds. false if it fails e.g. an option with this id is already registered