;+
; PROJECT
;
;          Solar-B EIS
;
; NAME
;          DEF_CT
;
; PURPOSE
;          Colour handling object
;
; INPUTS
;          None
;
; CATEGORY
;           EIS Timeline Planning
;           Utility
;
; WRITTEN
;           John A Rainnie RAL - a very long time ago indeed!
;
; HISTORY
;
;          v0.1 JAR 24-Mar-2007
;               Added Light Salmon
;
;-
;______________________________________________________________________________
;
;______________________________________________________________________________
FUNCTION def_ct::INIT

;OK, lets do some colour table stuff. First, set ct to greyscale, then get
;r, g and b arrays. Then call "plot_ct" function to make our own ct for
;plotting, etc
LOADCT , 0
TVLCT  , r , g , b , /GET

newr      = r   & newg      = g   & newb      = b
newr[0]   = 0   & newg[0]   = 0   & newb[0]   = 0   ;0   = black
newr[1]   = 255 & newg[1]   = 0   & newb[1]   = 0   ;1   = red
newr[2]   = 0   & newg[2]   = 255 & newb[2]   = 0   ;2   = green
newr[3]   = 0   & newg[3]   = 0   & newb[3]   = 255 ;3   = blue
newr[4]   = 0   & newg[4]   = 255 & newb[4]   = 255 ;4   = cyan
newr[5]   = 255 & newg[5]   = 255 & newb[5]   = 0   ;5   = yellow
newr[6]   = 72  & newg[6]   = 61  & newb[6]   = 139 ;6   = dark slate blue
newr[7]   = 0   & newg[7]   = 0   & newb[7]   = 115 ;7   = navy
newr[8]   = 255 & newg[8]   = 255 & newb[8]   = 204 ;8   = Light yellow
newr[9]   = 135 & newg[9]   = 206 & newb[9]   = 235 ;9   = Sky blue
newr[10]  = 255 & newg[10]  = 165 & newb[10]  = 0   ;10  = Orange
newr[11]  = 255 & newg[11]  = 160 & newb[11]  = 122 ;11  = Light Salmon


newr[254] = 230 & newg[254] = 230 & newb[254] = 230 ;254 = background grey
newr[255] = 255 & newg[255] = 255 & newb[255] = 255 ;255 = white

Self.imageCT = [[r]   ,[g]   ,[b]]
Self.plotsCT = [[newr],[newg],[newb]]


Self.ctNames   = ['Black','Red','Green','Blue','Cyan','Yellow',             $
             'Dark Slate Blue','Navy','Light yellow','Sky blue' ,           $
             'Orange','Light Salmon','Background grey','White']

RETURN , 1

END
;______________________________________________________________________________
; CLEANUP
;______________________________________________________________________________
PRO def_ct::CLEANUP


END
;______________________________________________________________________________
; Set
;______________________________________________________________________________
PRO def_ct::getProperty, plotsCT = plotsCT   ,                              $
                         imageCT = imageCT   ,                              $
                         ctNames = ctNames

plotsCT = Self.plotsCT
imageCT = Self.imageCT
ctNames = Self.ctNames

END
;______________________________________________________________________________
; Get
;______________________________________________________________________________
PRO def_ct::setProperty


END
;______________________________________________________________________________
; Define Data members
;______________________________________________________________________________
PRO def_ct__define

struct = { def_ct                                           ,     $
           plotsCT                   : BYTARR(256,3)                  ,     $
           imageCT                   : BYTARR(256,3)                  ,     $
           ctNames                   : STRARR(14)                           $
         }

END
