%reset random generator rng shuffle %add nrrd processing capability addpath('nrrd_read_write_rensonnet') [cax,cm]=loadTime(path,patientID); %segmFile=fullfile(path,patientID,sprintf('%s_Segmentation.txt',patientID)); %v0=loadPixels(segm,patientID); [filepath,name,suffix]=fileparts(segmFile); if suffix=='nrrd' v0=extractPixelsFromNrrd(segmFile); end if suffix=='txt' v0=dlmread(segmFile); end data=loadSPECTdata(path,patientID,cm); sigma2=str2num(sigma2); na=7; fcenters=extractCenters(data,v0,sigma2,na); %this will write out fitPar [globalPar, cPars] = fitCentersPixelIVF(path, patientID, cax, cm, fcenters,sigma2); %[globalPar, cPars, xa, U]=fitFromClusters(path,cax, cm, data, nclass,realizationId); disp('DynamicPixelAnalysis done'); %writeData