Atlas-Cronos  7.4.0
Static Public Member Functions | Static Public Attributes | Properties | List of all members
Flir.Atlas.Image.Palettes.PaletteManager Class Reference

Palettes handles palette selections. More...

Static Public Member Functions

static Palette FromString (string paletteName)
 Get palette from a palette name. More...
 
static Palette Open (Stream stream)
 Open a palette file from disk. Palette files have .pal as file extension. More...
 
static Palette Open (string fileName)
 Open a palette file from disk. Palette files have .pal as file extension. More...
 

Static Public Attributes

static Palette Arctic => Palettes[0]
 Gets the Arctic Palette. More...
 
static Palette Cool => Palettes[1]
 Gets the Cool Palette. More...
 
static Palette Grey => Palettes[2]
 Gets the Grey Palette. More...
 
static Palette Iron => Palettes[3]
 Gets the Iron Palette. More...
 
static Palette Lava => Palettes[4]
 Gets the Lava Palette. More...
 
static Palette Rainbow => Palettes[5]
 Gets the Rain Palette. More...
 
static Palette RainHighContrast => Palettes[6]
 Gets the RainHC Palette. More...
 
static Palette Warm => Palettes[7]
 Gets the Warm Palette. More...
 

Properties

static List< PalettePalettes [get]
 Array of built-in palettes. More...
 
Palette FromImage [get]
 Built-in palette from image. More...
 

Detailed Description

Palettes handles palette selections.

Examples
OpenFileDialog dlg = new OpenFileDialog();
dlg.ShowDialog();
ThermalImageFile image = new ThermalImageFile(@"path to image");
image.Palette = PaletteManager.Arctic;

Member Function Documentation

◆ FromString()

static Palette Flir.Atlas.Image.Palettes.PaletteManager.FromString ( string  paletteName)
inlinestatic

Get palette from a palette name.

Parameters
paletteNameName of the palette to select.
Returns

◆ Open() [1/2]

static Palette Flir.Atlas.Image.Palettes.PaletteManager.Open ( Stream  stream)
inlinestatic

Open a palette file from disk. Palette files have .pal as file extension.

Parameters
streamA stream to a valid palette.
Returns
Palette containing colors from the palette stream.
Exceptions
ArgumentException
FileNotFoundException
InvalidOperationException
Examples
FileStream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
Palette pal = PaletteManager.Open(fileStream);
image.Palette = pal;

◆ Open() [2/2]

static Palette Flir.Atlas.Image.Palettes.PaletteManager.Open ( string  fileName)
inlinestatic

Open a palette file from disk. Palette files have .pal as file extension.

Parameters
fileNameFull path to a valid palette file.
Returns
Palette containing colors from the palette file.
Exceptions
ArgumentException
FileNotFoundException
InvalidOperationException
Examples
OpenFileDialog dlg = new OpenFileDialog();
dlg.ShowDialog();
ThermalImageFile image = new ThermalImageFile(@"path to image");
Palette pal = PaletteManager.Open(dlg.FileName);
image.Palette = pal;

Member Data Documentation

◆ Arctic

Palette Flir.Atlas.Image.Palettes.PaletteManager.Arctic => Palettes[0]
static

Gets the Arctic Palette.

◆ Cool

Palette Flir.Atlas.Image.Palettes.PaletteManager.Cool => Palettes[1]
static

Gets the Cool Palette.

◆ Grey

Palette Flir.Atlas.Image.Palettes.PaletteManager.Grey => Palettes[2]
static

Gets the Grey Palette.

◆ Iron

Palette Flir.Atlas.Image.Palettes.PaletteManager.Iron => Palettes[3]
static

Gets the Iron Palette.

◆ Lava

Palette Flir.Atlas.Image.Palettes.PaletteManager.Lava => Palettes[4]
static

Gets the Lava Palette.

◆ Rainbow

Palette Flir.Atlas.Image.Palettes.PaletteManager.Rainbow => Palettes[5]
static

Gets the Rain Palette.

◆ RainHighContrast

Palette Flir.Atlas.Image.Palettes.PaletteManager.RainHighContrast => Palettes[6]
static

Gets the RainHC Palette.

◆ Warm

Palette Flir.Atlas.Image.Palettes.PaletteManager.Warm => Palettes[7]
static

Gets the Warm Palette.

Property Documentation

◆ FromImage

Palette Flir.Atlas.Image.Palettes.PaletteManager.FromImage
get

Built-in palette from image.

Examples
ThermalImageFile image = new ThermalImageFile("path to image");

image.Palette = _image.PaletteManager.FromImage;

◆ Palettes

List<Palette> Flir.Atlas.Image.Palettes.PaletteManager.Palettes
staticget
Initial value:
= new()
{
new Palette(Cronos.Palettes.Arctic),
new Palette(Cronos.Palettes.Cool),
new Palette(Cronos.Palettes.Grey),
new Palette(Cronos.Palettes.Iron),
new Palette(Cronos.Palettes.Lava),
new Palette(Cronos.Palettes.Rain),
new Palette(Cronos.Palettes.RainHC),
new Palette(Cronos.Palettes.Warm)
}

Array of built-in palettes.