Issue while trying to use imopen

조회 수: 2 (최근 30일)
Deepa Maheshvare
Deepa Maheshvare 2020년 10월 30일
편집: Deepa Maheshvare 2020년 10월 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?
Please note: loadtiff used for loading multipage tiff can be found here

답변 (0개)

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by