Query in segmenting Nodules in LUNG CT
3 ビュー (過去 30 日間)
古いコメントを表示
Dear Friends, I am facing problem in segmenting a nodule from Lung CT scan. I segmented lung region from full CT slice using region growing method, but facing problem in segmenting a nodule from the lung region. I attached the full slice and segmented images. I need only the nodule part alone in my result image. I marked the nodule portion in the full slice image below. Please help me out friends :)
0 件のコメント
採用された回答
Sean de Wolski
2013 年 9 月 17 日
編集済み: Sean de Wolski
2013 年 9 月 17 日
Keep the biggest object that's not touching the border in your third image.
Inoborder = imclearborder(Your_Third_Image);
Imx = keepMaxObj(Inoborder);
keepMaxObj is this, though you could use regionprops and linear indexing explicitly.
function Imx = keepMaxObj(X)
%Function to keep only the maximum sized (biggest) object in an image
%SCd 11/30/2010
%
%Updates:
% -02/03/2011: Added ability to handle an image directly
%
%Usage:
% Imx = keepMaxObj(CC);
% Imx = keepMaxObj(V);
%
%Input Arguments:
% -CC: Connected components returned from bwconncomp
% -V: Logical image with parts you want true
%
%Output Arguments:
% -Imx: Logical volume with only the biggest object left true.
%
%See Also: bwconncomp
%
%Error checking:
assert(islogical(X)||isstruct(X),'The first input argument is expected to be a struct or a logical');
if isstruct(X)
CC = X;
parts = {'PixelIdxList','ImageSize'};
assert(all(ismember(parts,fieldnames(CC))),'CC is expected to be the output from bwconncomp');
else
CC = bwconncomp(X);
end
clear X;
%Preallocate and find number of voxels/object
Nvox = zeros(CC.NumObjects,1);
for ii = 1:CC.NumObjects
Nvox(ii) = numel(CC.PixelIdxList{ii});
end
%Find the biggest object's index, warn and save all if there are multiples
[mx,midx] = max(Nvox);
more_than1_max = sum(mx==Nvox);
if more_than1_max > 1
midx = find(mx == Nvox);
warning('Multiple:Maxima', 'There were %i objects with the maximum size.\n They are all left on!',more_than1_max);
end
%Create the final image
Imx = false(CC.ImageSize);
Imx([CC.PixelIdxList{midx}]) = true;
end
0 件のコメント
その他の回答 (1 件)
bimal khatiwada
2020 年 8 月 9 日
Hi
can any one help me with the matlab code to determine the spray length and spray cone angle please. for example: this fig:![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/343603/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/343603/image.jpeg)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!