Auto ROI & Mask problem for heart CT slice

Hi, guys:

1st attached is a slice from heart CT dicom.

  1. Is there any method to automatically get the ROI as shown in the image below by ImageJ?
  2. Somehow, I get the mask below, but I only want to keep the large central part. Is there any method to automatically extract the central part of the mask by ImageJ?

This is a bit of a hack (it assumes that part of what you want to remove touches the left, top or right borders OR is removed after 10 erosions) but it works on your image.

setAutoThreshold("Default dark");
setOption("BlackBackground", true);
run("Convert to Mask");
run("Minimum...", "radius=3");
run("Maximum...", "radius=3");
run("BinaryKillBorders ", "top right left white");
run("BinaryFilterReconstruct ", "erosions=10 white");

You will need the Morphology Collection (in Fiji) or find it here: