How to remove background from CT scan image after segmentation

Hello ,
I have the following raw image it’s a slice from a 3D CT scan (raw data is 5GB containing 4200 slices) . It’s a cylinder part of 5mm in diameter printed using SLM process (additive manufacturing). I need to remove the background in order to make analysis like detecting the porosity defects in this cylinder part. But as a first step i need to select the region of interest. Since the image is not a circle a manual ROI then clear outside is not sufficient so I am using Weka segmentation. Is there a way to get the ROI from the segmentation? Or is there a better way to remove the background for my type of data .
I’m trying to do the traitement on this slice then generalise it in the 3D scan .

PS : I’m using ImageJ 2.1.0/1.53c;Java 1.8.0_202[64-bit]

Thank you in advanced
Jerika

2021_01_22_Ec1.tif (1.2 MB)

Hi @Jerika ,

welcome to image.sc! Judging from the image you uploaded, I would actually think that Weka would be a bit over the top for your problem. An easy (an computationally not overly expensive) solution would be to do the following in an ImageJ macro:

  1. Load all images as a virtual stack

  2. Pick a nice slice and smooth the image a bit, I would suggest a median filter with a broad kernel size here (run("Median...", "radius=10"); in ImageJ macro), here’s how this looks:

  3. Threshold this slice of your image with one of ImageJ’s threshold methods by setAutoThreshold("MethodOfChoice dark"); Then get the threshold values with getThreshold(lower, upper);

  4. Iterate over all slices, apply the previous Threshold with setThreshold(lower, upper); and create a ROI with run("Create Selection"). Voila:

  5. If you now use Image’s measurement function, you can run some measurements separately for every slice and then average the result(s).

Hope this helps!

@EL_Pollo_Diablo Thank you so much for this approach !

1 Like