Crack Analysis in 3D CT results with Fiji

plugin
macro
fiji
segmentation
Tags: #<Tag:0x00007fd542237318> #<Tag:0x00007fd5422371b0> #<Tag:0x00007fd542237020> #<Tag:0x00007fd542236eb8>

#1

I am recently starting a project of analyzing the cracks in 3D CT scans, but has completely no idea of how. My scanning result is a stack of tiff files. If possible, could anyone share me some of your experience with such analysis? Thanks a lot.


Segmentation for concrete CT image
#2

In general, what you are trying to do is known as segmentation: finding objects (in your case, cracks) in your image.

For a basic overview, check out the Segmentation page of the ImageJ wiki. It is worth trying @iarganda’s Trainable Weka Segmentation plugin in particular, since it is quite convenient to use, and often works very well.

Note that most segmentation routines in ImageJ are geared toward 2D, and most operate slicewise. One popular option for 3D segmentation is the 3D ImageJ Suite written by @ThomasBoudier.


#3

Hi,

if you can provide some example images, potentially we can help you better.

Cheers,

Christian


#4

My sample is a cylindrical stone, and this image is a slice of the cross section. I want to quantify the cracks shown in the image in 3D, like the length, volume, etc. The full stack of the images are in this google drive link: https://drive.google.com/folderview?id=0B4t0hQz0OoJedzU0cmJpZEVSSjg&usp=sharing
Thank you all for your help.


#5

Good day,

in the provided JEPG-image I’m able to see a branching crack starting at the border at about 1 ‘o clock and branching not far from the center. The branches’ thickness is near the image resolution which might give rise to problems with their analysis.

I tried to download the stack but it is password protected.

I hope that the stack is not JEPG-compressed because the JEPG-artifacts in the provided image are severe.

Best

Herbie


#6

Thanks Herbie. I have updated the link to google drive.
The files are in .tif. Do you need it to be converted to jpeg?


#7

Great,

that link works and I found that what I previously judged as possible JPEG-artifacts is present in the TIF-image as well. I very much hope that the original data was not JPEG-compressed. Will say, I hope that you didn’t convert the TIF-images from JPEG-compressed ones. JPEG-images are not suited for scientific analyses and to simply change those to whatever other format doesn’t make them better …

In this sense I don’t understand: “Do you need it to be converted to jpeg?”

For example, for image cy_0615_B1_1051 there appears to be a chance to isolate the cracks by more or less simple means. Preprocessing by Median-filtering may help.

Best

Herbie


#8

Hi

as respond to Trl request in older topic(Opening *.rec file) I must say that I have received images of my scanned sample (core drill of cracked concrete beam) just few days ago.
I have followed the advise by Ctrueden of using Trainable Weka Segmentation plugin, however I have run into some troubles:

  • First of all the images are very large which causes memory problems (I use 8gb ram, W7 64bit and increasing ImageJ memory limit doesn’t help),
    -The crack in the images is not that visible as in Trl sample.

To overcome memory problem I have run segmentation on a single image. To stop plugin from crashing I have used only one “Training feature” for segmentation (as was advised here: http://imagej.1557.x6.nabble.com/Image-size-limitations-for-Weka-Segmentation-Training-td5007766.html). But the best I could segment was the sample and the surrounding air, which is a bit strange, because this can be achieved by simple Threshold.

I found that adjusting contrast and sharpening is cumbersome due to intensity differences between center of the sample and outer layers. Overall I feel that more sophisticated steps should be done before running segmentation, so that cracks in concrete would be more visible.

Here are the sample images (since they are large I have uploaded just 160 images out of 1200):
https://drive.google.com/open?id=0ByKE4DxMZ_LpNi1tNVprY0dZRXM


#9

After some time of thinking I have made the following routine:

  1. Maybe this is not very scientific approach and it is not within open source idea, but I used Lightroom 6 to develop all tiff images for better contrast, sharpness, gradient exposure filters. I guess this is also possible with ImageJ, but with my skills this approach was much faster.

  2. I used ROI manager (Edit/Selection/Add to manager or CTR+t) to select 8 regions with Freehand selection tool on crack, each representing most common crack width and intensity section.

  3. After opening single image (not image sequence) I did:

  • Image/Dublicate (Ctrl+Shift+D)

  • selection of ROI from Manager table

    <img src="/uploads/default/original/2X/e/eb3f4c7aef16b46bbb835ac1d7ccea75bf94da7d.jpg" width="561" height="499">
    
  • Edit/Clear outside

    <img src="/uploads/default/original/2X/a/a14854b26712ca134dcd9951d28f9f14272f9e61.jpg" width="552" height="500">
    
  • Image/Adjust/Color Threshold

  • Process/Binary/Make binary (after this Analise particles with Show Mask option can be run to reduce noise)

    <img src="/uploads/default/original/2X/f/f984d493b9ec03b98bd8bf6d1fc28b7f77ea448e.jpg" width="558" height="500">
    
  1. After getting thresholded images from all of ROI I did Image addition (Process/Image Calculator) to form one single image

Now the main problem in my case is that this has to be done at least 600 times, since I would like to make 3D view of the crack.

To make this process faster I did macro. It basically repeats same steps described above. To make it more robust I rename open image to “10” (so it would not interfere with Color Threshold macro automatically generated by pressing “Macro” button in “Threshold Color window”).
Also you can notice that I make dummy rectangle selection. I use this after finding out, that “Deselect” function in macro does’t work, which leaves yellow selection line on image. When applying Threshold in this state, whole image is being selected by red color (even if it is not visible after applying “Clear outside”). Only after click on white space, or by making selection in other place, the “Color Threshold” works where it is needed, on cropped ROI.

I would appreciate any comments and suggestions how to simplify or improve the crack detection for these thin crack and low contrast images as in my case.

Here is the macro:

open("C:\\Users\\your path here\\Image_xx.tif");
rename("10");

/////////////////////////////////                  ROI No.0
run("Duplicate...", "title=10-0");
roiManager("Select", 0);
setBackgroundColor(255, 255, 255);
run("Clear Outside");
makeRectangle(1428, 1458, 84, 130); /// Dummy selection


//setTool("freehand");
// Color Thresholder 2.0.0-rc-49/1.51d
// Autogenerated macro, single images only!
min=newArray(3);
max=newArray(3);
filter=newArray(3);
a=getTitle();
run("HSB Stack");
run("Convert Stack to Images");
selectWindow("Hue");
rename("0");
selectWindow("Saturation");
rename("1");
selectWindow("Brightness");
rename("2");
min[0]=0;
max[0]=255;
filter[0]="pass";
min[1]=0;
max[1]=255;
filter[1]="pass";
min[2]=5;
max[2]=72;
filter[2]="pass";
for (i=0;i<3;i++){
  selectWindow(""+i);
  setThreshold(min[i], max[i]);
  run("Convert to Mask");
  if (filter[i]=="stop")  run("Invert");
}
imageCalculator("AND create", "0","1");
imageCalculator("AND create", "Result of 0","2");
for (i=0;i<3;i++){
  selectWindow(""+i);
  close();
}
selectWindow("Result of 0");
close();
selectWindow("Result of Result of 0");
rename(a);
// Colour Thresholding-------------
//setThreshold(255, 255);
setOption("BlackBackground", false);


run("Make Binary");

/////////////////////////////////    similar for  ROI No.1,2,3,4,5,6 and 7

 
////////////////////////////  Summing all images into one

imageCalculator("Add create", "10-0","10-1");
selectWindow("10-0");
close();
selectWindow("10-1");
close();
imageCalculator("Add create", "10-2","10-3");
selectWindow("10-2");
close();
selectWindow("10-3");
close();
imageCalculator("Add create", "10-4","10-5");
selectWindow("10-4");
close();
selectWindow("10-5");
close();
imageCalculator("Add create", "10-6","10-7");
selectWindow("10-6");
close();
selectWindow("10-7");
close();


imageCalculator("Add create", "Result of 10-0","Result of 10-2");
selectWindow("Result of 10-0");
close();
selectWindow("Result of 10-2");
close();
imageCalculator("Add create", "Result of 10-4","Result of 10-6");
selectWindow("Result of 10-4");
close();
selectWindow("Result of 10-6");
close();
imageCalculator("Add create", "Result of Result of 10-0","Result of Result of 10-4");
selectWindow("Result of Result of 10-0");
close();
selectWindow("Result of Result of 10-4");
close();

#10

Hello,

Currently i am also facing the same problem of crack length estimation in 3D using CT images. I like to know did you get some way out to solve this issue?