public ProcessingWindow(SubjectiveSystem system, ObserverData observerData, ProcessingMethod processingMethod) { this.system = system; this.observerData = observerData; this.processingMethod = processingMethod; InitializeComponent(); }
public virtual ProcessingMethod ToProcessingMethod() { ProcessingMethod pm = new ProcessingMethod(); pm.set(CVID); return(pm); }
public SpectrumList_Thresholder_ListViewItem(ProcessingMethod method) : base("Thresholder") { initializeComponents(); // parse type, orientation, and threshold from method UserParam param = method.userParam("threshold"); if (param.type == "SeeMS") { thresholdTextBox.Text = param.value; } param = method.userParam("type"); if (param.type == "SeeMS") { thresholdingTypeComboBox.SelectedIndex = (int)param.value; } param = method.userParam("orientation"); if (param.type == "SeeMS") { thresholdingOrientationComboBox.SelectedIndex = (int)param.value; } }
public override ProcessingMethod ToProcessingMethod() { ProcessingMethod pm = new ProcessingMethod(); pm.userParams.Add(new UserParam("mz", mz.ToString(), "SeeMS")); pm.userParams.Add(new UserParam("tolerance", tolerance.ToString(), "SeeMS")); return(pm); }
/// <inheritdoc/> public override void InitializeLinks() { base.InitializeLinks(); // Initialize links for the helper methods. _helperFocalSurfaces.InitializeLinks(); // Define the scene representation methods. sceneRepresentationMethods = new ProcessingMethod[] { PMColorTextureArray, PMPerViewMeshesFS }; }
/// <inheritdoc/> public override void InitializeLinks() { base.InitializeLinks(); // Initialize links for the helper methods. _helperCommandBuffer.InitializeLinks(); _helperDiskBlending.InitializeLinks(); // Define the scene representation methods. sceneRepresentationMethods = new ProcessingMethod[] { PMColorTextureArray, PMPerViewMeshesQSTR }; }
public override ProcessingMethod ToProcessingMethod() { ProcessingMethod pm = new ProcessingMethod(); pm.userParams.Add(new UserParam("threshold", threshold.ToString(), "SeeMS")); pm.userParams.Add(new UserParam("type", type.ToString(), "SeeMS")); pm.userParams.Add(new UserParam("orientation", orientation.ToString(), "SeeMS")); return(pm); }
public override ProcessingMethod ToProcessingMethod() { ProcessingMethod pm = base.ToProcessingMethod(); pm.userParams.Add(new UserParam("threshold", thresholdTextBox.Text, "SeeMS")); pm.userParams.Add(new UserParam("type", thresholdingTypeComboBox.SelectedIndex.ToString(), "SeeMS")); pm.userParams.Add(new UserParam("orientation", thresholdingOrientationComboBox.SelectedIndex.ToString(), "SeeMS")); return(pm); }
public SpectrumList_ECD_ETD_PrecursorFilter(SpectrumList inner) : base(inner) { ProcessingMethod method = new ProcessingMethod(); method.order = this.dataProcessing().processingMethods.Count; method.set(CVID.MS_charge_stripping); this.dataProcessing().processingMethods.Add(method); }
public override ProcessingMethod ToProcessingMethod() { ProcessingMethod pm = new ProcessingMethod(); if (algorithm is LocalMaximumPeakDetector) { pm.userParams.Add(new UserParam("algorithm", "Local Maximum", "SeeMS")); } return(pm); }
public void DoSomething(ProcessingMethod method) { if (method == ProcessingMethod.Sequential) { // do something sequential } else if (method == ProcessingMethod.Random) { // do something random } }
public override ProcessingMethod ToProcessingMethod() { ProcessingMethod pm = new ProcessingMethod(); if (algorithm is SavitzkyGolaySmoother) { pm.userParams.Add(new UserParam("algorithm", "Savitzky-Golay", "SeeMS")); } else if (algorithm is WhittakerSmoother) { pm.userParams.Add(new UserParam("algorithm", "Whittaker", "SeeMS")); } return(pm); }
public Bitmap ProcessImage(Bitmap image, ObserverData observerData, ProcessingMethod processingMethod) { if (processingMethod == ProcessingMethod.UseAlgorithmWithHighestScore) { string bestAlgorithm = observerData.EvaluationResults.OrderByDescending(x => x.AlgorithScore).First().AlgorithCustomName; AlgorithmInfo algorithmInfo = this.Algorithms.Where(x => x.CustomName == bestAlgorithm).Single(); var algorithm = AppFacade.DI.Container.Resolve <IAlgorithm>(algorithmInfo.AlgorithName); algorithm.SetParameters(algorithmInfo.Parameters); return(SimpleProcessing(image, algorithm)); } if (processingMethod == ProcessingMethod.AlgorithmsFusion) { return(FusionProcessing(image, this.Algorithms, observerData.EvaluationResults)); } throw new NotSupportedException(); }
public ThresholdingProcessor(ProcessingMethod method) { // parse type, orientation, and threshold from method UserParam param = method.userParam("threshold"); if (param.type == "SeeMS") { threshold = (double)param.value; } param = method.userParam("type"); if (param.type == "SeeMS") { type = (ThresholdFilter.ThresholdingBy_Type)(int) param.value; } param = method.userParam("orientation"); if (param.type == "SeeMS") { orientation = (ThresholdFilter.ThresholdingOrientation)(int) param.value; } }
public SpectrumList_Preexisting_ListViewItem(ProcessingMethod method) : base(method.cvParamChild(CVID.MS_data_processing_action).name) { methodParam = method.cvParamChild(CVID.MS_data_processing_action); }
public static IProcessing GetProcessingMethod(ProcessingMethod method) { return(lsProcessing[(int)method]); }
/// <inheritdoc/> public override void InitializeLinks() { base.InitializeLinks(); sceneRepresentationMethods = new ProcessingMethod[] { PMGlobalMeshEF, PMGlobalTextureMap }; }
public Bitmap ProcessImage(Bitmap image, ObserverData observerData, ProcessingMethod processingMethod) { if (processingMethod == ProcessingMethod.UseAlgorithmWithHighestScore) { string bestAlgorithm = observerData.EvaluationResults.OrderByDescending(x => x.AlgorithScore).First().AlgorithCustomName; AlgorithmInfo algorithmInfo = this.Algorithms.Where(x => x.CustomName == bestAlgorithm).Single(); var algorithm = AppFacade.DI.Container.Resolve<IAlgorithm>(algorithmInfo.AlgorithName); algorithm.SetParameters(algorithmInfo.Parameters); return SimpleProcessing(image, algorithm); } if (processingMethod == ProcessingMethod.AlgorithmsFusion) { return FusionProcessing(image, this.Algorithms, observerData.EvaluationResults); } throw new NotSupportedException(); }
/// <inheritdoc/> public override void InitializeLinks() { base.InitializeLinks(); sceneRepresentationMethods = new ProcessingMethod[] { }; }
/// <inheritdoc/> public override void InitializeLinks() { base.InitializeLinks(); // Define the scene representation methods. sceneRepresentationMethods = new ProcessingMethod[] { PMColorTextureArray, PMPerViewMeshesQSTR }; }
protected void SetMethod(ProcessingMethod method) { this.method = method; }
public static void ProcessLocation(GameLocation location, ProcessingMethod method) { if (location == null) { return; } monitor.Log("VoidshroomTree.ProcessLocation(" + location.Name + ", " + method + ")", StardewModdingAPI.LogLevel.Trace); if (processedLocations.Contains(location)) { monitor.Log("VoidshroomTree.ProcessLocation(" + location.Name + ", " + method + "): Already processed this location (infinite recursion?), aborting!", StardewModdingAPI.LogLevel.Warn); return; } processedLocations.Add(location); bool itemsToRemove = false; if (VoidshroomSpore.IsValidLocation(location)) { String locationName = location.Name.ToString(); if (method.Equals(ProcessingMethod.Remove)) { foreach (Vector2 featureSpot in location.terrainFeatures.Keys) { if (location.terrainFeatures[featureSpot] is VoidshroomTree) { StringWriter writer = new StringWriter(); if (!ModState.voidshroomTreeLocations.ContainsKey(locationName)) { ModState.voidshroomTreeLocations.Add(locationName, new Dictionary <Vector2, VoidshroomtreeSaveData>()); } VoidshroomTree tree = (VoidshroomTree)location.terrainFeatures[featureSpot]; ModState.voidshroomTreeLocations[locationName].Add(featureSpot, tree.GetSaveData()); itemsToRemove = true; } } //data is stored, but if we're removing we need to actually clear stuff out of the list now. if (itemsToRemove) { foreach (Vector2 locationData in ModState.voidshroomTreeLocations[location.Name.ToString()].Keys) { location.terrainFeatures.Remove(locationData); } } } else if (method.Equals(ProcessingMethod.Restore)) { if (ModState.voidshroomTreeLocations.ContainsKey(location.Name.ToString())) { foreach (KeyValuePair <Vector2, VoidshroomtreeSaveData> locationData in ModState.voidshroomTreeLocations[location.Name.ToString()]) { location.terrainFeatures.Add(locationData.Key, new VoidshroomTree(locationData.Value)); } } } } }
public override ProcessingMethod ToProcessingMethod() { ProcessingMethod pm = new ProcessingMethod(); return(pm); }