From 6b4079eb7ef512270930d38f838b0b0b78955401 Mon Sep 17 00:00:00 2001 From: Kyle IS Harrington Date: Wed, 16 Sep 2020 12:28:31 -0400 Subject: [PATCH 1/2] Fix max value for timepoint in the case of 3 dimensions --- src/main/java/sc/iview/commands/edit/Properties.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/sc/iview/commands/edit/Properties.java b/src/main/java/sc/iview/commands/edit/Properties.java index 09103cbd..0bd1a18a 100644 --- a/src/main/java/sc/iview/commands/edit/Properties.java +++ b/src/main/java/sc/iview/commands/edit/Properties.java @@ -33,7 +33,9 @@ import graphics.scenery.volumes.Volume; import kotlin.jvm.Volatile; import net.imagej.lut.LUTService; +import net.imglib2.RandomAccessibleInterval; import net.imglib2.display.ColorTable; +import net.imglib2.type.numeric.RealType; import org.joml.Quaternionf; import org.joml.Vector3f; import org.joml.Vector4f; @@ -391,9 +393,14 @@ public void updateCommandFields() { final MutableModuleItem lutNameItem = getInfo().getMutableInput("colormapName", String.class ); lutNameItem.setChoices( new ArrayList( lutService.findLUTs().keySet() ) ); + RandomAccessibleInterval rai = (RandomAccessibleInterval) currentSceneNode.getMetadata().get("RandomAccessibleInterval"); + timepoint = ((graphics.scenery.volumes.Volume)currentSceneNode).getCurrentTimepoint(); getInfo().getMutableInput("timepoint", Integer.class).setMinimumValue(0); - getInfo().getMutableInput("timepoint", Integer.class).setMaximumValue(((graphics.scenery.volumes.Volume) currentSceneNode).getMaxTimepoint()); + getInfo().getMutableInput("timepoint", Integer.class).setMaximumValue( + rai.numDimensions() > 3 ? + ((graphics.scenery.volumes.Volume) currentSceneNode).getMaxTimepoint() : + 0 ); min = (int)((Volume)currentSceneNode).getConverterSetups().get(0).getDisplayRangeMin(); max = (int)((Volume)currentSceneNode).getConverterSetups().get(0).getDisplayRangeMax(); From 8f179959971fda2e1caa25e01f9dc4d1733ee771 Mon Sep 17 00:00:00 2001 From: Kyle IS Harrington Date: Sun, 4 Oct 2020 15:38:11 +0200 Subject: [PATCH 2/2] Move kotlin demo into kotlin source dir --- .../sc/iview/commands/demo/LoadCremiDatasetAndNeurons.kt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/{java => kotlin}/sc/iview/commands/demo/LoadCremiDatasetAndNeurons.kt (100%) diff --git a/src/main/java/sc/iview/commands/demo/LoadCremiDatasetAndNeurons.kt b/src/main/kotlin/sc/iview/commands/demo/LoadCremiDatasetAndNeurons.kt similarity index 100% rename from src/main/java/sc/iview/commands/demo/LoadCremiDatasetAndNeurons.kt rename to src/main/kotlin/sc/iview/commands/demo/LoadCremiDatasetAndNeurons.kt