The picture shows my 50 cm soil column and I have DICOM images for this soil column that includes 800 slices each of 0.625 mm thickness. As you can see on the top surface, there is an uneven slope, for around 50 slices (i.e. 50*0.625 = 3.125 cm). I want to crop these 50 slices so that I will have only the soil part and not the air part. That way I can calculate the porosity in the soil region. the 2nd image shows one slice which I want to crop keeping only the grey region(which is the soil) and excluding the black part (hollow pore region). I want it to be as accurate as possible. Can you suggest to me how I can achieve this rather than individually cropping hundreds of slice for my samples?