.. _newlike: newlike ******* There are 2 forms of this command. :code:`newlike(image name, template image, data type, width, height, depth)` ============================================================================ Creates a new, empty image that has properties (dimensions, data type) similar to another image. .. note:: In Python/pi2py2, the image name parameter is not specified, and the return value is the newly created image object that can be passed to other functions instead of an image name. This command can be used in the distributed processing mode. Use :ref:`distribute` command to change processing mode from local to distributed. Arguments --------- image name [input] ~~~~~~~~~~~~~~~~~~ **Data type:** string Name of the new image in the system. template image [input] ~~~~~~~~~~~~~~~~~~~~~~ **Data type:** uint8 image, uint16 image, uint32 image, uint64 image, int8 image, int16 image, int32 image, int64 image, float32 image, complex32 image Name of existing image where dimensions and data type will be copied from. data type [input] ~~~~~~~~~~~~~~~~~ **Data type:** string **Default value:** "" Data type of the image. Can be uint8, uint16, uint32, uint64, int8, int16, int32, int64, float32, or complex32. Leave empty or set to Unknown to copy the value from the template image. width [input] ~~~~~~~~~~~~~ **Data type:** integer **Default value:** 0 Width of the image. Set to zero to copy the value from the template image. height [input] ~~~~~~~~~~~~~~ **Data type:** integer **Default value:** 0 Height of the image. Set to zero to copy the value from the template image. depth [input] ~~~~~~~~~~~~~ **Data type:** integer **Default value:** 0 Depth of the image. Set to zero to copy the value from the template image. See also -------- :ref:`newlikefile`, :ref:`newimage`, :ref:`ensuresize` :code:`newlike(image name, template image, data type, dimensions)` ================================================================== Creates a new, empty image that has properties (dimensions, data type) similar to another image. .. note:: In Python/pi2py2, the image name parameter is not specified, and the return value is the newly created image object that can be passed to other functions instead of an image name. This command can be used in the distributed processing mode. Use :ref:`distribute` command to change processing mode from local to distributed. Arguments --------- image name [input] ~~~~~~~~~~~~~~~~~~ **Data type:** string Name of the new image in the system. template image [input] ~~~~~~~~~~~~~~~~~~~~~~ **Data type:** uint8 image, uint16 image, uint32 image, uint64 image, int8 image, int16 image, int32 image, int64 image, float32 image, complex32 image Name of existing image where dimensions and data type will be copied from. data type [input] ~~~~~~~~~~~~~~~~~ **Data type:** string **Default value:** "" Data type of the image. Can be uint8, uint16, uint32, uint64, int8, int16, int32, int64, float32, or complex32. Leave empty or set to Unknown to copy the value from the template image. dimensions [input] ~~~~~~~~~~~~~~~~~~ **Data type:** 3-component integer vector Dimensions of the image. Set any component to zero to copy the value from the template image. See also -------- :ref:`newlikefile`, :ref:`newimage`, :ref:`ensuresize`