function nic_ica_batchFiles()
% Run the analysis manually
% A sample to show how to call the function of toolbox
%-----------------------------------------------------------
%   Copyright (C) 2009
%   Neuroimage Computing Group, State Key Laboratory of
%   Cognitive Neuroscience and Learning, Beijing normal University
%	Written by Guiwen Chen
%	Version=1.0;
%	Release=20090720;
%-----------------------------------------------------------
%

% construct the structure
appConfig=struct();

% select files
[dataList,dataLabels]=nic_rsdd_inputData();

appConfig.AppFileList=dataList;
appConfig.AppSubjectLabels=dataLabels;

% configure the paramters of PCA
% -------------------------------
dataReduction=struct();

dataReduction.maskType=1;
dataReduction.maskFile='';

dataReduction.pcaStepNum=3;
dataReduction.pcsNum=[20 20 20];% the pcs number of the steps
dataReduction.groupSize=4;

dataReduction.samePCWithICA=1;
dataReduction.scatter=struct('removeScatter',1,'scatterThreshold',0.7);
appConfig.dataReduction=dataReduction;
% -------------------------------end 

appConfig.outDir='E:\data\gica_fea\programe\test';% output dir
appConfig.isAutomaticEstimate=1;% automatic estimate the number of component
appConfig.compNum=20; %The number of component
appConfig.icaAlgorithm='Infomax';% the algorithm name
appConfig.icaAlgorithmNo=1; % the index of ICA algorithm
appConfig.randMode={0,1,1};%{Booststrap, RandInit, Multiple order}; 1:use, 0: unuse
appConfig.runTimes=20; % runTimes
appConfig.outPrefix='gc'; % predix
appConfig.scaleType=1; % how to scale the result: 1:calibation, 2: z-score

extParameters=struct('MultipleRun',1,'DataReductionStep',1,'RunClustering',1,'RunAggregating',1,'RunClibration',1,'RunDeleteFolder',1);% How to do every step

% run analysis
nic_rsdd_runAnalysis(appConfig,extParameters); 

% view the result
view_gui(appConfig);


