Image

Image

new Image(url, optionsopt)

Description:
  • The object describing a FITS image
Source:
Parameters:
Name Type Attributes Description
url string Mandatory unique identifier for the layer. Can be an arbitrary name
options ImageOptions <optional>
The option for the survey

Members

setAlpha

Description:
Source:
Deprecated:
  • Yes
Old method for setting the opacity use Image#setOpacity instead

Methods

getAlpha()

Description:
  • Use Image#getOpacity
Source:
Deprecated:
  • Yes

getCuts() → {Array.<number>}

Description:
  • Returns the low and high cuts under the form of a 2 element array
Source:
Returns:
The low and high cut values.
Type
Array.<number>

readPixel(x, y) → {number}

Description:
  • Read a specific screen pixel value
Source:
To Do:
  • This has not yet been implemented
Parameters:
Name Type Description
x number x axis in screen pixels to probe
y number y axis in screen pixels to probe
Returns:
the value of that pixel
Type
number

setBrightness(brightness)

Description:
  • Sets the brightness. This method updates the brightness.
Source:
Parameters:
Name Type Description
brightness number The brightness value. Between 0 and 1

setColormap(colormapopt, optionsopt)

Description:
  • Set the colormap of an image
Source:
Parameters:
Name Type Attributes Default Description
colormap string <optional>
"grayscale" The colormap label to use. See here for more info about colormaps. Possible values are:
"blues"
"cividis"
"cubehelix"
"eosb"
"grayscale"
"inferno"
"magma"
"native"
"parula"
"plasma"
"rainbow"
"rdbu"
"rdylbu"
"redtemperature"
"sinebow"
"spectral"
"summer"
"viridis"
"ylgnbu"
"ylorbr"
"red"
"green"
"blue"
options Object <optional>
Options for the colormap
Properties
Name Type Attributes Default Description
stretch string <optional>
Stretching function of the colormap. Possible values are 'linear', 'asinh', 'log', 'sqrt', 'pow'. If no given, will not change it.
reversed boolean <optional>
false Reverse the colormap axis.

setContrast(contrast)

Description:
  • Sets the contrast. This method updates the contrast and triggers the update of metadata.
Source:
Parameters:
Name Type Description
contrast number The contrast value. Between 0 and 1

setCuts(minCut, maxCut)

Description:
  • Set the cuts of the image
Source:
Parameters:
Name Type Description
minCut number The low cut value.
maxCut number The high cut value.

setGamma(gamma)

Description:
  • Sets the gamma correction factor. This method updates the gamma.
Source:
Parameters:
Name Type Description
gamma number The saturation value to set for the image. Between 0.1 and 10

setOpacity(opacity)

Description:
  • Sets the opacity factor
Source:
Parameters:
Name Type Description
opacity number Opacity of the survey to set. Between 0 and 1

setOptions(options)

Description:
  • Set color options generic method for changing colormap, opacity, ...
Source:
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
opacity number <optional>
1.0 Opacity of the survey or image (value between 0 and 1).
colormap string <optional>
"native" The colormap configuration for the survey or image.
stretch string <optional>
"linear" The stretch configuration for the survey or image.
reversed boolean <optional>
false If true, the colormap is reversed; otherwise, it is not reversed.
minCut number <optional>
The minimum cut value for the color configuration. If not given, 0.0 for JPEG/PNG surveys, the value of the property file for FITS surveys
maxCut number <optional>
The maximum cut value for the color configuration. If not given, 1.0 for JPEG/PNG surveys, the value of the property file for FITS surveys
additive boolean <optional>
false If true, additive blending is applied; otherwise, it is not applied.
gamma number <optional>
1.0 The gamma correction value for the color configuration.
saturation number <optional>
0.0 The saturation value for the color configuration.
brightness number <optional>
0.0 The brightness value for the color configuration.
contrast number <optional>
0.0 The contrast value for the color configuration.

setSaturation(saturation)

Description:
  • Sets the saturation. This method updates the saturation.
Source:
Parameters:
Name Type Description
saturation number The saturation value. Between 0 and 1

toggle()

Description:
  • Toggle the image turning its opacity to 0 back and forth
Source: