Home > ISET > vcamera > opticalImage > oiCreate.m

oiCreate

PURPOSE ^

Create an optical image structure.

SYNOPSIS ^

function [oi,val] = oiCreate(oiType,val,optics,addObject)

DESCRIPTION ^

Create an optical image structure.

   [oi,val] = oiCreate(oiType,val,optics,addObject)

 If val is passed in, the optical image is set to be the number val.
 Otherwise, a new number is selected.

 If optics is passed in, this is  attached to the optical image. Otherwise the
 default optics (diffraction limited) are used.

 By default, the new optical image is added to the set of optical image
 objects stored in vcSESSION.  If you do not want it added, set addObject = 0.

 OI types include: default, uniformD65, uniformEE.  The latter two are
 used only for lux-snr testing and related.  Almost always we simply
 create a default optical image with a diffraction-limited lens attached.

 The spectrum is not set in this call because it is normally inherited
 from the scene.  To specify a spectrum for the optical image use
      oi = oiCreate('default');
      oi = initDefaultSpectrum('hyperspectral');
 
 Example:
   oi = oiCreate('default');
   oi = oiCreate('uniformd65');          % Used for lux-sec vs. snr measurements.
   oi = oiCreate('uniformEE',[],[],0);   % Create an object but don't put it in the vcSESSION

 See also:  sceneCreate

 Copyright ImagEval Consultants, LLC, 2003.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sun 14-Jan-2007 10:24:23 by m2html © 2003