Separation of particles in CT Scan



Feeling stuck on this one…

I am processing stacks of CT data of porous particles. I have tons of data–>100 experiments–so I want/need some level of automation. What I am trying to do is do a good job of segmenting the particles, label the particles, then using 3D ROI manager, manipulate the labeled stack so that it can be multiplied by the original stack. The result is that we ought to get smaller stacks of single particles and then run 3D particle analyzer so that we can analyze things like SA/Vol, pore size, location, etc and how these stats change with respect to time.

I feel like I can probably do way better than what I have done which is:

  1. Run this macro to slice off the capillary tube and turn my huge amount of data into something more manageable (8bit and downsample). It does not do a great job but the next macro seems to take care of that OK.
requires( "1.51p" );
setBatchMode( true );
setBackgroundColor( 0, 0, 0 );
halfheight = getHeight() / 2;
for( i=0; i<nSlices; i++) {
	setSlice( i+1 );
	run( "Duplicate...", "use" );
	setAutoThreshold( "Default" );
	run( "Convert to Mask" );
	run( "Open" );
	run( "Erode" );
	doWand( 250, halfheight );
	run( "Convex Hull" );
	run( "Restore Selection" );
	run( "Clear Outside", "slice" );
	run( "Select None" );
run("Size...", "width=640 height=640 depth=10 constrain average interpolation=Bilinear");
  1. Enhance contrast to get something that can be binarized into something useful, then run this macro:
setOption("BlackBackground", true);
run("Make Binary", "method=Default background=Dark calculate");
run("Size Opening 2D/3D", "min=5000");
run("Morphological Filters (3D)", "operation=Closing element=Ball x-radius=1 y-radius=1 z-radius=11");
run("Morphological Filters (3D)", "operation=Opening element=Ball x-radius=1 y-radius=1 z-radius=11");
run("Size Opening 2D/3D", "min=5000");
run("Fill Holes", "stack");
run("Distance Transform Watershed 3D", "distances=[Borgefors (3,4,5)] output=[16 bits] normalize dynamic=2 connectivity=6");

Here are the starting images:

The sliced and downsampled images:

The images processed to fill out the outlines in order to improve watershedding:

and the final labeled images:

The results from this are over segmented in my opinion. Also, the slicing looks in many places like it takes chucks form one particle and adds it to another. This is actually a relatively OK portion of my stack of >2K slices. In the bad parts I get huge clumps from particles that got agglomerated because the voids spaces appear as holes since the edges of particles touch. In the really bad spots there are strange voids that look like a series of right angles missing from the particles. I expect that I will have to go through with label edition or 3D ROI manager and fix some of these by hand, but as it stands, that seem like an extreme amount of time.

Can I do better than this?

Any suggestions to improve any steps will be appreciated. Any suggestions of a better approach would also be welcome.

Thank you.

Image analysis and denoise

Here is an example of the over segmentation that I get in the bad spots. It looks like a comb or rake was applied to the particles, leaving nonphysical voids.

There are a lot of these. Mending these artifacts is not possible in a reasonable amount of time.



Dear @MollyDog,

Sorry for the late answer. The Dropbox links to the files are not longer available. Could you please re-upload them so we can have a look?


Here are the originals:

converted to 8bit, downsampled:

after the open,close, fill procedure:

and the results after the distance transform watershed along with a good example of what I call a fingering artifact: