loadSegmentation.m 365 B

12345678910111213141516171819202122
  1. fs=string(segm.Alias_ID);
  2. for i=1:size(fs,1);
  3. fs(i)=erase(fs(i)," ");
  4. end
  5. regionIds=segm.Region_Id(fs==patientID);
  6. nr=size(regionIds,1);
  7. vtemp=zeros(nr,3);
  8. %rotate to match convention below
  9. vtemp(:,3)=segm.X(fs==patientID);
  10. vtemp(:,2)=segm.Y(fs==patientID);
  11. vtemp(:,1)=segm.Z(fs==patientID);
  12. v0=vtemp;
  13. for j=1:nr
  14. v0(regionIds(j)+1,:)=vtemp(j,:);
  15. end