Commit 19469330 authored by danyfel80's avatar danyfel80

Merge branch 'release/v1.0.1.1'

parents 104c7f26 edacfca6
......@@ -4,3 +4,4 @@
/build/
.classpath
.project
/ecbuild/
println "ICY_HOME=${System.env.ICY_HOME}"
apply plugin: 'java-library'
apply plugin: 'eclipse'
version = '1.0.1'
println "ICY_HOME=${System.env.ICY_HOME}"
println project.name + " " + version
configurations {
extraLibs // configuration that holds jars to include in the jar
implementation.extendsFrom(extraLibs)
}
// In this section you declare where to find the dependencies of your project
......@@ -18,24 +20,21 @@ repositories {
dependencies {
extraLibs 'org.apache.commons:commons-math3:3.0' // Apache Math
configurations.implementation.extendsFrom(configurations.extraLibs)
implementation files("${System.env.ICY_HOME}/lib/bioformats.jar") // Bioformats
implementation files("${System.env.ICY_HOME}/lib/jai_core.jar") // JAI
implementation files("${System.env.ICY_HOME}/icy.jar") // Icy
implementation files("${System.env.ICY_HOME}/plugins/adufour/ezplug/EzPlug.jar") // EzPlug
implementation files("${System.env.ICY_HOME}/plugins/adufour/blocks/Blocks.jar") // Blocks
implementation files("${System.env.ICY_HOME}/plugins/adufour/protocols/Protocols.jar") // Protocols
implementation files("${System.env.ICY_HOME}/lib/bioformats.jar") // Bioformats
implementation files("${System.env.ICY_HOME}/lib/jai_core.jar") // JAI
testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-all:1.3' // Hamcrest
}
eclipse {
classpath.downloadJavadoc = true
project {
natures += ['icy.icy4eclipse.core.icynature']
}
classpath.downloadJavadoc = true
project.natures += ['icy.icy4eclipse.core.icynature']
}
jar {
......
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-bin.zip
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
......@@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
......@@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
......
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
......@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
......
......@@ -71,7 +71,7 @@ public class SurfMatcher {
this.ransacMinNumInliers = ransacMinNumInliers;
}
public void compute() throws InterruptedException {
public void compute() throws InterruptedException, RuntimeException {
createClosestDescriptorMatches();
cleanIdenticalMatches();
filterCorrelatedMatches();
......@@ -159,7 +159,7 @@ public class SurfMatcher {
matches = new ArrayList<>(new HashSet<>(matches));
}
private void filterCorrelatedMatches() {
private void filterCorrelatedMatches() throws RuntimeException {
try {
RansacAffineTransformationCalculator calculator = new RansacAffineTransformationCalculator.Builder(matches)
.setMaxNumIterations(ransacMaxNumIterations).setNumInliersThreshold(ransacMinNumInliers)
......@@ -167,10 +167,12 @@ public class SurfMatcher {
calculator.compute();
matches = calculator.getFilteredMatches();
} catch (RansacAffineTransformationCalculatorException e) {
e.printStackTrace();
System.err.println("RANSAC failed to compute a correct affine transformation. Giving raw matches instead");
// e.printStackTrace();
// System.err.println("RANSAC failed to compute a correct affine transformation. Giving raw matches instead");
throw new RuntimeException("RANSAC failed to compute a correct affine transformation.", e);
} catch (IllegalArgumentException e) {
System.err.format("Insufficient matches to compute RANSAC (%d). Giving raw matches instead\n", matches.size());
//System.err.format("Insufficient matches to compute RANSAC (%d). Giving raw matches instead\n", matches.size());
throw new RuntimeException(String.format("Insufficient matches to compute RANSAC (%d).", matches.size()), e);
}
}
......
......@@ -189,6 +189,9 @@ public class MatchSurfFeatures extends EzPlug implements Block, EzStoppable {
System.out.printf("Computation time: %d milliseconds\n", endTime - startTime);
} catch (InterruptedException e) {
throw getInterruptionException();
} catch (Exception e) {
e.printStackTrace();
throw new IcyHandledException(e);
}
createResult();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment