/* JRG, the Resource Geology Seismic Processing System for Java, and Viewmat for Java are Copyright 1998-2007 by John N. Louie License is hereby granted for anyone to make any use of this software and its associated source and compiled binary codes, including free re-distribution, and incorporation into commercial products, provided this copyright notice is retained within all files, versions, and distribution media substantially incorporating John Louie's original work. The software and methods here are the subject of academic research, not commercial products. I would like to know what use you make of my methods, and have your feedback on their success or failure. Also, by letting me know who you are, I can inform you if bugs or errors are discovered. Please send me an email message with: your name and email address; whether you are a student or faculty member, consultant or employee; the name of your university or company, and department; and a sentence or two describing what use you intend to make of these methods. Send your message to louie@seismo.unr.edu */ /* INSTRUCTIONS (0): to add a new color table, follow the INSTRUCTIONS (1), (2), (3) and (4) that appear in the RgCol and RgCtab classes' code and java files. */ class testcol { public static void main(String args[]) { RgRGB rgb; for (int i=0; i<256; i++) { rgb = RgCtab.rwb[i]; System.out.println("" + i + " " + rgb.R + " " + rgb.G + " " + rgb.B); } } } class RgCtab { static RgRGB rwb[] = new RgRGB[256]; static RgRGB rwbh[] = new RgRGB[256]; static RgRGB vagray[] = new RgRGB[256]; static RgRGB gray[] = new RgRGB[256]; static RgRGB bwr[] = new RgRGB[256]; static RgRGB darktopo[] = new RgRGB[256]; static RgRGB xglobe[] = new RgRGB[256]; static RgRGB gray_cont[] = new RgRGB[256]; static RgRGB globe_cont[] = new RgRGB[256]; static RgRGB sglobe[] = new RgRGB[256]; static RgRGB poy[] = new RgRGB[256]; static RgRGB broy[] = new RgRGB[256]; static RgRGB gyw[] = new RgRGB[256]; static RgRGB globe[] = new RgRGB[256]; static RgRGB lighttopo[] = new RgRGB[256]; static RgRGB litho[] = new RgRGB[256]; static RgRGB socaltopo[] = new RgRGB[256]; static RgRGB socaltopo1[] = new RgRGB[256]; static RgRGB topo[] = new RgRGB[256]; static RgRGB yglobe[] = new RgRGB[256]; static RgRGB rms[] = new RgRGB[256]; static RgRGB invrms[] = new RgRGB[256]; static RgRGB globe_bright[] = new RgRGB[256]; static RgRGB yglobe_bright[] = new RgRGB[256]; static RgRGB gray_col[] = new RgRGB[256]; /* INSTRUCTIONS (2): to get a new 256-element color table after creating color nodes in the class RgCol below, add a new instantiation below, like the ones above, then a new assignment statement within the loop below: */ static { int i; for (i=0; i<256; i++) { rwb[i] = RgCol.getRgRGBbyIndex(RgCol.rwb, i); rwbh[i] = RgCol.getRgRGBbyIndex(RgCol.rwbh, i); vagray[i] = RgCol.getRgRGBbyIndex(RgCol.vagray, i); gray[i] = RgCol.getRgRGBbyIndex(RgCol.gray, i); bwr[i] = RgCol.getRgRGBbyIndex(RgCol.bwr, i); darktopo[i] = RgCol.getRgRGBbyIndex(RgCol.darktopo, i); xglobe[i] = RgCol.getRgRGBbyIndex(RgCol.xglobe, i); gray_cont[i] = RgCol.getRgRGBbyIndex(RgCol.gray_cont, i); gray_col[i] = RgCol.getRgRGBbyIndex(RgCol.gray_col, i); globe_cont[i] = RgCol.getRgRGBbyIndex(RgCol.globe_cont, i); sglobe[i] = RgCol.getRgRGBbyIndex(RgCol.sglobe, i); globe_bright[i] = RgCol.getRgRGBbyIndex(RgCol.globe_bright, i); yglobe_bright[i] = RgCol.getRgRGBbyIndex(RgCol.yglobe_bright, i); poy[i] = RgCol.getRgRGBbyIndex(RgCol.poy, i); broy[i] = RgCol.getRgRGBbyIndex(RgCol.broy, i); gyw[i] = RgCol.getRgRGBbyIndex(RgCol.gyw, i); globe[i] = RgCol.getRgRGBbyIndex(RgCol.globe, i); lighttopo[i] = RgCol.getRgRGBbyIndex(RgCol.lighttopo, i); litho[i] = RgCol.getRgRGBbyIndex(RgCol.litho, i); socaltopo[i] = RgCol.getRgRGBbyIndex(RgCol.socaltopo, i); socaltopo1[i] = RgCol.getRgRGBbyIndex(RgCol.socaltopo1, i); topo[i] = RgCol.getRgRGBbyIndex(RgCol.topo, i); yglobe[i] = RgCol.getRgRGBbyIndex(RgCol.yglobe, i); rms[i] = RgCol.getRgRGBbyIndex(RgCol.rms, i); invrms[i] = RgCol.getRgRGBbyIndex(RgCol.invrms, i); /* INSTRUCTIONS (3): also add an assigment statement for your new color table below, like the assignment statements above in this loop. */ } } static RgCtabList RgCtabs[] = { new RgCtabList("Seismic Red-White-Blue", rwb), new RgCtabList("Seismic Variable Density", vagray), new RgCtabList("Seismic Topographic", xglobe), new RgCtabList("Gray Scale, + is White", gray), new RgCtabList("Contoured Gray", gray_cont), new RgCtabList("Gray Neg., Color Pos.", gray_col), new RgCtabList("Seismic Gray RMS", rms), new RgCtabList("Seismic Gray InvRMS", invrms), new RgCtabList("Highlighted Red-White-Blue", rwbh), new RgCtabList("Seismic Blue-White-Red", bwr), new RgCtabList("Purple-Orange-Yellow", poy), new RgCtabList("Blue-Red-Orange-Yellow", broy), new RgCtabList("Green-Yellow-White", gyw), new RgCtabList("Topographic", topo), new RgCtabList("Contoured Topographic", globe_cont), new RgCtabList("Globe Topographic", globe), new RgCtabList("Topographic, no Clip", yglobe), new RgCtabList("Bright-Scaled Topo, no Clip", yglobe_bright), new RgCtabList("Smooth Topographic", sglobe), new RgCtabList("Bright-Scaled Topographic", globe_bright), new RgCtabList("Dark Topographic", darktopo), new RgCtabList("Light Topographic", lighttopo), new RgCtabList("Land Lt. Topographic", socaltopo), new RgCtabList("Sea and Lt. Topographic", socaltopo1), new RgCtabList("Lithologic Age", litho), /* INSTRUCTIONS (4): to see your color table in ViewmatProps windows, add it to this static object, below. */ }; }