function saMat = SSDB_C2Variants(X,options);
%function saMat = SSDB_C2Variants(X,options);
%
%
d.OriginalSize = [128 128];

if(nargin < 2),options = [];,end
options = ResolveMissingOptions(options,d);

[filters,fSiz,c1SpaceSS,c1ScaleSS,c1OL,cas2Target] = InitializeForC2;
for i = 1:size(X,2)
  c2 = [];
  fprintf('Converting Grayscale To C2 %.4d of %.4d\r',i,size(X,2));
  stim = reshape(X(:,i),options.OriginalSize);
  [c1] = C1_stanedit(stim, filters, fSiz, c1SpaceSS, c1ScaleSS, c1OL,options);
  for iC2CentroidSize = 1:4
    [c2temp] = C2(stim,filters,fSiz,c1SpaceSS,c1ScaleSS,c1OL,cas2Target{iC2CentroidSize},c1);
    c2 = [c2;c2temp];
  end
  if (i == 1)
    C2X = zeros(length(c2),size(X,2));
  end
  C2X(:,i) = c2;
end
saMat.C2X = C2X;
fprintf('\n done. \n');




