how to display images from a nifti file?

11 visualizaciones (últimos 30 días)
Emerson Nithiyaraj
Emerson Nithiyaraj el 4 de Sept. de 2019
Comentada: Manjunath R V el 29 de Abr. de 2021
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.
untitled.jpg
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.
Untitled1.jpg
how can i do that to bring my image 'i' like a normal CT image?
  1 comentario
Manjunath R V
Manjunath R V el 29 de Abr. de 2021
Hello emerson can i get a code for hounsfield unit and to enhance the contrast of an ct image

Iniciar sesión para comentar.

Respuestas (3)

KALYAN ACHARJYA
KALYAN ACHARJYA el 4 de Sept. de 2019
Editada: KALYAN ACHARJYA el 4 de Sept. de 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
bw_image=imbinarize(slice_test,method);
%...............................^ any specifice method,
% or delete method part, Matlab use for default Method
  2 comentarios
Emerson Nithiyaraj
Emerson Nithiyaraj el 5 de Sept. de 2019
No.if i binarize the slice it just looks likeff.jpg
KALYAN ACHARJYA
KALYAN ACHARJYA el 5 de Sept. de 2019
Yes, the u result images are not binary image, do contrast streching (Gray Level Transformation), do check. I will reply in afternoon session

Iniciar sesión para comentar.


Manjunath R V
Manjunath R V el 26 de Mzo. de 2021
even i want clarification like how to apply hounsifield unit to ct image ? for better details
  2 comentarios
Emerson Nithiyaraj
Emerson Nithiyaraj el 7 de Abr. de 2021
Try this code
a = zeros(size(x));
for i=1:size(a,1)
for j=1:size(a,2)
a(i,j) = max(min((x(i,j)), 400),-100 );
end
end
x(i,j) is the input image.
Manjunath R V
Manjunath R V el 25 de Abr. de 2021
thank you for u r response will check the code that u have shared to me

Iniciar sesión para comentar.


Manjunath R V
Manjunath R V el 25 de Abr. de 2021
Editada: Manjunath R V el 25 de Abr. de 2021
am working on liver segmentation on CT dataset i need a help regarding labeling of a image since am using sementic segmentation
imDir = fullfile(dataSetDir,'Inp_256'); this is my input original dataset or training data
input image attached here for ref
pxDir = fullfile(dataSetDir,'lab256'); this is my labeled data of the training data
labeled image for the input image attached here
this dataset i found in 3DIRCADB where it contains both training data as well as labeled images and masks for that training data
now my query is to train my network i should use oly training data as well as labelled data rite?
is labelled data whatever they have given is it enough to train my network

Categorías

Más información sobre MRI en Help Center y File Exchange.

Productos


Versión

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by