Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to scenery 0.9.0 #513

Merged
merged 12 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 24 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ import java.net.URL
import sciview.*

plugins {
val ktVersion = "1.8.20"
val dokkaVersion = "1.8.20"

java
kotlin("jvm") version ktVersion
kotlin("kapt") version ktVersion
// Kotlin/Dokka versions are managed in gradle.properties
kotlin("jvm")
kotlin("kapt")
sciview.publish
sciview.sign
id("org.jetbrains.dokka") version dokkaVersion
id("org.jetbrains.dokka")
jacoco
`maven-publish`
`java-library`
Expand All @@ -25,43 +23,48 @@ java {
}

repositories {
if(project.properties["useMavenLocal"] == "true") {
logger.warn("Using local Maven repository as source")
mavenLocal()
}
mavenCentral()
maven("https://maven.scijava.org/content/groups/public")
}

dependencies {
val ktVersion = "1.8.20"
implementation(platform("org.scijava:pom-scijava:31.1.0"))
val scijavaParentPomVersion = project.properties["scijavaParentPOMVersion"]
val ktVersion = project.properties["kotlinVersion"]
implementation(platform("org.scijava:pom-scijava:$scijavaParentPomVersion"))

// Graphics dependencies

annotationProcessor("org.scijava:scijava-common:2.90.0")
kapt("org.scijava:scijava-common:2.90.0") { // MANUAL version increment
// Attention! Manual version increment necessary here!
val scijavaCommonVersion = "2.94.1"
annotationProcessor("org.scijava:scijava-common:$scijavaCommonVersion")
kapt("org.scijava:scijava-common:$scijavaCommonVersion") {
exclude("org.lwjgl")
}

val sceneryVersion = "0.8.0"
val sceneryVersion = "0.9.0"
api("graphics.scenery:scenery:$sceneryVersion") {
version { strictly(sceneryVersion) }
exclude("org.biojava.thirdparty", "forester")
exclude("null", "unspecified")
}

implementation("com.fasterxml.jackson.core:jackson-databind:2.13.4.2")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.4")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.4")
implementation("org.msgpack:jackson-dataformat-msgpack:0.9.3")
implementation("net.java.dev.jna:jna-platform:5.11.0")
implementation("net.clearvolume:cleargl")
implementation("org.janelia.saalfeldlab:n5")
implementation("org.janelia.saalfeldlab:n5-imglib2")
implementation("org.apache.logging.log4j:log4j-api:2.20.0")
implementation("org.apache.logging.log4j:log4j-1.2-api:2.20.0")

implementation("com.formdev:flatlaf:2.6")
implementation("com.formdev:flatlaf")

// SciJava dependencies

implementation("org.yaml:snakeyaml") {
version { strictly("1.33") }
skalarproduktraum marked this conversation as resolved.
Show resolved Hide resolved
}
implementation("org.scijava:scijava-common")
implementation("org.scijava:ui-behaviour")
implementation("org.scijava:script-editor")
Expand Down Expand Up @@ -151,6 +154,7 @@ tasks {
}

withType<GenerateMavenPom>().configureEach {
val scijavaParentPomVersion = project.properties["scijavaParentPOMVersion"]
val matcher = Regex("""generatePomFileFor(\w+)Publication""").matchEntire(name)
val publicationName = matcher?.let { it.groupValues[1] }

Expand All @@ -161,7 +165,7 @@ tasks {
val parent = asNode().appendNode("parent")
parent.appendNode("groupId", "org.scijava")
parent.appendNode("artifactId", "pom-scijava")
parent.appendNode("version", "31.1.0")
parent.appendNode("version", "$scijavaParentPomVersion")
parent.appendNode("relativePath")

val repositories = asNode().appendNode("repositories")
Expand Down Expand Up @@ -435,5 +439,7 @@ artifacts {
archives(dokkaHtmlJar)
}



java.withSourcesJar()

3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ org.gradle.jvmargs=-XX:MaxMetaspaceSize=2g
org.gradle.caching=true
jvmTarget=11
#useLocalScenery=true
kotlinVersion=1.8.22
dokkaVersion=1.8.20
scijavaParentPOMVersion=35.1.1
16 changes: 11 additions & 5 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@

pluginManagement {
val kotlinVersion: String by settings
val dokkaVersion: String by settings

plugins {
kotlin("jvm") version kotlinVersion
kotlin("kapt") version kotlinVersion
id("org.jetbrains.dokka") version dokkaVersion

id("com.github.johnrengelman.shadow") version "8.1.1"
}

repositories {
gradlePluginPortal()
maven("https://raw.githubusercontent.com/kotlin-graphics/mary/master")
}
}

//plugins {
// id("sciJava.catalogs") version "30.0.0+66"
//}

rootProject.name = "sciview"

gradle.rootProject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void run() {
sciView.centerOnNode( sciView.getActiveNode() );

for( PointLight light : sciView.getLights() ) {
Icosphere s = new Icosphere(1f, 1);
Icosphere s = new Icosphere(1f, 1, false);
s.getMaterial().setDiffuse(light.getEmissionColor());
s.getMaterial().setAmbient(light.getEmissionColor());
s.getMaterial().setSpecular(light.getEmissionColor());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private Node makeAxis( float axisLength, float angleX, float angleY, float angle
return null;
});

Icosphere axisCap = new Icosphere(AXESBARRADIUS, 2);
Icosphere axisCap = new Icosphere(AXESBARRADIUS, 2, false);
axisCap.ifSpatial(spatial -> {
spatial.setPosition(new Vector3f(0, axisLength, 0));
return null;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/sc/iview/io/N5IO.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
package sc.iview.io;

import bdv.util.AxisOrder;
import bvv.core.VolumeViewerOptions;
import graphics.scenery.Group;
import graphics.scenery.Node;
import graphics.scenery.primitives.PointCloud;
Expand All @@ -46,7 +47,6 @@
import sc.iview.SciView;
import sc.iview.SciViewService;
import sc.iview.process.MeshConverter;
import tpietzsch.example2.VolumeViewerOptions;

import java.io.File;
import java.io.IOException;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/sc/iview/ui/REPLPane.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public REPLPane(final Context context) {
final JScrollPane outputScroll = new JScrollPane(output);
outputScroll.setPreferredSize(new Dimension(440, 400));

repl = new ScriptREPL(context, output.getOutputStream());
repl = new ScriptREPL(context, "Python (Jython)", output.getOutputStream());
repl.initialize();

final Writer writer = output.getOutputWriter();
Expand All @@ -89,7 +89,7 @@ public REPLPane(final Context context) {
//prompt = new REPLEditor(repl, vars, output);
prompt = new REPLEditor(repl, null, output);
context.inject(prompt);
prompt.setREPLLanguage("Python");

final JScrollPane promptScroll = new JScrollPane(prompt);

final JPanel bottomPane = new JPanel();
Expand Down
8 changes: 3 additions & 5 deletions src/main/kotlin/sc/iview/SciView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ import bdv.util.RandomAccessibleIntervalSource4D
import bdv.util.volatiles.VolatileView
import bdv.viewer.Source
import bdv.viewer.SourceAndConverter
import bvv.core.VolumeViewerOptions
import dev.dirs.ProjectDirectories
import graphics.scenery.*
import graphics.scenery.Scene.RaycastResult
import graphics.scenery.backends.Renderer
import graphics.scenery.backends.opengl.OpenGLRenderer
import graphics.scenery.backends.vulkan.VulkanRenderer
import graphics.scenery.controls.InputHandler
import graphics.scenery.controls.OpenVRHMD
Expand Down Expand Up @@ -110,7 +110,6 @@ import sc.iview.ui.CustomPropertyUI
import sc.iview.ui.MainWindow
import sc.iview.ui.SwingMainWindow
import sc.iview.ui.TaskManager
import tpietzsch.example2.VolumeViewerOptions
import java.awt.event.WindowListener
import java.io.IOException
import java.net.URL
Expand Down Expand Up @@ -388,10 +387,9 @@ class SciView : SceneryBase, CalibratedRealInterval<CalibratedAxis> {
versionString = versionString.substring(0, 5)
val launcherVersion = Version(versionString)
val nonWorkingVersion = Version("4.0.5")
if (launcherVersion.compareTo(nonWorkingVersion) <= 0
if (launcherVersion <= nonWorkingVersion
skalarproduktraum marked this conversation as resolved.
Show resolved Hide resolved
&& !java.lang.Boolean.parseBoolean(System.getProperty("sciview.DisableLauncherVersionCheck", "false"))) {
logger.info("imagej-launcher version smaller or equal to non-working version ($versionString vs. 4.0.5), disabling Vulkan as rendering backend. Disable check by setting 'scenery.DisableLauncherVersionCheck' system property to 'true'.")
System.setProperty("scenery.Renderer", "OpenGLRenderer")
throw IllegalStateException("imagej-launcher version is outdated, please update your Fiji installation.")
} else {
logger.info("imagej-launcher version bigger that non-working version ($versionString vs. 4.0.5), all good.")
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/sc/iview/commands/edit/Properties.kt
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@ class Properties : InteractiveCommand() {

if (node is Line){
edgeWidth = node.edgeWidth.toInt()
} else {
maybeRemoveInput("edgeWidth", java.lang.Integer::class.java)
}

name = node.name
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/sc/iview/ui/SwingGroupingInputHarvester.kt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class SwingGroupingInputHarvester : SwingInputHarvester() {
if(panel.component.isVisible) {
label.text = "<html><strong>▼ ${group.key}</strong></html>"
} else {
label.text = "<html><strong> ${group.key}</strong></html>"
label.text = """<html><strong><span style="color: gray;">▶</span> ${group.key}</strong></html>"""
}
inputPanel.component.revalidate()
}
Expand Down
Loading
Loading