MATLAB: How to calculation Hounsfield unit feature extraction I want to calculate Hounsfield Unit of a CT image, Please provide me the syntax Best Answer Hounsfield units can be calculated using DICOM metadata:Pixel value in Hounsfield units = m*SV+bwhere:Note that Hounsfield units are the default unit when tag (0028, 1054) is absent.References:<ftp://medical.nema.org/medical/dicom/final/cp519_ft.pdf> https://www.medicalconnections.co.uk/kb/Hounsfield_Units http://www.dicomtags.com/Iods/index/home/page:56 http://stackoverflow.com/questions/10193971/rescale-slope-and-rescale-intercept Related SolutionsMATLAB: Convert pixel value to HU Hi Ahmad, In order to convert the data found in CT data to Housefield Units you have to apply a linear transformation to the data. The equation, which is used for converting into HouseField Units,HU = pixel_value*slope +interceptThe tags are alse called as Rescale Slope and Rescale Intercept.The slope and intercept are found in the DICOM file itself and you can read the DICOM image to MATLAB using “dicomread”. Thanks & Regards,Gouri Chennuru. MATLAB: How can I obtain hounsfield units(HU) from a .dcm image After loading your image:yourImage = dicomread('yourImage.dcm');You can go straight toinfo = dicominfo('yourImage.dcm');Now, you have to find your DICOM attribute that corresponds to the Hounsfield units.This attribute leads you the the linear correlation between the voxel value in the image and the Hounsfield units.The DICOM attribute I´m talking about is (0028, 1053), or the 'Rescale Slope' attibute.H_unit(x,y) = voxel_value(x,y)*RescaleSlope + Intercept.It is exactly like y = a.x + b. You can do like this:rSlope = info.RescaleSlope;for j = 1 : size(yourImage, 1) % This loop multiply each voxel value by the rescale slope for i = 1 : size(yourImage, 2) hounsfieldImage(i,j) = yourImage(i,j)*rSlope; endendfigureimshow(hounsfieldImage, 'DisplayRange', []);Cheers Related QuestionWorking with dicom imagesCT slices appear with different intensityWhat does the minus value of pixel mean in MRIHow to see the actual size of MRI sliceExtract rescale slope value
Best Answer