Skip to content

Commit

Permalink
Bump to next development cycle
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle IS Harrington <[email protected]>
  • Loading branch information
kephale committed Jul 29, 2020
1 parent e69cc1f commit 7bad6d4
Show file tree
Hide file tree
Showing 106 changed files with 917 additions and 269 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016 - 2018, SciView developers.
Copyright (c) 2016 - 2020, SciView developers.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@
<groupId>io.scif</groupId>
<artifactId>scifio</artifactId>
</dependency>
<dependency>
<groupId>io.scif</groupId>
<artifactId>scifio-bf-compat</artifactId>
</dependency>

<!-- ImgLib2 dependencies -->
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/sc/iview/ActiveSciViewPreprocessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Scenery-backed 3D visualization package for ImageJ.
* %%
* Copyright (C) 2016 - 2018 SciView developers.
* Copyright (C) 2016 - 2020 SciView developers.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/sc/iview/DefaultSciViewService.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Scenery-backed 3D visualization package for ImageJ.
* %%
* Copyright (C) 2016 - 2018 SciView developers.
* Copyright (C) 2016 - 2020 SciView developers.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/sc/iview/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Scenery-backed 3D visualization package for ImageJ.
* %%
* Copyright (C) 2016 - 2018 SciView developers.
* Copyright (C) 2016 - 2020 SciView developers.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/sc/iview/SciView.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
* #%L
* Scenery-backed 3D visualization package for ImageJ.
* %%
* Copyright (C) 2016 - 2018 SciView developers.
* Copyright (C) 2016 - 2020 SciView developers.
* %%
* 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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/sc/iview/SciViewService.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Scenery-backed 3D visualization package for ImageJ.
* %%
* Copyright (C) 2016 - 2018 SciView developers.
* Copyright (C) 2016 - 2020 SciView developers.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down
236 changes: 132 additions & 104 deletions src/main/java/sc/iview/SplashLabel.java
Original file line number Diff line number Diff line change
@@ -1,104 +1,132 @@
package sc.iview;

import graphics.scenery.SceneryBase;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.JarURLConnection;
import java.net.URL;
import java.util.jar.Attributes;
import java.util.jar.Manifest;

/**
* Splash label class to show logo, version, and git hashes.
*
* @author Ulrik Guenther <[email protected]>
*/
public class SplashLabel extends JComponent implements ItemListener {
private Logger logger = LoggerFactory.getLogger("SciView");
public void itemStateChanged(ItemEvent e) {
setVisible(e.getStateChange() == ItemEvent.SELECTED);
}

protected void paintComponent(Graphics g) {
Point point = new Point(100, 100);

if (point != null) {
// g.setColor(Color.red);
// g.fillRect(0, 0, getWidth(), getHeight());
}
super.paintComponent(g);
}

private String getGitHashFor(Class<?> clazz) {
final String sciviewBaseClassName = clazz.getSimpleName() + ".class";
final String sciviewClassPath = clazz.getResource(sciviewBaseClassName).toString();
String gitHash = "";
if(!sciviewClassPath.startsWith("jar")) {
return gitHash;
}

try {
URL url = new URL(sciviewClassPath);
JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
Manifest manifest = jarConnection.getManifest();
Attributes attributes = manifest.getMainAttributes();
gitHash = attributes.getValue("Implementation-Build").substring(0, 8);
} catch (IOException ioe){
gitHash = "";
}

return gitHash;
}

public SplashLabel() {
setOpaque(true);
final String sceneryVersion = SceneryBase.class.getPackage().getImplementationVersion();
final String sciviewVersion = SciView.class.getPackage().getImplementationVersion();
final String versionString;

String sceneryGitHash = getGitHashFor(SceneryBase.class);
String sciviewGitHash = getGitHashFor(SciView.class);

if(sceneryGitHash.length() > 0) {
sceneryGitHash = " (" + sceneryGitHash + ")";
}

if(sciviewGitHash.length() > 0) {
sciviewGitHash = " (" + sciviewGitHash + ") ";
}

if(sceneryVersion == null || sciviewVersion == null) {
versionString = "sciview / scenery";
} else {
versionString = "sciview " + sciviewVersion + sciviewGitHash + ") / scenery " + sceneryVersion + sceneryGitHash;
}

logger.info("This is " + versionString + " ("+ sciviewGitHash + " / " + sceneryGitHash + ")");

BufferedImage splashImage;
try {
splashImage = ImageIO.read(this.getClass().getResourceAsStream("sciview-logo.png"));
} catch (IOException e) {
logger.warn("Could not read splash image 'sciview-logo.png'");
splashImage = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
}

final JLabel splashLabel = new JLabel("\n\n" + versionString,
new ImageIcon(splashImage.getScaledInstance(500, 200, java.awt.Image.SCALE_SMOOTH)),
SwingConstants.CENTER);
splashLabel.setBackground(new java.awt.Color(50, 48, 47));
splashLabel.setForeground(new java.awt.Color(78, 76, 75));
splashLabel.setOpaque(true);
splashLabel.setVerticalTextPosition(JLabel.BOTTOM);
splashLabel.setHorizontalTextPosition(JLabel.CENTER);
this.add(splashLabel);
}
}
/*-
* #%L
* Scenery-backed 3D visualization package for ImageJ.
* %%
* Copyright (C) 2016 - 2020 SciView developers.
* %%
* 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 HOLDERS 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.
* #L%
*/
package sc.iview;

import graphics.scenery.SceneryBase;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.JarURLConnection;
import java.net.URL;
import java.util.jar.Attributes;
import java.util.jar.Manifest;

/**
* Splash label class to show logo, version, and git hashes.
*
* @author Ulrik Guenther <[email protected]>
*/
public class SplashLabel extends JComponent implements ItemListener {
private Logger logger = LoggerFactory.getLogger("SciView");
public void itemStateChanged(ItemEvent e) {
setVisible(e.getStateChange() == ItemEvent.SELECTED);
}

protected void paintComponent(Graphics g) {
Point point = new Point(100, 100);

if (point != null) {
// g.setColor(Color.red);
// g.fillRect(0, 0, getWidth(), getHeight());
}
super.paintComponent(g);
}

private String getGitHashFor(Class<?> clazz) {
final String sciviewBaseClassName = clazz.getSimpleName() + ".class";
final String sciviewClassPath = clazz.getResource(sciviewBaseClassName).toString();
String gitHash = "";
if(!sciviewClassPath.startsWith("jar")) {
return gitHash;
}

try {
URL url = new URL(sciviewClassPath);
JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
Manifest manifest = jarConnection.getManifest();
Attributes attributes = manifest.getMainAttributes();
gitHash = attributes.getValue("Implementation-Build").substring(0, 8);
} catch (IOException ioe){
gitHash = "";
}

return gitHash;
}

public SplashLabel() {
setOpaque(true);
final String sceneryVersion = SceneryBase.class.getPackage().getImplementationVersion();
final String sciviewVersion = SciView.class.getPackage().getImplementationVersion();
final String versionString;

String sceneryGitHash = getGitHashFor(SceneryBase.class);
String sciviewGitHash = getGitHashFor(SciView.class);

if(sceneryGitHash.length() > 0) {
sceneryGitHash = " (" + sceneryGitHash + ")";
}

if(sciviewGitHash.length() > 0) {
sciviewGitHash = " (" + sciviewGitHash + ") ";
}

if(sceneryVersion == null || sciviewVersion == null) {
versionString = "sciview / scenery";
} else {
versionString = "sciview " + sciviewVersion + sciviewGitHash + ") / scenery " + sceneryVersion + sceneryGitHash;
}

logger.info("This is " + versionString + " ("+ sciviewGitHash + " / " + sceneryGitHash + ")");

BufferedImage splashImage;
try {
splashImage = ImageIO.read(this.getClass().getResourceAsStream("sciview-logo.png"));
} catch (IOException e) {
logger.warn("Could not read splash image 'sciview-logo.png'");
splashImage = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB);
}

final JLabel splashLabel = new JLabel("\n\n" + versionString,
new ImageIcon(splashImage.getScaledInstance(500, 200, java.awt.Image.SCALE_SMOOTH)),
SwingConstants.CENTER);
splashLabel.setBackground(new java.awt.Color(50, 48, 47));
splashLabel.setForeground(new java.awt.Color(78, 76, 75));
splashLabel.setOpaque(true);
splashLabel.setVerticalTextPosition(JLabel.BOTTOM);
splashLabel.setHorizontalTextPosition(JLabel.CENTER);
this.add(splashLabel);
}
}
28 changes: 28 additions & 0 deletions src/main/java/sc/iview/Utils.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
/*-
* #%L
* Scenery-backed 3D visualization package for ImageJ.
* %%
* Copyright (C) 2016 - 2020 SciView developers.
* %%
* 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 HOLDERS 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.
* #L%
*/
package sc.iview;

import graphics.scenery.Mesh;
Expand Down
28 changes: 28 additions & 0 deletions src/main/java/sc/iview/Version.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
/*-
* #%L
* Scenery-backed 3D visualization package for ImageJ.
* %%
* Copyright (C) 2016 - 2020 SciView developers.
* %%
* 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 HOLDERS 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.
* #L%
*/
package sc.iview;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/sc/iview/commands/LaunchViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Scenery-backed 3D visualization package for ImageJ.
* %%
* Copyright (C) 2016 - 2018 SciView developers.
* Copyright (C) 2016 - 2020 SciView developers.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/sc/iview/commands/MenuWeights.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* #%L
* Scenery-backed 3D visualization package for ImageJ.
* %%
* Copyright (C) 2016 - 2018 SciView developers.
* Copyright (C) 2016 - 2020 SciView developers.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down
Loading

0 comments on commit 7bad6d4

Please sign in to comment.