Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
image_expression_null_value_handling [2022/08/22 03:38]
admin [Proper Way of Testing for Image Values -- Guarding Against Null Values]
image_expression_null_value_handling [2022/08/22 04:54] (current)
admin [Null Evaluation]
Line 38: Line 38:
   else i2   else i2
  
-If you need to retrieve the number corresponding to image null value, you can use the ''​null( iX )''​ expression. For instance, ''​null(i1)''​ returns the number corresponding to the null value of image ''​i1''​. So if, so some reason, you need to retrieve the image value or its corresponding numeric null value, you can use ''​i1 ? null(i1)''​ or ''​if isnull(i1) then null(i1) then i1''​. Note that ''​null(i1)''​ is very different from expression ''​null'',​ since ''​null(i1)''​ always returns a valid numeric value and ''​null''​ returns a special construct that, if not contained, invalidates the expression evaluation producing null as a result.+If you need to retrieve the number corresponding to an image null value, you can use the ''​null( iX )''​ expression. For instance, ''​null(i1)''​ returns the number corresponding to the null value of image ''​i1''​. So if, so some reason, you need to retrieve the image value or its corresponding numeric null value, you can use ''​i1 ? null(i1)''​ or ''​if isnull(i1) then null(i1) then i1''​. Note that ''​null(i1)''​ is very different from expression ''​null'',​ since ''​null(i1)''​ always returns a valid numeric value and ''​null''​ returns a special construct that, if not contained, invalidates the expression evaluation producing null as a result.
  
 ===== Proper Way of Testing for Image Values -- Guarding Against Null Values ===== ===== Proper Way of Testing for Image Values -- Guarding Against Null Values =====