Convert

_AddNewComponent, _AdjustImageForSave, _ChangeColorDepth, _ConvertFloatToPic, _ConvertToMCH, _ConvertToRGB, _Extract, AddNewComponent, AdjustImage, AdjustImageForSave, ChangeColorDepth, ChangeColorDepthND, ChangeColorDepthVSL, ConvertFloatToPic, ConvertTo8bitRGBVSL, ConvertToMCH, ConvertToMCHND, ConvertToRGB, ConvertToRGBND, ConvertToRGBVSL, CopyChannels, Extract, ExtractComponent

AddNewComponent

Interactive command to this function: Image > Convert > Add New Component

Description 

 AddNewComponent(
   char *DocumentName,
   int  Component,
   char *ComponentName,
   int  Color,
   int  ValM
);

This function creates a new channel within an opened document. If the document name is left blank, the channel will be appended to the active image.

Parameters

char *DocumentName

Name of the image (displayed in the image caption).

int Component

Component (channel) index.

char *ComponentName

The name of the channel to be created

int Color

The RGB color as a 32bit integer. Use the RGB function to get the value.

int ValM

Intensity value of all pixels of the new channel.

AdjustImage

Description 

 AdjustImage(
   int  Width,
   int  Height,
   int  ColorDepth,
   int  Components,
   int  StretchMode,
   int  ImType
);

This function adjusts the current image according to the specified parameters.

Parameters

int Width

Image width in pixels.

int Height

Image height in pixels.

int ColorDepth

Color bit depth. Possible values are 8, 10, 12 and 16.

int Components

Number of components.

int StretchMode

Interpolation mode used for image resizing.

1, STRETCH_QUICK

Quick mode using constant interpolation. Low quality, but fast.

2, STRETCH_SPLINES

Advanced mode using spline interpolation. Best quality, but slower.

3, STRETCH_LINEAR

Intermediate mode using linear interpolation. Average quality and speed.

int ImType

Type of image to be saved.

1

Binary image

2

Color image

3

Color image with binary

8

Vector annotations

14

All layers (ND2 file)

15

All layers with binary (ND2 file)

18

All layers (TIF, TIFF file)

19

All layers with binary (TIF, TIFF file)

30

All layers (OME-TIFF file)

31

All layers with binary (OME-TIFF file)

See Also 
ImageResize

AdjustImageForSave

Description 

 AdjustImageForSave(
   char *Filename,
   int  ImType
);

This function adjusts the current image so that it can be saved to the file format specified by the first parameter.

Parameters

char *Filename

The path and the name of the file.

int ImType

Type of image to be saved.

1

Binary image

2

Color image

3

Color image with binary

8

Vector annotations

14

All layers (ND2 file)

15

All layers with binary (ND2 file)

18

All layers (TIF, TIFF file)

19

All layers with binary (TIF, TIFF file)

30

All layers (OME-TIFF file)

31

All layers with binary (OME-TIFF file)

See Also 
_AdjustImageForSave

ChangeColorDepth

Interactive command to this function: Image > Convert > Change Color Depth

Description 

 ChangeColorDepth(
   int  ColorDepth,
   int  Scale
);

This function changes the color bit depth of the current image.

Parameters

int ColorDepth

Color bit depth. Possible values are 8, 10, 12 and 16.

int Scale

0

No rescaling.

1

Rescale the image.

See Also 
_ChangeColorDepth

ChangeColorDepthND

Description 

 ChangeColorDepthND(
   int  ColorDepth,
   int  Scale
);

This function changes the color bit depth of the current ND document.

Parameters

int ColorDepth

Color bit depth. Possible values are 8, 10, 12 and 16.

int Scale

0

No rescaling.

1

Rescale the image.

ChangeColorDepthVSL

Description 

 ChangeColorDepthVSL(
   int  ColorDepth,
   int  ScaleValues
);

This function changes the color bit depth of the current image. It operates on large VSL images which do not fit into the memory.

Parameters

int ColorDepth

Color bit depth. Possible values are 8, 10, 12 and 16.

int ScaleValues

Image rescale.

0

No rescaling

1

Rescale the image values

See Also 
ChangeColorDepth

ConvertFloatToPic

Interactive command to this function: Image > Convert > Convert Floating Point Image to

Description 

 ConvertFloatToPic(
   int  ScaleValues
);

This function converts the floating point image to a new document.

Parameters

int ScaleValues

Defines which values are used to rescale the image.

1

Intensity

3

Contrast

5

LUTs

See Also 
_ConvertFloatToPic

ConvertTo8bitRGBVSL

Description 

 ConvertTo8bitRGBVSL();

This function converts the current image opened in the progressive mode (large images which exceed available memory) to an 8-bit RGB image.

ConvertToMCH

Interactive command to this function: Image > Convert > Convert to Multichannel

Description 

 ConvertToMCH();

This function converts the image to Multichannel (MCH).

See Also 
ConvertToMCHND, ConvertToRGB

ConvertToMCHND

Description 

 ConvertToMCHND();

This function converts the sequence to Multichannel (MCH).

See Also 
ConvertToMCH, ConvertToRGBND

ConvertToRGB

This function runs the Image > Convert > Convert to RGB command.

Description 

 ConvertToRGB();

This function converts one component image (e.g. gray) into 3-component RGB image.

See Also 

ConvertToRGBND

Description 

 ConvertToRGBND();

This function converts one component image (e.g. gray) into 3-component RGB image.

See Also 
_ConvertToRGB

ConvertToRGBVSL

Description 

 ConvertToRGBVSL();

This function converts the current image to an RGB image. It operates on large VSL images which do not fit into the memory.

See Also 
ConvertToRGB

CopyChannels

Description 

 CopyChannels(
   char  DstDoc,
   char  SrcDoc,
   char  Channels
);

This function copies the selected channels from one opened document to another.

Parameters

char DstDoc

This is the name of the destination document. If left blank, a new document is created.

char SrcDoc

This is the name of the source document. If left blank, channels of the current document are copied.

char Channels

Names or indexes of the channels to be copied ("|" separated)

Extract

Interactive command to this function: Image > Convert > Extract Component

Description 

 Extract(
   int  Component
);

This function transforms the color image to one of its RGB or HSI components.

Parameters

int Component

RGB or HSI component of the current color image.

0

Red

1

Green

2

Blue

3

Intensity

4

Hue

5

Saturation

Note

In the resulting gray image all RGB components are identical and the image is stored in the same way as a normal color image.

See Also 
_Extract

ExtractComponent

Description 

 ExtractComponent(
   int  Component,
   int  NDDimension,
   char *DocumentName
);

This function takes a channel of the active image and creates a new document out of it.

Parameters

int Component

Component (channel) index.

int NDDimension

Frame selection of the ND document.

0

Current frame

1

Time dimension

2

Multipoint dimension

4

Z dimension

15

All frames (the whole ND document).

16

Selection - the frames/dimensions selected by mouse within the ND control bar will be affected.

Note

Value combination is also possible (e.g.: M+T=3, Z+T=5, M+Z=6).

char *DocumentName

Name of the image to be created.

_AddNewComponent

This function runs the Image > Convert > Add New Component command.

Description 

 _AddNewComponent();

_AdjustImageForSave

Description 

 _AdjustImageForSave(
   char *Filename,
   int  ImType
);

This function adjusts the current image so that it can be saved to the file format specified by the first parameter. User is informed about any necessary changes before these changes are applied.

Parameters

char *Filename

The path and the name of the file.

int ImType

Type of image to be saved.

1

Binary image

2

Color image

3

Color image with binary

8

Vector annotations

14

All layers (ND2 file)

15

All layers with binary (ND2 file)

18

All layers (TIF, TIFF file)

19

All layers with binary (TIF, TIFF file)

30

All layers (OME-TIFF file)

31

All layers with binary (OME-TIFF file)

See Also 
AdjustImageForSave

_ChangeColorDepth

This function runs the Image > Convert > Change Color Depth command.

Description 

 _ChangeColorDepth();

This function changes the color bit depth of the current image. It displays the Change Color Depth dialog window.

_ConvertFloatToPic

This function runs the Image > Convert > Convert Floating Point Image to command.

Description 

 _ConvertFloatToPic();

This function opens the Convert Image Bit Depth dialog window. Use this function to convert the floating point image to a new document.

_ConvertToMCH

This function runs the Image > Convert > Convert to Multichannel command.

Description 

 _ConvertToMCH();

This function converts any image to a multi channel image.

See Also 
_ColorToGray, _ConvertToRGB

_ConvertToRGB

Description 

 _ConvertToRGB();

This function converts the current image to RGB channels. When it is performed on ND document you will be prompt to select whether to process the current image, selected dimension, or the whole ND document.

See Also 
_ColorToGray, _ConvertToMCH

_Extract

This function runs the Image > Convert > Extract Component command.

Description 

 _Extract();

This function opens the Extract Component dialog window.