public static double[] convertTO1D(byte[,] U8array)
{
double[] arrayToReturn = new double[U8array.GetLength(0)];
double temp;
for (int i = 0; i < U8array.GetLength(0); i++ )
{
temp = 0;
for (int j = 0; j < U8array.GetLength(0); j++)
{
if (U8array[i, j] > 3)
{
temp = (double)U8array[i, j] + temp;
}
}
arrayToReturn[i] = temp;
}
return arrayToReturn;
}