;+ ; NAME: ; RemoteView_Colors ; PURPOSE: ; Defines colors to be used for coloring heliospheric bodies ; CATEGORY: ; RemoteView package: volume rendering ; CALLING SEQUENCE: PRO RemoteView_Colors, colortable, $ White, Black, Purple, Red, Green, $ Greyish, Yellowish, Blueish, Reddish, Greenish ; INPUTS: ; (none) ; OUTPUTS: ; colortable ; array[N,3]; type: byte; currently N=236 ; RGB color table used for coloring heliospheric objects ; (planets, etc.). ; The color table is patched together from a number of IDL ; color tables. The file skycolor.pro describes the color table ; Black : 0 1 ; White : 2 3 ; Purple : 4 5 ; Red : 6 7 ; Green : 8 9 ; Blue : 10 11 ; Earth : 12 15 ; Greyish : 16 59 ; Blueish : 60 103 ; Yellowish: 104 147 ; Reddish : 148 191 ; Greenish : 192 235 ; Each of these entries is returned as a two-element argument. ; ; White, Black, Purple, Red, Green ;. Greyish, Yellowish, Blueish, Reddish, Greenish ; array[2]; type: integer ; indices into the color arrays 'reds','green','blues' for ; beginning and start color ; INCLUDE: @compile_opt.pro ; On error, return to caller @skycolors.pro ; Dummy comment for Linux ; CALLS: ; flt_read, who_am_i ; INCLUDE: ; @skycolors.pro ; SIDE EFFECTS: ; Needs files remoteview_colors_info.txt and remoteview_colors.txt, ; storing the color table information. ; RESTRICTIONS: ; PROCEDURE: ; Currently the number of elements is restricte to 236 colors to make things work ; on Windows NT. ; MODIFICATION HISTORY: ; JUN-2000, Paul Hick (UCSD/CASS) ; Split off from old skycolors.pro (now obsolete) ; AUG-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ; The two ascii files with color table info is now ; looked for in the same directory as the source code. ;- ; Read color tables from file root = who_am_i(/directory) IF NOT flt_read(filepath(root=root,'remoteview_colors_info.txt'),S, $ crumbs=Crumbs,silent=2,error=error) THEN $ message, 'No color information available: '+error Black = fix( S[*, where(Crumbs EQ cBlack )] ) White = fix( S[*, where(Crumbs EQ cWhite )] ) Purple = fix( S[*, where(Crumbs EQ cPurple)] ) Red = fix( S[*, where(Crumbs EQ cRed )] ) Green = fix( S[*, where(Crumbs EQ cGreen )] ) Greyish = fix( S[*, where(Crumbs EQ cTables[iGreyish ])] ) Yellowish = fix( S[*, where(Crumbs EQ cTables[iYellowish])] ) Blueish = fix( S[*, where(Crumbs EQ cTables[iBlueish ])] ) Reddish = fix( S[*, where(Crumbs EQ cTables[iReddish ])] ) Greenish = fix( S[*, where(Crumbs EQ cTables[iGreenish ])] ) iColr = fix( S[*, where(Crumbs EQ cColors)] ) IF NOT flt_read(filepath(root=root,'remoteview_colors.txt'),S, $ silent=2,error=errror) THEN $ message, 'No color information available: '+error S = transpose( byte(S) ) ; Color table available for coloring heliospheric bodies colortable = S[iColr[0]:iColr[1],*] RETURN & END