|
@@ -30,12 +30,16 @@ function saveCenters(path, patientID, cax, cm, data, nclass, nRealizations)
|
|
|
for i=1:nclass
|
|
|
code=sprintf('%s_%d_%d_center%d',patientID,nclass,j,i);
|
|
|
ofile=fullfile(path,patientID,sprintf('%s_center.txt',code));
|
|
|
- writematrix(centers(i,:),ofile,'Delimiter',',');
|
|
|
+ try
|
|
|
+ writematrix(centers(i,:),ofile,'Delimiter',',');
|
|
|
+ catch ME
|
|
|
+ dlmwrite(ofile,centers(i,:),',');
|
|
|
+ end
|
|
|
u=reshape(U(i,:),dt(1:3));
|
|
|
headerInfoOut.data=single(u);
|
|
|
headerInfoOut.content=sprintf('%s_centerWeight',code);
|
|
|
- nhdr_nrrd_write(fullfile(path,patientID, sprintf('%s_centerWeigth.nrrd',code)),headerInfoOut,1);
|
|
|
+ nhdr_nrrd_write(fullfile(path,patientID, sprintf('%s_centerWeight.nrrd',code)),headerInfoOut,1);
|
|
|
end
|
|
|
end
|
|
|
|
|
|
-
|
|
|
+
|