标签:double
X=dicomread(‘abdomen_002.dcm‘); X=X-1024; X=double(X); WW=400; WL=40; for i=1:512 for j=1:512 if (X(i,j)>WL+WW/2) Y(i,j)=255; else if(X(i,j)<WL-WW/2) Y(i,j)=0; else if(X(i,j)>=WL-WW/2 & X(i,j)<=WL+WW/2) Y(i,j)=(X(i,j)+WW/2-WL)*255/WW; end end end end end Y=uint8 (Y); imshow(Y);
标签:double
原文地址:http://9062206.blog.51cto.com/9052206/1427078