private void Convert(BrainVisionPackage bvPackage, IBidsPackage bidsPackage, CustomizationInfo info) { Warnings = Array.Empty <string>(); PackageConverter converter = new PackageConverter(bvPackage, bidsPackage, info); converter.CopyBrainVisionFilesToBidsEegModalityFolder(); bvPackage.UpdateMissingKeysWithDefaultValues(); converter.ConvertBrainVisionFilesToBidsFormatFiles(); Warnings = converter.Warnings; }
/// <exception cref="ArgumentException">Thrown when <paramref name="brainVisionHeaderFilePath"/>consists only of white characters.</exception> /// <exception cref="InvalidOperationException">Thrown when vision file fails to load.</exception> /// <exception cref="NotSupportedException">Thrown when units are not recognized.</exception> public void Convert(string brainVisionHeaderFilePath, CustomizationInfo info) { if (string.IsNullOrWhiteSpace(brainVisionHeaderFilePath)) { throw new ArgumentException(Resources.ArgumentEmptyOrWhiteCharactersExceptionMessage, nameof(brainVisionHeaderFilePath)); } GenerateSubjectSessionAndTaskIfNotProvided(info, brainVisionHeaderFilePath, out string subjectName, out string?sessionName, out string taskName); IBidsPackage bidsPackage = CreateBidsPackage(subjectName, sessionName, taskName); BrainVisionPackage bvPackage = CreateBvPackage(brainVisionHeaderFilePath); Convert(bvPackage, bidsPackage, info); }
public PackageConverter(BrainVisionPackage bvPackage, IBidsPackage bidsPackage, CustomizationInfo info) { _bvPackage = bvPackage; _bidsPackage = bidsPackage; _info = info; }