LUTs

_LUTs_CreateCustom, _LUTs_SetBrightfieldOpacity, _LUTsLoadSettings, _LUTsSaveSettings, ConvertSpectralGroupsToChannels, CreateLUTs, EnableLUTs, Inmap, LUTs_AutoScale, LUTs_AutoScaleOneComp, LUTs_Copy, LUTs_GetGradient, LUTs_GetLowHighGamma, LUTs_GetLowHighGammaEx, LUTs_GetOverSaturationColor, LUTs_GetPercentil, LUTs_GetSpectCustomColor, LUTs_GetSpectGainOffsetGamma, LUTs_GetSpectGroupColor, LUTs_GetUnderSaturationColor, LUTs_KeepAutoScale, LUTs_Paste, LUTs_Reset, LUTs_ResetOneComp, LUTs_SetGradient, LUTs_SetLowHighGamma, LUTs_SetLowHighGammaEx, LUTs_SetOverSaturationColor, LUTs_SetPercentil, LUTs_SetSaveOversaturationState, LUTs_SetSpectCustomColor, LUTs_SetSpectGainOffsetGamma, LUTs_SetSpectGroupColor, LUTs_SetSpectGroups, LUTs_SetUnderSaturationColor, LUTsLoadSettings, LUTsSaveSettings, ProcessLUTs, ProcessLUTsND, SetSpectralColorMode, ShowLUTsWindow, ToggleKeepAutoScaleLUTs, ToggleLUTs, ToggleLUTsWnd, TogglePixelSaturationIndication

ConvertSpectralGroupsToChannels

Description 

 ConvertSpectralGroupsToChannels();

When a spectral image is displayed in Custom color view and the channels are grouped, this function converts each group into one channel. This results in a multichannel image with the corresponding number of channels.

CreateLUTs

Description 

double CreateLUTs(
   lpbyte  luts,
   int  start,
   int  end,
   double  Gamma
);

This function creates LUTs via the parameters.

Parameters

lpbyte luts

luts array

int start

start offset

int end

end offset

double Gamma

Gamma value.

<1

Image parts with low intensities are enhanced.

1

Default value.

>1

Image parts with high intensities are enhanced.

Return Values

double

Note

Array passed to this function must be at least 256 bytes long. Beginning of the LUTs created by this function is the x-offset and end is the y-offset, the gamma parameter determines if the shape will be convex or concave.

See Also 
Inmap

EnableLUTs

Description 

 EnableLUTs(
   int  Enable
);

This function enables/disables LUTs-using view of a picture.

Parameters

int Enable

0

Disable.

1

Enable.

See Also 
ToggleLUTs

Inmap

Description 

 Inmap(
   int  c_dest,
   int  c_sour,
   lpbyte  rlut,
   lpbyte  glut,
   lpbyte  blut
);

This function transforms the source image into the result image via the passed LUTs.

Parameters

int c_dest

Picture destination constant.

0, PICTURE_CURRENT

Current picture.

1, PICTURE_RESULT

Result picture.

2, PICTURE_REFERENCE

Reference picture.

3, PICTURE_OVERLAY

Overlay picture.

4, PIC_OFFSET

Additional pictures.

int c_sour

Picture destination constant.

0, PICTURE_CURRENT

Current picture.

1, PICTURE_RESULT

Result picture.

2, PICTURE_REFERENCE

Reference picture.

3, PICTURE_OVERLAY

Overlay picture.

4, PIC_OFFSET

Additional pictures.

lpbyte rlut

Array of red luts. This parameter also gets in some applications the gray luts array.

lpbyte glut

Array of green LUTs.

lpbyte blut

Array of blue LUTs.

Note

This function transforms the source image into the result image via the passed LUTs.

See Also 
CreateLUTs

LUTsLoadSettings

Description 

 LUTsLoadSettings(
   char *LUTsFileName
);

This function loads the current LUTs settings from a specified file.

Parameters

char *LUTsFileName

Defines complete path to the file you want to load / save.

See Also 
LUTsSaveSettings, _LUTsSaveSettings, _LUTsLoadSettings

LUTsSaveSettings

Description 

 LUTsSaveSettings(
   char *LUTsFileName
);

This function saves the current LUTs settings into a file.

Parameters

char *LUTsFileName

Defines complete path to the file you want to load / save.

See Also 
_LUTsSaveSettings, LUTsLoadSettings, _LUTsLoadSettings

LUTs_AutoScale

This function runs the View > Image > LUTs > Auto Scale LUTs command.

Description 

 LUTs_AutoScale();

This function performs the Auto Scale LUTs command on the current picture.

LUTs_AutoScaleOneComp

This function runs the Autoscale LUTs for channel command.

Description 

 LUTs_AutoScaleOneComp(
   int  Channel
);

This function applies the LUTs settings to the current channel.

Parameters

int Channel

Index number of the channel.

LUTs_Copy

Description 

 LUTs_Copy();

This function copies the current LUTs settings to internal memory. The settings can be inserted to another document.

See Also 
LUTs_Paste

LUTs_GetGradient

Description 

 LUTs_GetGradient(
   char *GradientName
);

This function retrieves the name of the gradient currently used to colorize monochromatic images.

Parameters

char *GradientName

The gradient name.

LUTs_GetLowHighGamma

Description 

 LUTs_GetLowHighGamma(
   int  Channel,
   int *pLow,
   int *pHigh,
   double *pGamma
);

This function gets low intensity, high intensity and gamma of the active document's LUT settings.

Parameters

int Channel

Index number of the channel.

int *pLow

Returned low intensity value.

int *pHigh

Returned high intensity value.

double *pGamma

Gamma value.

Note

For spectral images use this function to get TD channel only, otherwise use the LUTs_GetSpectGainOffsetGamma function.

See Also 
LUTs_SetLowHighGamma, LUTs_SetSpectGainOffsetGamma, LUTs_GetSpectGainOffsetGamma

LUTs_GetLowHighGammaEx

Description 

 LUTs_GetLowHighGammaEx(
   int  Channel,
   double *pLowFloat,
   double *pHighFloat,
   double *pGamma
);

This function gets low intensity, high intensity and gamma of the active document's LUT settings.

Parameters

int Channel

Index number of the channel.

double *pLowFloat

Returned low intensity double value.

double *pHighFloat

Returned high intensity double value.

double *pGamma

Gamma value.

Note

For spectral images use this function to get TD channel only, otherwise use the LUTs_GetSpectGainOffsetGamma function.

See Also 
LUTs_SetLowHighGamma, LUTs_SetSpectGainOffsetGamma, LUTs_GetSpectGainOffsetGamma

LUTs_GetOverSaturationColor

Description 

 LUTs_GetOverSaturationColor(
   int *pLutsColorMode,
   int *pColorOver
);

This function retrieves information about the color set to highlight over-saturated pixels within the image.

Parameters

int *pLutsColorMode

Defines whether normal mode or complementary color mode is used.

1

Complementary color mode - automatically calculated color optimized to be in contrast with the image is used.

2

Normal mode - the defined color is used for highlighting.

int *pColorOver

Integer value of the color defined for highlighting (0xRRGGBB).

LUTs_GetPercentil

Description 

 LUTs_GetPercentil(
   double *pPercentilBlack,
   double *pPercentilWhite
);

This function returns percentile settings of the LUTs Auto Scale function.

Parameters

double *pPercentilBlack

Black level setting.

double *pPercentilWhite

White level setting.

LUTs_GetSpectCustomColor

Description 

 LUTs_GetSpectCustomColor(
   int  Group,
   int *pSpectColor
);

This function gets color of the active document's spectral LUT settings for custom color mode.

Parameters

int Group

Group number.

int *pSpectColor

Returned color of the group for custom color spectral images in 0xRRGGBB format.

See Also 
LUTs_SetSpectCustomColor, LUTs_SetSpectGroupColor, LUTs_GetSpectGroupColor, LUTs_SetSpectGainOffsetGamma, LUTs_GetSpectGainOffsetGamma, LUTs_SetSpectGroups, LUTs_SetSpectGroups

LUTs_GetSpectGainOffsetGamma

Description 

 LUTs_GetSpectGainOffsetGamma(
   int  Group,
   double *pGain,
   double *pOffset,
   double *pGamma
);

This function gets gain, offset and gamma of the active document's spectral LUT settings.

Parameters

int Group

Group number.

double *pGain

Returned gain of the group for custom color and grouped spectral images or global gain for true color and gray scale spectral images.

double *pOffset

Returned offset of the group of grouped spectral images or global offset for custom color, true color and gray scale spectral images.

double *pGamma

Gamma value.

Note

To set TD channel use the LUTs_GetLowHighGamma function.

See Also 
LUTs_GetLowHighGamma, LUTs_SetSpectGainOffsetGamma

LUTs_GetSpectGroupColor

Description 

 LUTs_GetSpectGroupColor(
   int  Group,
   int *pSpectColor
);

This function gets color of the active document's spectral LUT settings for grouped color mode.

Parameters

int Group

Group number.

int *pSpectColor

Returned color of the group for custom color spectral images in 0xRRGGBB format.

See Also 
LUTs_SetSpectGroupColor, LUTs_GetSpectCustomColor, LUTs_SetSpectCustomColor, LUTs_SetSpectGainOffsetGamma, LUTs_GetSpectGainOffsetGamma, LUTs_SetSpectGroups

LUTs_GetUnderSaturationColor

Description 

 LUTs_GetUnderSaturationColor(
   int *pLutsColorMode,
   int *pColorUnder
);

This function retrieves information about the color set to highlight under-saturated pixels within the image.

Parameters

int *pLutsColorMode

Defines whether normal mode or complementary color mode is used.

1

Complementary color mode - automatically calculated color optimized to be in contrast with the image is used.

2

Normal mode - the defined color is used for highlighting.

int *pColorUnder

Integer value of the color defined for highlighting (0xRRGGBB).

LUTs_KeepAutoScale

Description 

 LUTs_KeepAutoScale(
   int  KeepAutoScaleLUTs
);

This function turns the Keep Auto Scale LUTs ON/OFF.

Parameters

int KeepAutoScaleLUTs

Keep automatically scaled LUTs?

0

Turn off automatic LUTs scaling.

1

Keep automatically scaled LUTs.

LUTs_Paste

Description 

 LUTs_Paste();

This function applies the LUTs settings copied to internal memory to the current image.

See Also 
LUTs_Copy

LUTs_Reset

This function runs the View > Image > LUTs > Reset LUTs command.

Description 

 LUTs_Reset();

This function removes LUTs settings of the current document.

LUTs_ResetOneComp

This function runs the Reset LUTs for channel command.

Description 

 LUTs_ResetOneComp(
   int  Channel
);

This function removes LUTs settings of the current channel.

Parameters

int Channel

Index number of the channel.

LUTs_SetGradient

Description 

 LUTs_SetGradient(
   char *GradientName
);

This function selects one of the pre-defined gradients to be used to colorize monochromatic images.

Parameters

char *GradientName

The name of the gradient to be used.

LUTs_SetLowHighGamma

Description 

 LUTs_SetLowHighGamma(
   int  Channel,
   int  Low,
   int  High,
   double  Gamma
);

This function sets low intensity, high intensity and gamma of the active document's LUTs settings.

Parameters

int Channel

Index number of the channel.

int Low

The lower intensity limit.

int High

High intensity value (0...255 form 8-bit image).

double Gamma

Gamma value.

<1

Image parts with low intensities are enhanced.

1

Default value.

>1

Image parts with high intensities are enhanced.

Note

For spectral images use this function to set TD channel only, otherwise use the LUTs_SetSpectGainOffsetGamma function.

See Also 
LUTs_GetLowHighGamma, LUTs_SetSpectGainOffsetGamma, LUTs_GetSpectGainOffsetGamma

LUTs_SetLowHighGammaEx

Description 

 LUTs_SetLowHighGammaEx(
   int  Channel,
   double  LowFloat,
   double  HighFloat,
   double  Gamma
);

This function sets low intensity, high intensity and gamma of the active document LUTs settings.

Parameters

int Channel

Index number of the channel.

double LowFloat

Lower intensity limit (float).

double HighFloat

Higher intensity limit (float).

double Gamma

Gamma value.

<1

Image parts with low intensities are enhanced.

1

Default value.

>1

Image parts with high intensities are enhanced.

Note

For spectral images use this function to set TD channel only, otherwise use the LUTs_SetSpectGainOffsetGamma function.

See Also 
LUTs_GetLowHighGamma, LUTs_SetSpectGainOffsetGamma, LUTs_GetSpectGainOffsetGamma

LUTs_SetOverSaturationColor

This function runs the Oversaturated Pixels command.

Description 

 LUTs_SetOverSaturationColor(
   int  LutsColorMode,
   int  ColorOver
);

This function sets color used to highlight over-saturated pixels within the image.

Parameters

int LutsColorMode

Defines whether normal mode or complementary color mode is used.

1

Complementary color mode - automatically calculated color optimized to be in contrast with the image is used.

2

Normal mode - the defined color is used for highlighting.

int ColorOver

Integer value of the color defined for highlighting (0xRRGGBB).

LUTs_SetPercentil

Description 

 LUTs_SetPercentil(
   double  PercentilBlack,
   double  PercentilWhite
);

This function adjusts percentile settings of the LUTs Auto Scale function.

Parameters

double PercentilBlack

Set how many of all pixels of the picture are left outside - set to black - when [Auto Scale] is applied (0-10%).

double PercentilWhite

Set how many of all pixels of the picture are left outside - set to white - when [Auto Scale] is applied (0-10%).

LUTs_SetSaveOversaturationState

Description 

 LUTs_SetSaveOversaturationState(
   int  Save
);

This function shows the status of Pixel Saturation Indication.

Parameters

int Save

Set the status?

0

Status is off

1

Status is on

2

Remember last settings

See Also 
_GeneralOptions

LUTs_SetSpectCustomColor

Description 

 LUTs_SetSpectCustomColor(
   int  Group,
   int  SpectColor
);

This function sets color of the active document's spectral LUTs settings for custom color mode. Set the SpectColor parameter as the color of the group for custom color spectral images in 0xRRGGBB format.

Parameters

int Group

Group number.

int SpectColor

SpectColor parameter.

See Also 
LUTs_GetSpectCustomColor, LUTs_SetSpectGroupColor, LUTs_GetSpectGroupColor, LUTs_SetSpectGainOffsetGamma, LUTs_GetSpectGainOffsetGamma, LUTs_SetSpectGroups

LUTs_SetSpectGainOffsetGamma

Description 

 LUTs_SetSpectGainOffsetGamma(
   int  Group,
   double  Gain,
   double  Offset,
   double  Gamma
);

This function sets gain, offset and gamma of the active document's spectral LUTs settings.

Parameters

int Group

Group number.

double Gain

Gain of the group for custom color and grouped spectral images or global gain for true color and gray scale spectral images.

double Offset

Offset value.

double Gamma

Gamma value.

<1

Image parts with low intensities are enhanced.

1

Default value.

>1

Image parts with high intensities are enhanced.

Note

To set TD channel use the LUTs_SetLowHighGamma function.

See Also 
LUTs_GetLowHighGamma, LUTs_GetSpectGainOffsetGamma, LUTs_SetSpectCustomColor, LUTs_SetSpectGroupColor, SetSpectralColorMode

LUTs_SetSpectGroupColor

Description 

 LUTs_SetSpectGroupColor(
   int  Group,
   int  SpectColor
);

This function sets color of the active document's spectral LUTs settings for grouped color mode. Set the SpectColor parameter as the color of the group for grouped spectral images in 0xAARRGGBB format. If the most significant byte is nonzero this function also disables the current group.

Parameters

int Group

Group number.

int SpectColor

SpectColor parameter.

See Also 
LUTs_GetSpectGroupColor, LUTs_GetSpectCustomColor, LUTs_SetSpectCustomColor, LUTs_SetSpectGainOffsetGamma, LUTs_GetSpectGainOffsetGamma, LUTs_SetSpectGroups

LUTs_SetSpectGroups

Description 

 LUTs_SetSpectGroups(
   int  GroupCount,
   dword *pGroups
);

This function sets the number of groups and their size of the spectral image.

Parameters

int GroupCount

Group count. If the spectral image has a TD channel, it is excluded from this count.

dword *pGroups

Pointer to an array which specifies which group the channel belongs to. Each element is the index of the channel's group (indices start from 0). The size of the array must equal channel count at least. if this parameter is NULL, additional channels are inserted or removed from the end.

See Also 
LUTs_SetSpectGroupColor, LUTs_GetSpectGroupColor, LUTs_GetSpectCustomColor, LUTs_SetSpectCustomColor, LUTs_SetSpectGainOffsetGamma, LUTs_GetSpectGainOffsetGamma

LUTs_SetUnderSaturationColor

This function runs the Undersaturated Pixels command.

Description 

 LUTs_SetUnderSaturationColor(
   int  LutsColorMode,
   int  ColorUnder
);

This function sets color used to highlight under-saturated pixels within the image.

Parameters

int LutsColorMode

Defines whether normal mode or complementary color mode is used.

1

Complementary color mode - automatically calculated color optimized to be in contrast with the image is used.

2

Normal mode - the defined color is used for highlighting.

int ColorUnder

Integer value of the color defined for highlighting (0xRRGGBB).

ProcessLUTs

Description 

 ProcessLUTs();

This function recalculates look-up tables and redisplays the current image according to the new LUTs setting.

Note

This function is typically called from the LUTs window after pressing the Modify Image Through LUTs button.

See Also 
ProcessLUTsND, EnableLUTs

ProcessLUTsND

Description 

 ProcessLUTsND(
   int  NDTLoop,
   int  NDMPLoop,
   int  NDZLoop
);

This function recalculates look-up tables and redisplays the current ND image according to the new LUTs setting.

Note

This function is typically called from the LUTs window after pressing the Modify Image Through LUTs button.

Parameters

int NDTLoop

0

apply to the current loop only

1

apply to the whole Time dimension

int NDMPLoop

Apply to Multi Point dimension.

0

apply to the current loop only

1

apply to the whole Multi Point dimension

int NDZLoop

Apply to Z dimension

0

apply to the current loop only

1

apply to the whole Z Series dimension

See Also 
ProcessLUTs, EnableLUTs

SetSpectralColorMode

This function runs the View > Spectral Image command.

Description 

 SetSpectralColorMode(
   int  ColorMode
);

This function specifies how spectral images will be displayed. The function defines type of color mapping of image channels.

Parameters

int ColorMode

This parameter defines type of color mapping of image channels.

0

True Color

1

Custom Color

2

Gray Scale

ShowLUTsWindow

Description 

 ShowLUTsWindow(
   int  ShowLUTsWnd
);

This function shows/hides the LUTs dialog window.

Parameters

int ShowLUTsWnd

Shows/hides the LUTs window.

0

Shows the LUTs dialog window

1

Hides the LUTs dialog window

See Also 
ToggleLUTsWnd

ToggleKeepAutoScaleLUTs

This function runs the View > Image > LUTs > Keep Auto Scale LUTs command.

Description 

 ToggleKeepAutoScaleLUTs();

This function switches on/off the Keep Autoscale option.

ToggleLUTs

This function runs the View > Image > LUTs > Luts On/Off command.

Description 

 ToggleLUTs();

This function calls the EnableLUTs function and switches its parameter (0 or 1).

See Also 
EnableLUTs, ToggleLUTsWnd

ToggleLUTsWnd

Description 

 ToggleLUTsWnd();

This function shows/hides the LUTs dialog window. It calls the ShowLUTsWindow function and switches its parameter (0 or 1).

See Also 
ShowLUTsWindow, ShowLUTsWindow

TogglePixelSaturationIndication

Description 

 TogglePixelSaturationIndication();

This function switches on/off indication of oversaturated pixels in the image.

_LUTsLoadSettings

Description 

 _LUTsLoadSettings();

This function loads the current LUTs settings from a file. The function displays the Load LUTs Settings window.

See Also 
LUTsSaveSettings, LUTsLoadSettings, _LUTsSaveSettings

_LUTsSaveSettings

Description 

 _LUTsSaveSettings();

This function saves the current LUTs settings to a file. The function displays the Save LUTs Settings window.

See Also 
LUTsSaveSettings, LUTsLoadSettings, _LUTsLoadSettings

_LUTs_CreateCustom

This function runs the View > Image > LUTs > Create Custom LUTs command.

Description 

 _LUTs_CreateCustom();

This function opens the Define Custom LUTs dialog window. Define custom LUTs color gradient for monochromatic images.

_LUTs_SetBrightfieldOpacity

This function runs the Brightfield Opacity command.

Description 

 _LUTs_SetBrightfieldOpacity();

This function opens the Brightfield Opacity dialog window. Define opacity of the bright field image in the window.