ZOSAPI.Analysis.Data.IAR_DataGrid Interface Reference
Last update: 17.07.2025Public Member Functions | |
| double | X (int rowX) |
| double | Y (int colY) |
| double | Z (int rowX, int colY) |
| IAR_XYZ | XYZ (int rowX, int colY) |
| IAR_DataGridRgb | ConvertToRGB (IColorTranslator translator) |
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] |
| double[,] | Values [get] |
| IMatrixData | ValueData [get] |
Member Function Documentation
◆ ConvertToRGB()
| IAR_DataGridRgb ZOSAPI.Analysis.Data.IAR_DataGrid.ConvertToRGB | ( | IColorTranslator | translator | ) |
◆ X()
| double ZOSAPI.Analysis.Data.IAR_DataGrid.X | ( | int | rowX | ) |
◆ XYZ()
| IAR_XYZ ZOSAPI.Analysis.Data.IAR_DataGrid.XYZ | ( | int | rowX, |
| int | colY | ||
| ) |
◆ Y()
| double ZOSAPI.Analysis.Data.IAR_DataGrid.Y | ( | int | colY | ) |
◆ Z()
| double ZOSAPI.Analysis.Data.IAR_DataGrid.Z | ( | int | rowX, |
| int | colY | ||
| ) |
Property Documentation
◆ Description
|
get |
◆ Dx
|
get |
◆ Dy
|
get |
◆ MinX
|
get |
◆ MinY
|
get |
◆ Nx
|
get |
◆ Ny
|
get |
◆ ValueData
|
get |
◆ ValueLabel
|
get |
◆ Values
|
get |
Usage (see Example 24 for a full sample)
C#
// Changes default values for Detector Viewer
// Plots the Incoherent Irradiance in False Color
ZOSAPI.Analysis.IA_ d5 = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.DetectorViewer);
ZOSAPI.Analysis.Settings.RayTracing.IAS_DetectorViewer d5_set = d5.GetSettings() as ZOSAPI.Analysis.Settings.RayTracing.IAS_DetectorViewer;
d5_set.Detector.SetDetectorNumber(5);
ZOSAPI.Analysis.Data.IAR_ d5_results = d5.GetResults();
Properties and methods for retrieving analysis window data. This interface can be accessed via the IA...
Definition: IAR_Base.cs:21
IAR_DataGrid GetDataGrid(int index)
Base interface for all analysis windows. This interface can be accessed via the I_Analyses interface.
Definition: IA_Base.cs:29
IAR_ GetResults()
Gets the result data (if available) for the current analysis.
IMessage ApplyAndWaitForCompletion()
Re-runs the analysis with the current settings and waits for it to finish calculating.
IMessage SetDetectorNumber(int N)
Definition: IAS_DetectorViewer.cs:23
IAS_Detector Detector
Definition: IAS_DetectorViewer.cs:25
Definition: IAS_DetectorViewer.cs:6
Definition: IAS_FieldCurvatureAndDistortion.cs:5
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++
// Changes default values for Detector Viewer
// Plots the Incoherent Irradiance in False Color
IA_Ptr d5 = TheSystem->Analyses->New_Analysis(AnalysisIDM_DetectorViewer);
IAS_DetectorViewerPtr d5_set = d5->GetSettings();
d5_set->Detector->SetDetectorNumber(5);
d5_set->ShowAs = DetectorViewerShowAsTypes_FalseColor;
d5->ApplyAndWaitForCompletion();
IAR_Ptr d5_results = d5->GetResults();
// This is the easiest way to retrieve the data via COM.
// Create the array locally and pass it to the API to fill.
IAR_DataGridPtr gi = d5_results->GetDataGrid(0);
auto gid = gi->ValueData;
long cols = gid->Cols, rows = gid->Rows;
// Create the array. Note that if the array is too small, the application will crash when ReadData is called
double *valuesAF = new double[cols * rows];
gid->ReadData(cols * rows, valuesAF);
long loop_ctr = 0;
filepath = TheApplication->SamplesDir + "\\API\\CPP\\e24_nsc_detectors_falsecolor.txt";
textfile.open(filepath, fstream::trunc | ios::out);
for (long j = 0; j < rows; ++j) {
for (long k = 0; k < cols; ++k) {
textfile << valuesAF[loop_ctr++] << '\t';
}
textfile << endl;
}
textfile.close();
delete[] valuesAF;
Matlab
% changes default values for Detector Viewer
% pltos the Incoherent Irradiance in False Color
d5_set = d5.GetSettings();
d5_set.Detector.SetDetectorNumber(5);
d5.ApplyAndWaitForCompletion()
d5_results = d5.GetResults();
d5_values = d5_results.GetDataGrid(0).Values.double;
Python
# changes default values for Detector Viewer
# pltos the Incoherent Irradiance in False Color
d5 = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.DetectorViewer)
d5_set = d5.GetSettings()
d5_set.Detector.SetDetectorNumber(5)
d5_set.ShowAs = ZOSAPI.Analysis.DetectorViewerShowAsTypes.FalseColor
d5.ApplyAndWaitForCompletion()
d5_results = d5.GetResults()
d5_values = d5_results.GetDataGrid(0).Values
- Examples
- CSharpStandalone_24_nsc_detectors.cs.
◆ XLabel
|
get |
◆ YLabel
|
get |