示例#1
0
 public void SetNextStep()
 {
     currentTimeLimit += timeStepSize;
     do
     {
         string[] lineComponents = currentLine.Split(' ');
         long     time           = Convert.ToInt64(lineComponents[0]);
         if (time < currentTimeLimit)
         {
             ProcessLine(lineComponents);
         }
         else
         {
             break;
         }
     } while ((currentLine = fileReader.ReadLine()) != null);
     PixelIndexValuesBuffer.SetData(colorData);
     CurrentStepIndex++;
 }
示例#2
0
    public void SetNextStep()
    {
        string filePath = images[CurrentStepIndex];

        rawImageData = File.ReadAllBytes(filePath);
        imageVessel.LoadImage(rawImageData);

        int pixelIndex = 0;

        for (int x = 0; x < MainViewerScript.ImageResolution; x++)
        {
            for (int y = 0; y < MainViewerScript.ImageResolution; y++)
            {
                if (x < imageVessel.width && y < imageVessel.height)
                {
                    Color color = imageVessel.GetPixel(x, y);
                    colorData[pixelIndex] = GetIndexValue(color);
                }
                pixelIndex++;
            }
        }
        PixelIndexValuesBuffer.SetData(colorData);
        CurrentStepIndex++;
    }
示例#3
0
 public void Dispose()
 {
     PixelIndexValuesBuffer.Dispose();
 }
示例#4
0
 public void Dispose()
 {
     fileReader.Dispose();
     fileStream.Dispose();
     PixelIndexValuesBuffer.Dispose();
 }