Segmentation of vessels using threshold in Matlab GUI


The data is 3D TOF MRA image for carotid vessel. In TOF method, vessels are much brighter than other tissue, so using a thresholding method is enough to perform segmentation.

For a more convenient way to choose an appropriate threshold value and cropping region, a Matlab GUI is designed to select value with slider and on-picture clicking. Move the slider on the left, then thresholding result is displayed on the right. Click on the right picture twice to determine the left-top and right-bottom value for cropping.

To remove other small obstacles in the 3D picture, connectivity of 3D region is used to label parts in the image. If the part is below a certain minimum voxel, it is removed.

Output image stack and view picture in ImageJ.

blob.png

GUI for value selection

blob.png

blob.png

3D view for segmentation result

blob.png

Resize to fit thickness



Main.m

%Matlab code for segmentation of 3D carotid vessel by thresholding to a 3D
%TOF image
%Author: Li Chen (http://clatfd.cn)
D=load3dtof(); %Or >> load data_ori.mat
%GUI for adjusting threshold in im2bw, 
%and selecting two points(first is left-top corner, second is right-bottom
%corner) to crop, then close windows(variable stored automatically)
sliderimg(D);   
Da=D(crop(2):crop(4),crop(1):crop(3),:);    %crop
Db=im2bw3D(Da,thres);
outtotif(Db,'output_tif');    %output to tif files in folder
%save Db 'output_crop.mat';
Dc=rmsmallobj(Db,500);  %remove small(voxel < 500) and seperated part
outtotif(Dc,'output_tif_r');
%save Dc 'output_cr.mat';

Code:

ThresSeg3d.rar


Github:

https://github.com/clatfd/ThresSeg3d


Last Article Next article

Comment 评论



Share 分享

New Users 最新加入

  • refrain

  • 鑫鑫

  • :)

New comments 最新评论

test123: aasdas Details Apr 13 16:39
admin: Thanks! Details Apr 09 11:46
admin: Google map api Details Apr 09 11:46
lqj12: cooooooooool Details Apr 08 21:34
Yunhan Huang: 这个功能是如何实现的? Details Apr 08 13:23