function [ varargout ] = defparcs(prmname)
%DEFPAR Summary of this function goes here
%   Detailed explanation goes here


%
% Standard parameters
%

% step size
prm.h = [0.5 0.5 1.5];


% adjust for not fully circular shape of 3D cells
prm.just = 0.9;

% filter ridges
prm.filterridges = 1;

% dilation of strong pixels
prm.dilation = 0;

prm.minvol = 20000;
prm.maxvol = 100000;

%
% Smoothing parameters
%


% set to 1 if we want pre filtering
smprm.method = 2;

% 2D or 3D smoothing
smprm.smoothdim = 2;

% number of iterations of smoothing
smprm.numit = 3;

%
% Minima parameters
%

% cell diameter
% I change this 20120320 by adding 0.5 in front!
mprm.volfactor = 0.75;

% pixelsize
mprm.h = prm.h;

% NB may not work if this is too high, flooding goes out
mprm.rangemin = 0.4;

% the threshold for the adaptive filter to find the minima(0.01-0.03)
mprm.adaptfiltth = 0.01;

% how quickly to decrease the minima
mprm.dimminball = 2;

% volume of cells
mprm.minvol = prm.minvol;
mprm.maxvol = prm.maxvol;

% method
mprm.method = 'plane';

% normalized level to make minima
mprm.level = 0.3;

% adjust cell size
mprm.just = prm.just;

%
% Watershed parameters
%



% To test intensity of wat lines
wprm.merging = 0;

% The signicance of watershed lines, stronger if larger, done on ridgeim!!
% if the raw image, then use much smaller, around 1
% set to 1.05-1.10
% wprm.thint = 1.06;
wprm.thintmerging = 1.3;

% The conexity measure for the merging, we should not allow a very much
% smaller convexity after merging
% thconv = 1 if no change in convexity
% thconv > 1 if increase in convexity
% thconv < 1 if decrease in convexity
wprm.thconvmerging = 1.0;

% volume of cells
wprm.minvol = prm.minvol;
wprm.maxvol = prm.maxvol;

%
% Classification parameters
%

% pixel sizes
cprm.h = prm.h;

% to cut cells
cprm.cut = 0;

% classify or not
cprm.classify = 1;

% min and max diameter
% cprm.diamlow = prm.diamlow;
% cprm.diamhigh = prm.diamhigh;

% volume of cells
cprm.minvol = prm.minvol;
cprm.maxvol = prm.maxvol;

% the intensity threshold relative to the mean of the background
% was at 1.15
cprm.intincell = 0.7;

% the intensity threshold on border relative to the mean of the image,
% higher more intensities are required
% was at 1.25
cprm.intborder = 1.30;

% the concavity measure, fully concave at 1, set to 0.4-0.5
cprm.convarea = 0.4;
cprm.convperim = 0.35;

% the fraction of the planes where a region has a pyrmaide like shape with
% fewer pixels as you go upward
cprm.pyramide = 0;

% is there overlap to nucleus image?
cprm.cellmarker = 0;

% name of thresholds
cprm.name = {'minvol','maxvol','intincell','intborder','convarea','convperim','pyramide','cellmarker'};
cprm.logic = {'gt','lt','gt','gt','gt','gt','ge','gt'};

if iscell(prmname)
    n = numel(prmname);
    for i = 1 : n
        varargout{i} = eval(prmname{i});
    end;
else
    varargout{1} = eval(prmname);
end;

