⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 savedcm.m

📁 医学图像处理matlab工具箱
💻 M
字号:
function wresult = savedcm(outputfilename,imaVOL,scaninfo)
% function wresult = savedcm(outputfilename,imaVOL,scaninfo)
%
% Matlab function to save dcm format output file. 
% The function use the Matlab dicomrwrite procedure.
%
% Matlab library function for MIA_gui utility. 
% University of Debrecen, PET Center/LB 2003

wresult = -1;

if scaninfo.Frames > 1
    hm = msgbox('Dynamic file cannot be saved.','MIA Info' );
    wresult = 0;
    return;
end

hm = msgbox('Dicom saving...','MIA Info' );
maxVOL = max(imaVOL(:));
if (round(double(maxVOL)) ~= maxVOL)%if imaVOL float
    imaout = uint16(reshape(imaVOL,[scaninfo.imfm 1 scaninfo.num_of_slice]));
    disp('Warning!');
    disp('The image type is float. SAVEDCM converts it to UINT16 for saving. Take care!');
    disp('');
else
    imaout = reshape(imaVOL,[scaninfo.imfm 1 scaninfo.num_of_slice]);
end
status = dicomwrite(imaout,outputfilename,'ObjectType','MR Image Storage', ...
    'PixelSpacing',scaninfo.pixsize(1:2)','SliceThickness',scaninfo.pixsize(3), ...
    'NumberOfSlices',scaninfo.num_of_slice);
delete(hm);
wresult = 0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -