vreg.full#

vreg.full(shape, fill_value, affine=None, orient='axial', spacing=1.0, pos=[0, 0, 0], **kwargs)[source]#

Return a new volume of given shape and affine, filled with fill_value.

Parameters:
  • shape (int or tuple of ints) – Shape of the new array, e.g., (2, 3) or 2.

  • fill_value (float) – value to fill the array.

  • affine (array, optional) – 4x4 affine array. If this is not provided, the affine array is constructed from the other arguments. Defaults to None.

  • orient (str, optional) – Orientation of the volume. The options are ‘axial’, ‘sagittal’, or ‘coronal’. Alternatively the same options can be provided referring to the orientation of the image planes: ‘xy’ (axial), ‘yz’ (sagittal) or ‘zx’ (coronal). Defaults to ‘axial’.

  • spacing (float, optional) – Pixel spacing in mm. Can be a 3D array or a single scalar for isotropic spacing. Defaults to 1.0.

  • pos (list, optional) – Position of the upper left-hand corner in mm. Defaults to [0,0,0].

  • kwargs – Any keyword arguments accepted by numpy.full.

Returns:

vreg.Volume3D with fill_value values.

Return type:

Volume3D