


matRad function to calculate Hounsfield units from a dicom ct
that originally uses intensity values
call
ct = matRad_calcHU(ct)
input
ct: unprocessed dicom ct data which are stored as intensity values (IV)
HU = IV * slope + intercept
output
ct: ct struct with cube with HU
References
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright 2015 the matRad development team.
This file is part of the matRad project. It is subject to the license
terms in the LICENSE file found in the top-level directory of this
distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part
of the matRad project, including this file, may be copied, modified,
propagated, or distributed except according to the terms contained in the
LICENSE file.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

0001 function ct = matRad_calcHU(ct) 0002 % matRad function to calculate Hounsfield units from a dicom ct 0003 % that originally uses intensity values 0004 % 0005 % call 0006 % ct = matRad_calcHU(ct) 0007 % 0008 % input 0009 % ct: unprocessed dicom ct data which are stored as intensity values (IV) 0010 % 0011 % HU = IV * slope + intercept 0012 % 0013 % output 0014 % ct: ct struct with cube with HU 0015 % 0016 % References 0017 % - 0018 % 0019 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0020 % 0021 % Copyright 2015 the matRad development team. 0022 % 0023 % This file is part of the matRad project. It is subject to the license 0024 % terms in the LICENSE file found in the top-level directory of this 0025 % distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part 0026 % of the matRad project, including this file, may be copied, modified, 0027 % propagated, or distributed except according to the terms contained in the 0028 % LICENSE file. 0029 % 0030 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0031 0032 for i = 1:ct.numOfCtScen 0033 ct.cubeHU{i} = double(ct.cubeIV{i}) * double(ct.dicomInfo.RescaleSlope) + double(ct.dicomInfo.RescaleIntercept); 0034 end 0035 0036 ct = rmfield(ct,'cubeIV'); 0037 0038 end