Removing components touching phase in 3d volume

Hi all
I have a 3d volume composed of tif files with three phases, namely particle phase, pore phase and a border phase. I would like to delete all particles touching the border phase. One slice looks something like this
and I would like to remove all the particles (2) that touch the outer border (1) within the whole 3d volume.
Any help would be greatly appreciated.
thanks

Antworten (2)

Sean de Wolski
Sean de Wolski am 14 Jul. 2016

0 Stimmen

Use bwdist to get the distance from every pixel to the border (euclidean distance). Zero out any less than or equal to sqrt(2).
D = bwdist(I==phase1);
D(D<=(sqrt(2)+eps)) = 0;
Sohrab Daemi
Sohrab Daemi am 14 Jul. 2016

0 Stimmen

Hi
thanks but this seems to deletes everything within the circle. I just need to delete the particles (marked as 2 in the image) that are touching the outer border (marked as 1).
thanks again

Gefragt:

am 14 Jul. 2016

Beantwortet:

am 14 Jul. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by