function caCircs = Image2Circles(inputImage, options)
% function caCircs = Image2Circles(inputImage, options)
%
% Combines HStanMultiOrientation continuity detection and
%  CirclesFromOneContinuity into one easy interface
%

d.RadMin = 2;
d.RadMax = 32;
d.RadGrain = sqrt(2);
d.StopForDebugging = 0;
d.SigmaMultiplier = [1,1];
d.DecoupleLeftRight = 1;
d.EliminateTop10PercentOfOrientations = 1;
d.OrigSize = [size(inputImage,1), size(inputImage,2)];

d.ContinuityLevelsToUse = [2,3];
d.MaxIterations = max(d.ContinuityLevelsToUse);
if(nargin < 2), options = [];, end
options = ResolveMissingOptions(options,d);

[cHStanArray] = HStanMultiOrientation(inputImage, options);
for iContLevel = options.ContinuityLevelsToUse
  caCircsTemp{end+1} = CirclesFromOneContinuity(cHStanArray{iContLevel},options);
end
for iContLevel = 1:length(caCircsTemp)
  for iDepth = 1:size(caCircsTemp{iContLevel},3);
    caCircs{iContLevel}(:,:,iDepth) = caCircsTemp{iContLevel}{iDepth};
  end
end