Skip to content

Commit

Permalink
Initialize scijava-ops-flim
Browse files Browse the repository at this point in the history
This new repository contains a port of the flimj-ops library: https://github.com/flimlib/flimj-ops/
  • Loading branch information
gselzer committed Apr 1, 2024
1 parent b36fde6 commit 2ed67a7
Show file tree
Hide file tree
Showing 40 changed files with 4,531 additions and 5 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<module>scijava-meta</module>
<module>scijava-ops-api</module>
<module>scijava-ops-engine</module>
<module>scijava-ops-flim</module>
<module>scijava-ops-image</module>
<module>scijava-ops-legacy</module>
<module>scijava-ops-indexer</module>
Expand Down
1 change: 1 addition & 0 deletions scijava-ops-engine/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@
org.scijava.ops.engine.adapt.functional.InplacesToFunctions.Inplace16_14ToFunction16,
org.scijava.ops.engine.adapt.functional.InplacesToFunctions.Inplace16_15ToFunction16,
org.scijava.ops.engine.adapt.functional.InplacesToFunctions.Inplace16_16ToFunction16,
org.scijava.ops.engine.conversionLoss.impl.IdentityLossReporter,
org.scijava.ops.engine.eval.DefaultEval,
org.scijava.ops.engine.stats.Mean.MeanFunction;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,9 @@ private double calculatePriority(OpEnvironment env) {
List<Type> originalInputs = info.inputTypes();
List<Type> inputs = inputTypes();
for (int i = 0; i < inputs.size(); i++) {
penalty += determineLoss(env, Nil.of(inputs.get(i)), Nil.of(originalInputs
.get(i)));
var from = inputs.get(i);
var to = Types.mapVarToTypes(originalInputs.get(i), typeVarAssigns);
penalty += determineLoss(env, Nil.of(from), Nil.of(to));
}

Type opOutput = info.outputType();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,5 +234,6 @@ org.scijava.ops.engine.adapt.functional.InplacesToFunctions$Inplace16_13ToFuncti
org.scijava.ops.engine.adapt.functional.InplacesToFunctions$Inplace16_14ToFunction16
org.scijava.ops.engine.adapt.functional.InplacesToFunctions$Inplace16_15ToFunction16
org.scijava.ops.engine.adapt.functional.InplacesToFunctions$Inplace16_16ToFunction16
org.scijava.ops.engine.conversionLoss.impl.IdentityLossReporter
org.scijava.ops.engine.eval.DefaultEval
org.scijava.ops.engine.stats.Mean$MeanFunction
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ public class ServiceLoaderDiscoveryIntegrationTest {
public void opDiscoveryRegressionIT() {
final Discoverer d = Discoverer.using(ServiceLoader::load);
final List<Op> discoveries = d.discover(Op.class);
Assertions.assertEquals(236, discoveries.size());
Assertions.assertEquals(237, discoveries.size());

@SuppressWarnings("unused")
final OpInfoGenerator g = new OpClassOpInfoGenerator();
final List<OpInfo> infos = discoveries.stream() //
.flatMap(c -> g.generateInfosFrom(c).stream()) //
.collect(Collectors.toList());
Assertions.assertEquals(236, infos.size());
Assertions.assertEquals(237, infos.size());
}

@Test
Expand Down
1 change: 1 addition & 0 deletions scijava-ops-engine/templates/main/java/module-info.vm
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ module org.scijava.ops.engine {
org.scijava.ops.engine.adapt.functional.InplacesToFunctions.Inplace${arity}_${a}ToFunction${arity},
#end
#end
org.scijava.ops.engine.conversionLoss.impl.IdentityLossReporter,
org.scijava.ops.engine.eval.DefaultEval,
org.scijava.ops.engine.stats.Mean.MeanFunction;

Expand Down
24 changes: 24 additions & 0 deletions scijava-ops-flim/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Copyright (c) 2023, ImageJ2 developers.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
12 changes: 12 additions & 0 deletions scijava-ops-flim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SciJava Ops Flim: A fluorescence lifetime analysis library for SciJava Ops.

This library provides a bridge between SciJava Ops and Flim.
For Maven projects, this library can be used by adding to your `pom.xml`:

```java
<dependency>
<groupId>org.scijava</groupId>
<artifactId>scijava-ops-flim</artifactId>
<version>0-SNAPSHOT</version>
</dependency>
```
8 changes: 8 additions & 0 deletions scijava-ops-flim/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: scijava
channels:
- conda-forge
dependencies:
- beakerx
- jupyter_contrib_nbextensions
- numpy
- openjdk=11
Binary file added scijava-ops-flim/images/example A.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scijava-ops-flim/images/example tau.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added scijava-ops-flim/images/example z.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2ed67a7

Please sign in to comment.