ZOSAPI.Analysis.Data.IAR_DataGridRgb Interface Reference
Last update: 17.07.2025Public Member Functions | |
| IAR_Rgb | GetValue (int x, int y) |
| Gets the specified point. | |
| void | 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. | |
Properties | |
| String | Description [get] |
| String | XLabel [get] |
| String | YLabel [get] |
| String | ValueLabel [get] |
| uint | Nx [get] |
| uint | Ny [get] |
| double | Dx [get] |
| double | Dy [get] |
| double | MinX [get] |
| double | MinY [get] |
| IAR_Rgb[,] | Values [get] |
Detailed Description
Member Function Documentation
◆ FillValues()
| void ZOSAPI.Analysis.Data.IAR_DataGridRgb.FillValues | ( | uint | fullSize, |
| [Out] float[] | rData, | ||
| [Out] float[] | gData, | ||
| [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.
◆ 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);
Definition: IAR_Base.cs:286
void 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.
Properties and methods for retrieving analysis window data. This interface can be accessed via the IA...
Definition: IAR_Base.cs:21
IAR_DataGridRgb GetDataGridRgb(int index)
Definition: IAR_Base.cs:11
Definition: IAS_FieldCurvatureAndDistortion.cs:5
The ZOSAPI namespace contains classes for initially connecting to zemax. See also ZOSAPI_Connection,...
Definition: IAS_FieldCurvatureAndDistortion.cs:5
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
Property Documentation
◆ Description
|
get |
◆ Dx
|
get |
◆ Dy
|
get |
◆ MinX
|
get |
◆ MinY
|
get |
◆ Nx
|
get |
◆ Ny
|
get |
◆ ValueLabel
|
get |
◆ Values
|
get |
◆ XLabel
|
get |
◆ YLabel
|
get |