MATLAB Answers


how to display images from a nifti file?

Asked by Emerson Nithiyaraj on 4 Sep 2019
Latest activity Commented on by KALYAN ACHARJYA on 5 Sep 2019
I have a liver CT dataset where all images is in .nii file format. Each image file has mulitple slices (say 512*512*500). Using niftiread command i read the image file and now I am visualizing each of the 500 slices one by one using imshow command.
imshow(i = Y(:,:,400)) %400 is my current slice number
Now my image 'i' is class int16 and has values from 0 to 2328. I think these values are Hounsfield units (HU). My image 'i' is like below, where i couldnt see any fine details from the image.
When i referred a paper they said as, 'the Hounsfield unit is applied in window range [100, 400] and then after some pre-processing steps the image is visualized.
how can i do that to bring my image 'i' like a normal CT image?


Sign in to comment.




1 Answer

Answer by KALYAN ACHARJYA on 4 Sep 2019
Edited by KALYAN ACHARJYA on 4 Sep 2019

Read the individuals slices and convert them to binary, is there any issue?
slice_test=Y(:,:,400) % Just as example of slice number 400
%...............................^ any specifice method,
% or delete method part, Matlab use for default Method


No.if i binarize the slice it just looks likeff.jpg
Yes, the u result images are not binary image, do contrast streching (Gray Level Transformation), do check. I will reply in afternoon session

Sign in to comment.