-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add services needed for automated multiple chromatogram segmentation
Signed-off-by: Lorenz Gerber <[email protected]>
- Loading branch information
1 parent
6c080f4
commit 1356ca9
Showing
9 changed files
with
333 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...openchrom.xxd.base.ui/src/net/openchrom/xxd/base/ui/services/IAnalysisSegmentService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Lablicate GmbH. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Lorenz Gerber - initial API and implementation | ||
*******************************************************************************/ | ||
package net.openchrom.xxd.base.ui.services; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.chemclipse.model.core.IChromatogram; | ||
import org.eclipse.chemclipse.model.core.IScan; | ||
import org.eclipse.chemclipse.model.support.IAnalysisSegment; | ||
import org.eclipse.chemclipse.model.types.DataType; | ||
import org.eclipse.chemclipse.processing.core.IProcessingInfo; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
import org.eclipse.ui.IWorkbenchPreferencePage; | ||
|
||
public interface IAnalysisSegmentService { | ||
|
||
String getName(); | ||
|
||
String getDescription(); | ||
|
||
String getVersion(); | ||
|
||
DataType getDataType(); | ||
|
||
IProcessingInfo<List<IAnalysisSegment>> calculate(IChromatogram<?> chromatogram, List<? extends IScan> scans, IProgressMonitor monitor); | ||
|
||
Class<? extends IWorkbenchPreferencePage> getPreferencePage(); | ||
} |
35 changes: 35 additions & 0 deletions
35
...chrom.xxd.base.ui/src/net/openchrom/xxd/base/ui/services/IAverageChromatogramService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Lablicate GmbH. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Lorenz Gerber - initial API and implementation | ||
*******************************************************************************/ | ||
package net.openchrom.xxd.base.ui.services; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.chemclipse.model.core.IChromatogram; | ||
import org.eclipse.chemclipse.model.types.DataType; | ||
import org.eclipse.chemclipse.processing.core.IProcessingInfo; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
import org.eclipse.ui.IWorkbenchPreferencePage; | ||
|
||
public interface IAverageChromatogramService { | ||
|
||
String getName(); | ||
|
||
String getDescription(); | ||
|
||
String getVersion(); | ||
|
||
DataType getDataType(); | ||
|
||
IProcessingInfo<IChromatogram<?>> calculate(List<IChromatogram<?>> chromatograms, IProgressMonitor monitor); | ||
|
||
Class<? extends IWorkbenchPreferencePage> getPreferencePage(); | ||
} |
36 changes: 36 additions & 0 deletions
36
...openchrom.xxd.base.ui/src/net/openchrom/xxd/base/ui/services/ILocalMaximaScanService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Lablicate GmbH. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Lorenz Gerber - initial API and implementation | ||
*******************************************************************************/ | ||
package net.openchrom.xxd.base.ui.services; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.chemclipse.model.core.IScan; | ||
import org.eclipse.chemclipse.model.selection.IChromatogramSelection; | ||
import org.eclipse.chemclipse.model.types.DataType; | ||
import org.eclipse.chemclipse.processing.core.IProcessingInfo; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
import org.eclipse.ui.IWorkbenchPreferencePage; | ||
|
||
public interface ILocalMaximaScanService { | ||
|
||
String getName(); | ||
|
||
String getDescription(); | ||
|
||
String getVersion(); | ||
|
||
DataType getDataType(); | ||
|
||
IProcessingInfo<List<? extends IScan>> calculate(IChromatogramSelection<?, ?> chromatogram, IProgressMonitor monitor); | ||
|
||
Class<? extends IWorkbenchPreferencePage> getPreferencePage(); | ||
} |
36 changes: 36 additions & 0 deletions
36
...openchrom.xxd.base.ui/src/net/openchrom/xxd/base/ui/services/ILocalMinimaScanService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Lablicate GmbH. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Lorenz Gerber - initial API and implementation | ||
*******************************************************************************/ | ||
package net.openchrom.xxd.base.ui.services; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.chemclipse.model.core.IScan; | ||
import org.eclipse.chemclipse.model.selection.IChromatogramSelection; | ||
import org.eclipse.chemclipse.model.types.DataType; | ||
import org.eclipse.chemclipse.processing.core.IProcessingInfo; | ||
import org.eclipse.core.runtime.IProgressMonitor; | ||
import org.eclipse.ui.IWorkbenchPreferencePage; | ||
|
||
public interface ILocalMinimaScanService { | ||
|
||
String getName(); | ||
|
||
String getDescription(); | ||
|
||
String getVersion(); | ||
|
||
DataType getDataType(); | ||
|
||
IProcessingInfo<List<? extends IScan>> calculate(IChromatogramSelection<?, ?> chromatogram, IProgressMonitor monitor); | ||
|
||
Class<? extends IWorkbenchPreferencePage> getPreferencePage(); | ||
} |
36 changes: 36 additions & 0 deletions
36
...t.openchrom.xxd.base.ui/src/net/openchrom/xxd/base/ui/support/AnalysisSegmentSupport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Lablicate GmbH. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Lorenz Gerber - initial API and implementation | ||
*******************************************************************************/ | ||
package net.openchrom.xxd.base.ui.support; | ||
|
||
import org.eclipse.chemclipse.model.types.DataType; | ||
|
||
import net.openchrom.xxd.base.ui.Activator; | ||
import net.openchrom.xxd.base.ui.services.IAnalysisSegmentService; | ||
|
||
public class AnalysisSegmentSupport { | ||
|
||
public static IAnalysisSegmentService getAnalysisSegmentService(DataType dataType) { | ||
|
||
Object[] services = Activator.getDefault().getAnalysisSegmentServices(); | ||
if(services != null) { | ||
for(Object service : services) { | ||
if(service instanceof IAnalysisSegmentService analysisSegmentService) { | ||
if(dataType.equals(analysisSegmentService.getDataType())) { | ||
return analysisSegmentService; | ||
} | ||
} | ||
} | ||
} | ||
// | ||
return null; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...enchrom.xxd.base.ui/src/net/openchrom/xxd/base/ui/support/AverageChromatogramSupport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Lablicate GmbH. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Lorenz Gerber - initial API and implementation | ||
*******************************************************************************/ | ||
package net.openchrom.xxd.base.ui.support; | ||
|
||
import org.eclipse.chemclipse.model.types.DataType; | ||
|
||
import net.openchrom.xxd.base.ui.Activator; | ||
import net.openchrom.xxd.base.ui.services.IAverageChromatogramService; | ||
|
||
public class AverageChromatogramSupport { | ||
|
||
public static IAverageChromatogramService getAverageChromatogramService(DataType dataType) { | ||
|
||
Object[] services = Activator.getDefault().getAverageChromatogramServices(); | ||
if(services != null) { | ||
for(Object service : services) { | ||
if(service instanceof IAverageChromatogramService averageChromatogramService) { | ||
if(dataType.equals(averageChromatogramService.getDataType())) { | ||
return averageChromatogramService; | ||
} | ||
} | ||
} | ||
} | ||
// | ||
return null; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...t.openchrom.xxd.base.ui/src/net/openchrom/xxd/base/ui/support/LocalMaximaScanSupport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Lablicate GmbH. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Lorenz Gerber - initial API and implementation | ||
*******************************************************************************/ | ||
package net.openchrom.xxd.base.ui.support; | ||
|
||
import org.eclipse.chemclipse.model.types.DataType; | ||
|
||
import net.openchrom.xxd.base.ui.Activator; | ||
import net.openchrom.xxd.base.ui.services.ILocalMaximaScanService; | ||
|
||
public class LocalMaximaScanSupport { | ||
|
||
public static ILocalMaximaScanService getLocalMaximaScanService(DataType dataType) { | ||
|
||
Object[] services = Activator.getDefault().getLocalMaximaScanServices(); | ||
if(services != null) { | ||
for(Object service : services) { | ||
if(service instanceof ILocalMaximaScanService localMaximaScanService) { | ||
if(dataType.equals(localMaximaScanService.getDataType())) { | ||
return localMaximaScanService; | ||
} | ||
} | ||
} | ||
} | ||
// | ||
return null; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...t.openchrom.xxd.base.ui/src/net/openchrom/xxd/base/ui/support/LocalMinimaScanSupport.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Lablicate GmbH. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Lorenz Gerber - initial API and implementation | ||
*******************************************************************************/ | ||
package net.openchrom.xxd.base.ui.support; | ||
|
||
import org.eclipse.chemclipse.model.types.DataType; | ||
|
||
import net.openchrom.xxd.base.ui.Activator; | ||
import net.openchrom.xxd.base.ui.services.ILocalMinimaScanService; | ||
|
||
public class LocalMinimaScanSupport { | ||
|
||
public static ILocalMinimaScanService getLocalMinimaScanService(DataType dataType) { | ||
|
||
Object[] services = Activator.getDefault().getLocalMinimaScanServices(); | ||
if(services != null) { | ||
for(Object service : services) { | ||
if(service instanceof ILocalMinimaScanService localMinimaScanService) { | ||
if(dataType.equals(localMinimaScanService.getDataType())) { | ||
return localMinimaScanService; | ||
} | ||
} | ||
} | ||
} | ||
// | ||
return null; | ||
} | ||
} |