Skip to main content

ZOS-API interface 2024 R2 SP02

ZOSAPI.Analysis.Settings.IAS_Detector Interface Reference

Last update: 17.07.2025

Public Member Functions

int GetDetectorNumber ()
 
IMessage SetDetectorNumber (int N)
 
IMessage SummarizeAll ()
 

Member Function Documentation

◆ GetDetectorNumber()

int ZOSAPI.Analysis.Settings.IAS_Detector.GetDetectorNumber ( )

◆ SetDetectorNumber()

IMessage ZOSAPI.Analysis.Settings.IAS_Detector.SetDetectorNumber ( int  N)

Usage (see Example 24 for a full sample)

C#

// Creates a new detector viewer analysis reference
ZOSAPI.Analysis.IA_ d4 = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.DetectorViewer);
d4_settings.Detector.SetDetectorNumber(4);
d4_settings.ShowAs = ZOSAPI.Analysis.DetectorViewerShowAsTypes.TrueColor;
Definition: IAR_Base.cs:286
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)
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.
IAS_ GetSettings()
Gets the settings for the current analysis.
IMessage ApplyAndWaitForCompletion()
Re-runs the analysis with the current settings and waits for it to finish calculating.
Definition: IAS_DetectorViewer.cs:23
IAS_Detector Detector
Definition: IAS_DetectorViewer.cs:25
Definition: IAR_Base.cs:11
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++

// Creates a new detector viewer analysis reference
IA_Ptr d4 = TheSystem->Analyses->New_Analysis(AnalysisIDM::AnalysisIDM_DetectorViewer);
IAS_DetectorViewerPtr d4_settings = d4->GetSettings();
d4_settings->Detector->SetDetectorNumber(4);
d4_settings->ShowAs = DetectorViewerShowAsTypes_TrueColor;
d4->ApplyAndWaitForCompletion();
IAR_Ptr d4_results = d4->GetResults();
IAR_DataGridRgbPtr d4_raw = d4_results->GetDataGridRgb(0);

Matlab

% Creates a new detector viewer analysis reference, changes to TrueColor for RGB extraction
d4 = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.DetectorViewer);
d4_settings = d4.GetSettings();
d4_settings.ShowAs = ZOSAPI.Analysis.DetectorViewerShowAsTypes.TrueColor;
d4_settings.Detector.SetDetectorNumber(4);
d4.ApplyAndWaitForCompletion();
d4_Results = d4.GetResults();
d4_raw = d4_Results.DataGridsRgb.Get(0);

Python

# Creates a new detector viewer analysis reference, changes to TrueColor for RGB extraction
d4 = TheSystem.Analyses.New_Analysis(ZOSAPI.Analysis.AnalysisIDM.DetectorViewer)
det_settings = d4.GetSettings()
det_settings.ShowAs = ZOSAPI.Analysis.DetectorViewerShowAsTypes.TrueColor
det_settings.Detector.SetDetectorNumber(4);
d4.ApplyAndWaitForCompletion()
d4_Results = d4.GetResults()
d4_raw = d4_Results.GetDataGridRgb(0)
Examples
CSharpStandalone_24_nsc_detectors.cs.

◆ SummarizeAll()

IMessage ZOSAPI.Analysis.Settings.IAS_Detector.SummarizeAll ( )

Connect with Ansys