Issue while trying to use imopen

1 visualización (últimos 30 días)
Deepa Maheshvare
Deepa Maheshvare el 30 de Oct. de 2020
Editada: Deepa Maheshvare el 30 de Oct. de 2020
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

Respuestas (0)

Categorías

Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by