.. _scale: scale ***** **Syntax:** :code:`scale(input image, output image, scaling factor, average when downsizing, interpolation mode, boundary condition, block origin)` Scales input image and places the result into the output image. Set size of output image before calling this command or specify scaling factor as an argument. Does not suppress aliasing artifacts when downscaling unless average when downsizing-parameter is set to true. This command can be used in the distributed processing mode. Use :ref:`distribute` command to change processing mode from local to distributed. Arguments --------- input image [input] ~~~~~~~~~~~~~~~~~~~ **Data type:** uint8 image, uint16 image, uint32 image, uint64 image, int8 image, int16 image, int32 image, int64 image, float32 image, complex32 image Input image. output image [output] ~~~~~~~~~~~~~~~~~~~~~ **Data type:** uint8 image, uint16 image, uint32 image, uint64 image, int8 image, int16 image, int32 image, int64 image, float32 image, complex32 image Output image. scaling factor [input] ~~~~~~~~~~~~~~~~~~~~~~ **Data type:** 3-component real vector **Default value:** "[0, 0, 0]" Scaling factor in each coordinate direction. If zero in some dimension, the factor is calculated from current size of the output image and the input image in that dimension. average when downsizing [input] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **Data type:** boolean **Default value:** False Set to true to average when downsizing. interpolation mode [input] ~~~~~~~~~~~~~~~~~~~~~~~~~~ **Data type:** interpolation mode **Default value:** Linear Interpolation mode. Can be Nearest for nearest neighbour interpolation, Linear for linear interpolation, or Cubic for cubic interpolation. boundary condition [input] ~~~~~~~~~~~~~~~~~~~~~~~~~~ **Data type:** boundary condition **Default value:** Nearest Type of boundary condition. Zero indicates that values outside of image bounds are taken to be zero. Nearest indicates that the nearest value inside the image is to be used in place of values outside of image bounds. block origin [input] ~~~~~~~~~~~~~~~~~~~~ **Data type:** 3-component integer vector **Default value:** "[-1, -1, -1]" Specifies origin of current calculation block. This parameter is used internally in distributed processing and should be set to (-1, -1, -1) in normal use. See also -------- :ref:`scale`, :ref:`bin`, :ref:`maskedbin`, :ref:`scalelabels`