Core Optical, Inc.
Utilities ReplaceNaNValues Method Industrial Strength, Scientific Grade
Searches the data and replaces all instances of NaN with the specified value.

Namespace: PrecisionImage
Assembly: PrecisionImage (in PrecisionImage.dll) Version: (

public static void ReplaceNaNValues(
	SourceData sourceData,
	int channel,
	float value,
	Int32Rect regionOfInterest = null,
	BinaryMask binaryMask = null


Type: PrecisionImage SourceData
A SourceData object to search for instances of NaN.
Type: OnlineSystem Int32
An OnlineInt32 specifying the data channel to search.
Type: OnlineSystem Single
A OnlineSingle that specifies the replacement value for instances of NaN.
regionOfInterest (Optional)
Type: OnlineSystem.Windows Int32Rect
An OnlineInt32Rect indicating the region of interest in the data to search. This parameter is optional and defaults to the entire image.
binaryMask (Optional)
Type: PrecisionImage.BinarizationAndMorphology BinaryMask
A BinaryMask object indicating regions in the image to bypass. This parameter is optional. The default is no binary mask.

OnlineSystem ArgumentNullException Thrown when sourceData is null.
OnlineSystem ArgumentOutOfRangeException Thrown when channel refers to a channel that does not exist in sourceData.
OnlineSystem ArgumentException Thrown when the dimensions of binaryMask do not match those of sourceData.
OnlineSystem ArgumentOutOfRangeException Thrown when regionOfInterest specifies a region not completely contained within the input data.
See Also