Issue while trying to use imopen
1 次查看(过去 30 天)
显示 更早的评论
Hello Everyone,
I have a segmentation volume created after processing an image stack by pixel classification.
However, the presence of tiny sharp endpoints (circled black in the image here) creates an issue while trying to extract the centerline lengths.
So I tried to remove these small, sharp endpoints by performing an erosion followed by dialtion (imopen) before reconstructing of the 3D volume.
input.tiff is the input file
vessels_seg = loadtiff('input.tiff');
num_slices = size(vessels_seg);
vessel_seg_bin = vessels_seg==1;
se_open = strel('sphere',2);
vessel_seg_open = imopen(vessel_seg_bin,se_open);
post_vessels = vessel_seg_open>0;
vessels_processed_name = strcat(shortfile,'_post_processed.tif');
num_slices = size(vessels_seg,3);
imwrite(uint8(vessels_processed(:,:,1)),vessels_processed_name);
for p = 2:num_slices
imwrite(uint8(vessels_processed(:,:,p)),vessels_processed_name, 'WriteMode','append');
end
end
Unfortunately, this returns a stack with all black pixels. Could someone please look into this?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!