forked from ISET/isetcam
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
75 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
function ax = ieAxisGet(obj,varargin) | ||
% Return the image axis in a window of one of the major ISETCam types | ||
% | ||
% Syntax | ||
% ax = ieAxisGet(obj,varargin) | ||
% | ||
% Inputs | ||
% obj - Either a string or an ISETCam object with a .type slot | ||
% | ||
% Optional key/value pair | ||
% N/A | ||
% | ||
% Returns | ||
% ax - Handle to the axis in the window | ||
% | ||
% Wandell, January 24 2020 | ||
% | ||
% See also | ||
% | ||
|
||
%% | ||
% varargin = ieParamFormat(varargin); | ||
|
||
p = inputParser; | ||
vFunc = @(x)(ischar(x) || (isstruct(x) && isfield(x,'type'))); | ||
p.addRequired('isetobj',vFunc); | ||
|
||
%% Get the type string if it is a struct | ||
|
||
if isstruct(obj) | ||
tmp = obj; clear obj; | ||
obj = vcEquivalentObjtype(tmp.type); | ||
end | ||
|
||
%% Switch through the cases | ||
|
||
switch lower(vcEquivalentObjtype(obj)) | ||
case 'scene' | ||
ax = get(sceneWindow,'CurrentAxes'); | ||
case 'opticalimage' | ||
ax = get(oiWindow,'CurrentAxes'); | ||
case 'isa' | ||
ax = get(sensorImageWindow,'CurrentAxes'); | ||
case 'vcimage' | ||
ax = get(ipWindow,'CurrentAxes'); | ||
case 'display' | ||
ax = get(displayWindow,'CurrentAxes'); | ||
otherwise | ||
error('Unknown iset object type %s\n',isetobj); | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters