Interface ZOSAPI::Analysis::Data::IAR_DataGridRgb
Last update: 13.03.2026
Definition:
Members
Properties
Property Description
Definition:
String ZOSAPI.Analysis.Data.IAR_DataGridRgb.Description
Return type: String
Property XLabel
Definition:
String ZOSAPI.Analysis.Data.IAR_DataGridRgb.XLabel
Return type: String
Property YLabel
Definition:
String ZOSAPI.Analysis.Data.IAR_DataGridRgb.YLabel
Return type: String
Property ValueLabel
Definition:
String ZOSAPI.Analysis.Data.IAR_DataGridRgb.ValueLabel
Return type: String
Property Nx
Definition:
uint ZOSAPI.Analysis.Data.IAR_DataGridRgb.Nx
Return type: uint
Property Ny
Definition:
uint ZOSAPI.Analysis.Data.IAR_DataGridRgb.Ny
Return type: uint
Property Dx
Definition:
double ZOSAPI.Analysis.Data.IAR_DataGridRgb.Dx
Return type: double
Property Dy
Definition:
double ZOSAPI.Analysis.Data.IAR_DataGridRgb.Dy
Return type: double
Property MinX
Definition:
double ZOSAPI.Analysis.Data.IAR_DataGridRgb.MinX
Return type: double
Property MinY
Definition:
double ZOSAPI.Analysis.Data.IAR_DataGridRgb.MinY
Return type: double
Property Values
Definition:
IAR_Rgb [,] ZOSAPI.Analysis.Data.IAR_DataGridRgb.Values
Return type: IAR_Rgb[,]
Public functions
Function GetValue
IAR_Rgb ZOSAPI.Analysis.Data.IAR_DataGridRgb.GetValue(int x, int y)
Gets the specified point.
Usage (see Example 25 for a full sample)
C#
// Loads RGB data into System.Single buffer
ZOSAPI.Analysis.Data.IAR_ det_results = det.GetResults();
ZOSAPI.Analysis.Data.IAR_DataGridRgb det_raw = det_results.GetDataGridRgb(0) as ZOSAPI.Analysis.Data.IAR_DataGridRgb;
det_raw.FillValues((uint)(x_pixel * y_pixel), rData, gData, bData);
C++
// Loads RGB data into arrays
det->GetResults()->GetDataGridRgb(0)->FillValues((x_pixel * y_pixel), rData, gData, bData);
Matlab
% Loads RGB data into System.Single buffer
det_raw = det.GetResults().DataGridsRgb.Get(0);
det_raw.FillValues((x_pixel * y_pixel), rData, gData, bData);
Python
det_raw = det.GetResults().GetDataGridRgb(0)
# FillValues() method still in development for Python; need to use GetValue()
xpix = o5.ObjectData.NumberXPixels
ypix = o5.ObjectData.NumberYPixels
data = np.zeros([ypix, xpix, 3])
for y in range(0, ypix):
for x in range(0, xpix):
rgb = det_raw.GetValue(x, y)
data[y, x, 0] = rgb.R / 255
data[y, x, 1] = rgb.G / 255
data[y, x, 2] = rgb.B / 255
Parameters:
- x: The row (0 to Nx-1).
- y: The col (0 to Ny-1).
Returns:
Parameters:
- int x
- int y
Return type: IAR_Rgb
Function FillValues
void ZOSAPI.Analysis.Data.IAR_DataGridRgb.FillValues(uint fullSize, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)][In][Out]float[] rData, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)][In][Out]float[] gData, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0)][In][Out]float[] bData)
Retries all RGB data at once, into the specified buffers.
Usage (see Example 24 for a full sample)
C#
// Reads values from detector color raw data
// Prints RGB data into single file
d4_raw.FillValues((uint)(x_pixels * y_pixels), rData, gData, bData);
C++
// Reads values from detector color raw data
// Prints RGB data into single file
d4_raw->FillValues((x_pixels * y_pixels), rData, gData, bData);
Matlab
% reads values from detector color raw data
% Loads RGB data into System.Single buffer
d4_raw.FillValues((x_pixels * y_pixels), rData, gData, bData);
% Converts buffer to RGB array; rotates & resizes RGB array
dData = zeros(y_pixels, x_pixels, 3) - 1;
dData(:,:,1) = rot90(reshape(rData.double ./ 255, x_pixels, y_pixels));
dData(:,:,2) = rot90(reshape(gData.double ./ 255, x_pixels, y_pixels));
dData(:,:,3) = rot90(reshape(bData.double ./ 255, x_pixels, y_pixels));
Python
# FillValues() method still in development for Python
# creates 3D array to store normalized RGB data
data = np.zeros([y_pixels, x_pixels, 3])
for y in range(0, y_pixels):
for x in range(0, x_pixels):
rgb = d4_raw.GetValue(x, y)
data[y, x, 0] = rgb.R / 255
data[y, x, 1] = rgb.G / 255
data[y, x, 2] = rgb.B / 255
Parameters:
- fullSize: The full size (Nx * Ny).
- rData: The r data.
- gData: The g data.
- bData: The b data.
Parameters:
- uint fullSize
- [Out] float[] rData
- [Out] float[] gData
- [Out] float[] bData
Return type: void