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++; }
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++; }
public void Dispose() { PixelIndexValuesBuffer.Dispose(); }
public void Dispose() { fileReader.Dispose(); fileStream.Dispose(); PixelIndexValuesBuffer.Dispose(); }