001/* 002 * Copyright 2010-2015 Institut Pasteur. 003 * 004 * This file is part of Icy. 005 * 006 * Icy is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU General Public License as published by 008 * the Free Software Foundation, either version 3 of the License, or 009 * (at your option) any later version. 010 * 011 * Icy is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU General Public License for more details. 015 * 016 * You should have received a copy of the GNU General Public License 017 * along with Icy. If not, see <http://www.gnu.org/licenses/>. 018 */ 019package icy.image.colormap; 020 021import java.awt.Color; 022 023/** 024 * @author stephane 025 */ 026public class JETColorMap extends IcyColorMap 027{ 028 public JETColorMap() 029 { 030 super("JET"); 031 032 int index; 033 034 beginUpdate(); 035 try 036 { 037 index = 0; 038 setRGBControlPoint(index, new Color(0f, 0f, 0.5f)); 039 040 index += 32; 041 setRGBControlPoint(index, new Color(0f, 0f, 1f)); 042 043 index += 64; 044 setRGBControlPoint(index, new Color(0f, 1f, 1f)); 045 046 index += 63; 047 setRGBControlPoint(index, new Color(1f, 1f, 0f)); 048 049 index += 64; 050 setRGBControlPoint(index, new Color(1f, 0f, 0f)); 051 052 index += 32; 053 setRGBControlPoint(index, new Color(0.5f, 0f, 0f)); 054 } 055 finally 056 { 057 endUpdate(); 058 } 059 } 060}