! * \brief kernelSetElement() * * \param[in] kel kernel * \param[in] row * \param[in] col * \param[in] val * \return 0 if OK; 1 on error */
| 240 | * \return 0 if OK; 1 on error |
| 241 | */ |
| 242 | l_int32 |
| 243 | kernelSetElement(L_KERNEL *kel, |
| 244 | l_int32 row, |
| 245 | l_int32 col, |
| 246 | l_float32 val) |
| 247 | { |
| 248 | PROCNAME("kernelSetElement"); |
| 249 | |
| 250 | if (!kel) |
| 251 | return ERROR_INT("kel not defined", procName, 1); |
| 252 | if (row < 0 || row >= kel->sy) |
| 253 | return ERROR_INT("kernel row out of bounds", procName, 1); |
| 254 | if (col < 0 || col >= kel->sx) |
| 255 | return ERROR_INT("kernel col out of bounds", procName, 1); |
| 256 | |
| 257 | kel->data[row][col] = val; |
| 258 | return 0; |
| 259 | } |
| 260 | |
| 261 | |
| 262 | /*! |
no outgoing calls
no test coverage detected