using System;
using System.Collections.Generic;
using System.Text;
namespace 基于伪彩的图像显示
{
public class GreyTable
{
public int[,] table = new int[256, 3];
public GreyTable()
{
for (int i = 0; i < 256; i++)
{
table[i, 0] = table[i, 1] = table[i, 2] = i;
}
}
}
public class TemTable
{
public int[] table = new int[640*480]; //要换成320*240
public TemTable()
{
for (int i = 0; i < 640 * 480; i++)
table[i] = 0;
}
}
public class ConGreyTable
{
public int[,] table = new int[256, 3];
public ConGreyTable()
{
for (int i = 0; i < 256; i++)
{
table[i, 0] = table[i, 1] = table[i, 2] = 255 - i;
}
}
}
public class YellowTable
{
public int[,] table = new int[256, 3];
public YellowTable()
{
for (int i = 0; i < 256; i++)
{
table[i, 0] = table[i, 1] = i;
table[i, 2] = 0;
}
}
}
public class IronTable
{
public int[,] table = new int[256, 4]{
//热金属编码表
{ 0, 0, 0,0 }, { 0, 0, 30,0 }, { 0, 0, 34,0 }, { 0, 0, 38,0 }, //4
{ 0, 0, 43,0 }, { 0, 0, 47,0 }, { 0, 0, 51,0 }, { 0, 0, 55,0 }, //8
{ 0, 0, 60,0 }, { 0, 0, 64,0 }, { 0, 0, 68,0 }, { 0, 0, 72,0 }, //12
{ 0, 0, 77,0 }, { 0, 0, 81,0 }, { 0, 0, 85,0 }, { 0, 0, 89,0 }, //16
{ 0, 0, 94,0 }, { 3, 0, 98,0 }, { 6, 0,102,0 }, { 9, 0,106,0 }, //20
{ 12, 0,111,0 }, { 15, 0,115,0 }, { 18, 0,119,0 }, { 21, 0,123,0 }, //24
{ 24, 0,128,0 }, { 27, 0,132,0 }, { 30, 0,136,0 }, { 33, 0,140,0 }, //28
{ 36, 0,145,0 }, { 39, 0,149,0 }, { 42, 0,153,0 }, { 45, 0,157,0 }, //32
{ 48, 0,162,0 }, { 51, 0,166,0 }, { 54, 0,169,0 }, { 57, 0,173,0 }, //36
{ 60, 0,177,0 }, { 63, 0,180,0 }, { 66, 0,184,0 }, { 69, 0,187,0 }, //40
{ 72, 0,190,0 }, { 75, 0,194,0 }, { 78, 0,197,0 }, { 81, 0,200,0 }, //44
{ 84, 0,204,0 }, { 87, 0,207,0 }, { 90, 0,210,0 }, { 93, 0,214,0 }, //48
{ 96, 0,217,0 }, { 99, 0,220,0 }, { 102, 0,223,0 }, { 105, 0,227,0 }, //52
{ 108, 0,230,0 }, { 111, 0,229,0 }, { 114, 0,228,0 }, { 117, 0,228,0 }, //56
{ 120, 0,227,0 }, { 123, 0,226,0 }, { 126, 0,226,0 }, { 129, 0,225,0 }, //60
{ 132, 0,224,0 }, { 135, 0,223,0 }, { 138, 0,219,0 }, { 141, 0,216,0 }, //64
{ 144, 0,212,0 }, { 147, 0,208,0 }, { 150, 0,205,0 }, { 153, 0,201,0 }, //68
{ 156, 0,197,0 }, { 157, 0,194,0 }, { 159, 0,190,0 }, { 160, 0,186,0 }, //72
{ 162, 0,183,0 }, { 163, 0,179,0 }, { 165, 0,175,0 }, { 166, 0,172,0 }, //76
{ 167, 0,168,0 }, { 168, 0,164,0 }, { 170, 0,161,0 }, { 171, 0,157,0 }, //80
{ 173, 0,153,0 }, { 174, 0,150,0 }, { 176, 0,146,0 }, { 177, 0,142,0 }, //84
{ 178, 0,139,0 }, { 179, 0,135,0 }, { 181, 0,131,0 }, { 182, 0,127,0 }, //88
{ 184, 0,124,0 }, { 185, 0,120,0 }, { 187, 0,116,0 }, { 188, 0,113,0 }, //92
{ 189, 0,109,0 }, { 190, 0,105,0 }, { 192, 0,102,0 }, { 193, 0, 98,0 }, //96
{ 195, 0, 94,0 }, { 196, 0, 91,0 }, { 198, 0, 87,0 }, { 199, 0, 83,0 }, //100
{ 200, 0, 80,0 }, { 201, 0, 77,0 }, { 203, 3, 73,0 }, { 204, 6, 69,0 }, //104
{ 206, 8, 66,0 }, { 207, 11, 62,0 }, { 209, 14, 58,0 }, { 210, 17, 55,0 }, //108
{ 211, 19, 51,0 }, { 212, 22, 47,0 }, { 214, 25, 44,0 }, { 215, 28, 40,0 }, //112
{ 217, 30, 37,0 }, { 218, 33, 34,0 }, { 220, 36, 30,0 }, { 221, 39, 26,0 }, //116
{ 222, 41, 22,0 }, { 223, 44, 18,0 }, { 225, 47, 15,0 }, { 226, 50, 11,0 }, //120
{ 228, 52, 7,0 }, { 229, 55, 4,0 }, { 231, 58, 0,0 }, { 232, 61, 0,0 }, //124
{ 233, 63, 0,0 }, { 234, 66, 0,0 }, { 236, 69, 0,0 }, { 237, 72, 0,0 }, //128
{ 239, 74, 0,0 }, { 240, 77, 0,0 }, { 242, 80, 0,0 }, { 243, 83, 0,0 }, //132
{ 244, 85, 0,0 }, { 245, 88, 0,0 }, { 247, 91, 0,0 }, { 248, 94, 0,0 }, //136
{ 250, 96, 0,0 }, { 252, 99, 0,0 }, { 253,102, 0,0 }, { 254,105, 0,0 }, //140
{ 255,107, 0,0 }, { 255,109, 0,0 }, { 255,111, 0,0 }, { 255,112, 0,0 }, //144
{ 255,114, 0,0 }, { 255,116, 0,0 }, { 255,118, 0,0 }, { 255,119, 0,0 }, //148
{ 255,121, 0,0 }, { 255,123, 0,0 }, { 255,125, 0,0 }, { 255,126, 0,0 }, //152
{ 255,128, 0,0 }, { 255,130, 0,0 }, { 255,132, 0,0 }, { 255,133, 0,0 }, //156
{ 255,135, 0,0 }, { 255,137, 0,0 }, { 255,139, 0,0 }, { 255,140, 0,0 }, //160
{ 255,142, 0,0 }, { 255,144, 0,0 }, { 255,146, 0,0 }, { 255,147, 0,0 }, //164
{ 255,149, 0,0 }, { 255,151, 0,0 }, { 255,153, 0,0 }, { 255,154, 0,0 }, //168
{ 255,156, 0,0 }, { 255,158, 0,0 }, { 255,160, 0,0 }, { 255,161, 0,0 }, //172
{ 255,163, 0,0 }, { 255,165, 0,0 }, { 255,167, 0,0 }, { 255,168, 0,0 }, //176
{ 255,170, 0,0 }, { 255,172, 0,0 }, { 255,174, 0,0 }, { 255,175, 0,0 }, //180
{ 255,177, 0,0 }, { 255,179, 0,0 }, { 255,181, 0,0 }, { 255,182, 0,0 }, //184
{ 255,184, 0,0 }, { 255,186, 0,0 }, { 255,188, 0,0 }, { 255,189, 0,0 }, //188
{ 255,191, 0,0 }, { 255,193, 0,0 }, { 255,195, 0,0 }, { 255,196, 0,0 }, //192
{ 255,198, 0,0 }, { 255,200, 0,0 }, { 255,202, 0,0 }, { 255,203, 0,0 }, //196
{ 255,205, 0,0 }, { 255,207, 0,0 }, { 255,209, 0,0 }, { 255,210, 0,0 }, //200
{ 255,212, 0,0 }, { 255,214, 0,0 }, { 255,216, 0,0 }, { 255,217, 0,0 }, //204
{ 255,219, 0,0 }, { 255,221, 0,0 }, { 255,223, 0,0 }, { 255,224, 0,0 }, //208
{ 255,226, 0,0 }, { 255,228, 0,0 }, { 255,230, 0,0 }, { 255,231, 0,0 }, //212
{ 255,233, 0,0 }, { 255,235, 0,0 }, { 255,237, 0,0 }, { 255,238, 6,0 }, //216
{ 255,240, 13,0 }, { 255,242, 19,0 }, { 255,244, 26,0 }, { 255,245, 32,0 }, //220
{ 255,247, 39,0 }, { 255,249, 45,0 }, { 255,251, 52,0 }, { 255,253, 58,0 }, //224
{ 255,255, 65,0 }, { 255,255, 71,0 }, { 255,255, 78,0 }, { 255,255, 84,0 }, //228
{ 255,255, 90,0 }, { 255,255, 96,0 }, { 255,255,102,0 }, { 255,255,108,0 }, //232
{ 255,255,114,0 }, { 255,255,120,0 }, { 255,255,126,0 }, { 255,255,132,0 }, //236
{ 255,255,138,0 }, { 255,255,144,0 }, { 255,255,150,0 }, { 255,255,156,0 }, //240
{ 255,255,162,0 }, { 255,255,168,0 }, { 255,255,174,0 }, { 255,255,182,0 }, //244
{ 255,255,188,0 }, { 255,255,194,0 }, { 255,255,201,0 }, { 255,255,207,0 }, //248
{ 255,255,213,0 }, { 255,255,219,0 }, { 255,255,225,0 }, { 255,255,231,0 }, //252
{ 255,255,237,0 }, { 255,255,243,0 }, { 255,255,249,0 }, { 255,255,255,0 } //256
};
}
public class RainTable
{
public int[,] table = new int[256, 3];
public RainTable()
{
for (int i = 0; i < 256; i++)
{
if (i == 0)
{
table[i, 0] = 0;
table[i, 1] = 0;
table[i, 2] = 0;
}
else if (i table[i, 2] = 8 * i - 1;
else if (i {
table[i, 1] = 8 * (i - 32);
table[i, 2] = 255;
}
else if (i {
table[i, 1] = 255;
table[i, 2] = 255 - 8 * (i - 64);
}
else if (i {
table[i, 0] = 8 * (i - 96);
table[i, 1] = 255;
}
else if (i {
table[i, 0] = 255;
table[i, 1] = 255 - 4 * (i - 128);
}
else if (i {
table[i, 0] = 255;
table[i, 1] = 4 * (i - 192);
table[i, 2] = 4 * (i - 192);
}
}
}
}
}