Borrar filtros
Borrar filtros

I have mha file, how to do image segmentation of this data

8 visualizaciones (últimos 30 días)
This is in continuation to a previous que which I already asked regarding readdata3d. dont know how to proceed further.....
Sir here is the data attached of brain mri scan. It's in mha format and is a 3d Image. We have to convert this 3d into a 2d image and use watershed algorithm to detect the tumor in the brain. The mha format is not being supported. Hence I am not able to upload it. If any email id is given I would send it.
I've used the following code:
[V,info]=ReadData3D
for slice = 1 : numberOfSlices
thisSlice = V(:,:, slice);
baseFileName = sprintf('Slice %d.png', slice);
fullFileName = fullfile('F:\final yr project', baseFileName);
imwrite(thisSlice, fullFileName);
end
The final image should be like the one I attached above.
The image should be gray scale analysed. So how to use these mha files to covert the 3d to above mentioned like pic. For further analysis using watershed
Can you please suggest me how this can be done and also can you please help me with the code if possible
  31 comentarios
Image Analyst
Image Analyst el 16 de En. de 2018
How do you want to convert it? Take the mean along the slice direction? Take the maximum intensity projection? Take just one slice? I have no idea.
rohith bharadwaj
rohith bharadwaj el 16 de En. de 2018
how to take just one slice from middle and convert it to grayscale

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 16 de En. de 2018
Your data is not black and white. It is, however, in CT units, with values from 0 to 1509. To make visual sense out of that you need to rescale it. Use this:
V = mat2gray(V);
after you read the data in. That will scale the values in the array so that the maximum value is 1 and the minimum is 0. You can then extract slices and imshow() or image() them.
  13 comentarios
Walter Roberson
Walter Roberson el 17 de Mzo. de 2018
The researchers I worked with generally normalized the brain images, and then after that trained on a bunch of normal brains and a bunch with tumors. They did not use segmentation and preprocessing that I recall. But it has been over 15 years since I did any brain related work, and I was not much involved with the brain analysis theory (I was more responsible for interface and graphics and general program structure for the brain work.)
Image Analyst
Image Analyst el 17 de Mzo. de 2018
Because of your ambiguous posts, we don't know if you want to segment the 3-D volume, or if you want to segment out a 2-D region in just one slice. Why don't you start your own question, rather than keep bugging rohith, and post some of your slice images? click here

Iniciar sesión para comentar.

Más respuestas (1)

Image Analyst
Image Analyst el 15 de En. de 2018
It looks like you got the mha reading part working so now you just need to find the tumor. Assuming it's bright, just threshold and call regionprops. It works in 2-D or 3-D. See attached demo.

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by