Using Workbench Command

Workbench Command is a set of command-line tools that can be used to perform simple and complex operations within Connectome Workbench.

Full Documentation:

Documentation Home
FILL HOLES IN AN ROI VOLUME
   wb_command -volume-fill-holes
      <volume-in> - the input ROI volume
      <volume-out> - output - the output ROI volume

      Finds all face-connected parts that are not included in the ROI, and
      fills all but the largest one with ones.