lung segmentation in MR-Dataset
Mostrar comentarios más antiguos
Hello,
does anybody know a way to segment Lungs from mri-dataset? I foud many ways to segment them in CT, but not in MR.
I tried the otsu and the k-means methods, but the heart is alway segmented with the lungs
Respuestas (2)
Image Analyst
el 6 de Jul. de 2021
0 votos
Lots of people claim to. Go here:
- 20.7.2 Lungs, and Lung Cancer Image Analysis
- 20.7.2.1 Lung Motion Analysis, Respiration, Breathing
- 20.7.2.2 Pneumonia, Lung Analysis, Flu, COVID
- 20.7.2.3 Emphysema, Lung Analysis
- 20.7.2.4 Airway Tree Structure
- 20.7.2.5 Bronchoscopy Systems, Bronchial Analysis
- 20.7.2.6 Thorax, Thoracic Analysis
- 20.7.2.7 Pulmonary Nodules, Lung Nodules
- 20.7.2.8 Tuberculosis Analysis, Tuberculosis Bacilli
- 20.7.2.9 Ribs, Chest X-Rays
4 comentarios
rocketMan
el 6 de Jul. de 2021
Image Analyst
el 7 de Jul. de 2021
If you want to post a slice image, we can look at it. I did something similar in the attached.
rocketMan
el 8 de Jul. de 2021
Image Analyst
el 8 de Jul. de 2021
That's what the filename indicates. I haven't looked at it in a long time. Good luck. I'll be back in 3 or 4 days.
Christine Poon
el 2 de Ag. de 2024
Editada: Christine Poon
el 7 de Ag. de 2024
Hi there, I recently segmented the lungs/the thoracic cavity from thoracic MRI scan images using activecontours to create lung masks. My basic approach is:
% 1. Import your mri image e.g.
X = dicomread(fullfile(folderPath, maskfile.name));
% 2. adjust image & grayscale levels
X = imadjust(X);
GS = im2gray(X);
% 3. Adaptive grayscale thresholding (find a suitable threshold value for your images)
meanGL = mean(GS(:));
BW = GS > 0.75*meanGL; % example
% 4. Apply activecontours
BWMask = activecontour(X,BW,100,"chan-vese",...
"ContractionBias",-0.1,"SmoothFactor",0.05); % adjust contraction bias depending on grayscale level
BWMask = rescale(BWMask);
% 5. Invert the mask (imcomplement), binarize, remove borders then select the lungs based on geometrical properties
Sample mask output (Left) and superimposed on the respective scan image (Right):

Hope this helps and feel free to reach out for the full solution!
2 comentarios
Image Analyst
el 5 de Ag. de 2024
You forgot to attach an image that your algorithm works well on. Can you do so? Can you also please attach the full solution (m-file)?
Christine Poon
el 5 de Ag. de 2024
Editada: Christine Poon
el 7 de Ag. de 2024
Attached! I was just waiting on confirmation from a research group that I can share sample mask images as I wrote this code for the segmentation and analysis of their MRI images. Please also see some declassified sample output mask images from the documentation for my code bundle:

Active contours works well for this image set. There is no need to manually select seed points and only the occasional mask where parts of the thoracic boundary are blurred/blend into the stomach cavity required manual editing. I also developed and applied a vessel filter to the masks after active contour segmentation.
All proof of original work can be provided.
Categorías
Más información sobre Image Segmentation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!