public AsyncDataLoader() { loadTemperature = new LoadTemperature(); //context = new DatabaseContext(); sequenceCreator = new SequenceCreator(); loadPulse = new LoadPulse(); loadMovement = new LoadMovement(); loadFall = new LoadFall(); //loadTemperature.createFileFromFile(); //loadPulse.createFileFromFile(); loadPulse.createDatasetFile(); loadTemperature.createDatasetFile(); loadMovement.createDatasetFile(); }
public void RenderAndSaveThumbnail(OperatorPreset preset) { var op = App.Current.MainWindow.XParameterView.ShownOperator; // todo: remove access to parameter view! if (op == null || !op.Outputs.Any()) { return; } var output = op.Outputs.First(); if (LivePreviewEnabled) { if (App.Current.MainWindow.XRenderView.Operator != null && App.Current.MainWindow.XRenderView.Operator.Outputs.Any()) { output = App.Current.MainWindow.XRenderView.Operator.Outputs[0]; } } var currentTime = App.Current.Model.GlobalTime; var filePath = preset.BuildImagePath(); var result = Regex.Match(filePath, @"(.*)/(.*)\.png"); if (result == null) { throw new Exception("Invalid filepath format for thumbnails:" + filePath); } var directory = result.Groups[1].Value; var filename = result.Groups[2].Value; using (var sequenceCreator = new SequenceCreator()) { sequenceCreator.Setup(output, height: THUMB_HEIGHT, width: THUMB_WIDTH, startTime: currentTime, endTime: currentTime, frameRate: 10000, fileExtension: "png", skipExistingFiles: false, directory: directory, filenameFormat: filename); sequenceCreator.RenderFrame(); } }
public void GenerateSequenceTest() { ISequence sequenceCreator = new SequenceCreator(); var result = sequenceCreator.GenerateSequence("02,3-14/3", 0, 30); var expected = new List <int>() { 2, 3, 6, 9, 12 }; for (int i = 0; i < expected.Count; i++) { Assert.Equal(expected[i], result[i]); } result = sequenceCreator.GenerateSequence("*/2", 1, 7); expected = new List <int>() { 1, 3, 5, 7 }; for (int i = 0; i < expected.Count; i++) { Assert.Equal(expected[i], result[i]); } }
async void SekvencePulse() { SequenceCreator sq = new SequenceCreator(); sq.PulseSequencer(_context); }
async void tempSekv() { SequenceCreator sq = new SequenceCreator(); sq.TemperatureSequencer(_context); }