analyzePixelIVF.m 844 B

12345678910111213141516171819202122232425262728293031323334
  1. %reset random generator
  2. rng shuffle
  3. %add nrrd processing capability
  4. addpath('nrrd_read_write_rensonnet')
  5. disp('Test');
  6. [cax,cm]=loadTime(path,patientID);
  7. %segmFile=fullfile(path,patientID,sprintf('%s_Segmentation.txt',patientID));
  8. %v0=loadPixels(segm,patientID);
  9. [filepath,name,suffix]=fileparts(segmFile);
  10. if contains(suffix,'nrrd')
  11. v0=extractPixelsFromNrrd(segmFile);
  12. end
  13. if contains(suffix,'txt')
  14. v0=dlmread(segmFile);
  15. n=size(v0,1);
  16. v0=[(1:n)' v0];
  17. end
  18. data=loadSPECTdata(path,patientID,cm);
  19. sigma2=str2num(sigma2);
  20. na=7;
  21. fcenters=extractCenters(data,v0,sigma2,na);
  22. %this will write out fitPar
  23. [globalPar, cPars] = fitCentersPixelIVF(path, patientID, cax, cm, fcenters,sigma2);
  24. %[globalPar, cPars, xa, U]=fitFromClusters(path,cax, cm, data, nclass,realizationId);
  25. disp('DynamicPixelAnalysis done\n');
  26. quit;
  27. %writeData