Conversion

Last modified: February 14, 2023

Contents

extract_imaginary

Image [Float] extract_imaginary ()

Operates on:Image [Complex]
Returns:Image [Float]
Category:Conversion
Defined in:image_conversion.py
Author:Michael Droettboom and Karl MacMillan

Returns a Float image containing only the imaginary values in the given complex image.

extract_real

Image [Float] extract_real ()

Operates on:Image [Complex]
Returns:Image [Float]
Category:Conversion
Defined in:image_conversion.py
Author:Michael Droettboom and Karl MacMillan

Returns a Float image containing only the real values in the given complex image.

to_complex

Image [Complex] to_complex ()

Operates on:Image [OneBit|GreyScale|Grey16|RGB|Float]
Returns:Image [Complex]
Category:Conversion
Defined in:image_conversion.py
Author:Michael Droettboom and Karl MacMillan

Converts the given image to a COMPLEX image.

Note, converting an image to one of the same type performs a copy operation.

to_float

Image [Float] to_float ()

Operates on:Image [OneBit|GreyScale|Grey16|RGB|Complex]
Returns:Image [Float]
Category:Conversion
Defined in:image_conversion.py
Author:Michael Droettboom and Karl MacMillan

Converts the given image to a FLOAT image according to the following rules:

Converting an image to one of the same type performs a copy operation.

to_grey16

Image [Grey16] to_grey16 ()

Operates on:Image [OneBit|GreyScale|Float|RGB|Complex]
Returns:Image [Grey16]
Category:Conversion
Defined in:image_conversion.py
Author:Michael Droettboom, Karl MacMillan, and Christoph Dalitz

Converts the given image to a GREY16 image according to the following rules:

Converting an image to one of the same type performs a copy operation.

to_greyscale

Image [GreyScale] to_greyscale ()

Operates on:Image [OneBit|Float|Grey16|RGB|Complex]
Returns:Image [GreyScale]
Category:Conversion
Defined in:image_conversion.py
Author:Michael Droettboom, Karl MacMillan, and Christoph Dalitz

Converts the given image to a GREYSCALE image according to the following rules:

Converting an image to one of the same type performs a copy operation.


Example 1: to_greyscale()

images/RGB_generic.png images/to_greyscale_plugin_00.png

to_onebit

Image [OneBit] to_onebit ()

Operates on:Image [Float|GreyScale|Grey16|RGB|Complex]
Returns:Image [OneBit]
Category:Conversion
Defined in:image_conversion.py
Author:Michael Droettboom and Karl MacMillan

Converts the given image to a ONEBIT image. First the image is converted and then the otsu_threshold algorithm is applied. For other ways to convert to ONEBIT images, see the Binarization category.

Converting an image to one of the same type performs a copy operation.


Example 1: to_onebit()

images/RGB_generic.png images/to_onebit_plugin_00.png

Example 2: to_onebit()

images/GreyScale_generic.png images/to_onebit_plugin_01.png

to_rgb

Image [RGB] to_rgb ()

Operates on:Image [OneBit|GreyScale|Float|Grey16|Complex]
Returns:Image [RGB]
Category:Conversion
Defined in:image_conversion.py
Author:Michael Droettboom, Karl MacMillan, and Christoph Dalitz

Converts the given image to an RGB image according to the following rules:

Note, converting an image to one of the same type performs a copy operation.