Bsoft program

bmask

Usage: bmask [options] input.img output.img

Generates and uses binary masks of the size given or of the input image.
The selected regions have value 1 and the omitted regions 0. The default is a blank mask created of the same size as the input image.

Actions for mask creation:

-create 20,60,30Create a new mask of this size in place of input image
-threshold -0.55,1.2One or more thresholds to generate a mask.
-variance 5,1Generate mask based on local variance in a kernel of a given size,
and flag to generate a background with value -1.

Actions for mask modification:

-invertInvert mask.
-dilate 2Dilate mask a number of times.
-erode 3Erode mask a number of times.
-open 4Open (erode-dilate) mask a number of times.
-close 2Close (dilate-erode) mask a number of times.
-hole 3,56,23Fill a hole indicated by the voxel.
-plane0.3,0.5,-0.1,0,3,25 Mask on one side of a plane with the given normal and origin.
-rectangle 40,20,45Rectangular mask with given length, width and rotation angle.
-radius 10,45Generate a mask inside these radii.
-asu D3Generate an asymmetric unit mask.
-color sizeGenerate a RGBA image (random/size).
-sizeConvert level mask to region size map.

Actions for multi-level masks:

-collapseConvert a multi-level mask to a binary mask.
-select 1,5-7Select levels in a multi-level mask.
-voxel 23,241,193Select the level including this voxel.
-level 134Convert a mask to multiple levels, with the given voxels per level.
-bands 250,-1,150,1,30,0Banded mask for reciprocal space (pairs of numbers: angstrom,value).
Band with 0: Not used.
Band with 1: Use for orientation determination.
Band with -1: Use for cross-validation.

Actions for mask application:

-applyApply the mask to the input image (default output mask).
-rescaleapply 0.5,2.3Rescale region inside mask and apply the mask to the input image.

Parameters:

-verbose 1Verbosity of output.
-datatype uForce writing of a new data type.
-sampling 1.5,1.5,1.5Sampling (A/pixel; a single value can be given).
-origin 110,50,44Origin for the mask (default from input image).
-fill 28.3Fill value (default average).
-wrapFlag to wrap around image boundaries (default not).

Input:

-Mask file.imgInput mask to apply or get difference with main input image.

Examples:

1. Creating a new mask:
bmask -v 7 -create 100,100,50 -radius 10,20 -origin 50,50,25 mask.mrc
2. Generating a mask from an image:
bmask -v 7 -threshold 1.5 test.map mask.mrc
3. Applying a mask to an image:
bmask -v 7 -Mask mask.mrc test.map new.map
4. Generating and applying a mask to an image:
bmask -v 7 -apply -radius 50,80 -origin 100,100,100 test.map new.map

Bsoft version 2.0.7-20200917 (64 bit)


Generated by bdoc.pl on Mon Oct 26 08:20:11 2020


Back to the Bsoft home