itkwasm.cast_imageΒΆ

Module ContentsΒΆ

FunctionsΒΆ

cast_image

Cast an image to another pixel type and / or component type.

APIΒΆ

itkwasm.cast_image.cast_image(input_image: itkwasm.image.Image, pixel_type: Optional[itkwasm.pixel_types.PixelTypes] = None, component_type: Optional[Union[itkwasm.int_types.IntTypes, itkwasm.float_types.FloatTypes]] = None) itkwasm.image.ImageΒΆ

Cast an image to another pixel type and / or component type.

Parameters:
  • input_image (Image) – Image to be cast.

  • pixel_type – Pixel type to cast to.

  • component_type (Optional[Union[IntTypes, FloatTypes]]) – Component type to cast to.

Returns:

Cast image. Event if pixel_type or component_type are not specified, a copy is made.

Return type:

Image