|
33 | 33 | import graphics.scenery.volumes.Volume; |
34 | 34 | import kotlin.jvm.Volatile; |
35 | 35 | import net.imagej.lut.LUTService; |
| 36 | +import net.imglib2.RandomAccessibleInterval; |
36 | 37 | import net.imglib2.display.ColorTable; |
| 38 | +import net.imglib2.type.numeric.RealType; |
37 | 39 | import org.joml.Quaternionf; |
38 | 40 | import org.joml.Vector3f; |
39 | 41 | import org.joml.Vector4f; |
@@ -391,9 +393,14 @@ public void updateCommandFields() { |
391 | 393 | final MutableModuleItem<String> lutNameItem = getInfo().getMutableInput("colormapName", String.class ); |
392 | 394 | lutNameItem.setChoices( new ArrayList( lutService.findLUTs().keySet() ) ); |
393 | 395 |
|
| 396 | + RandomAccessibleInterval<RealType> rai = (RandomAccessibleInterval<RealType>) currentSceneNode.getMetadata().get("RandomAccessibleInterval"); |
| 397 | + |
394 | 398 | timepoint = ((graphics.scenery.volumes.Volume)currentSceneNode).getCurrentTimepoint(); |
395 | 399 | getInfo().getMutableInput("timepoint", Integer.class).setMinimumValue(0); |
396 | | - getInfo().getMutableInput("timepoint", Integer.class).setMaximumValue(((graphics.scenery.volumes.Volume) currentSceneNode).getMaxTimepoint()); |
| 400 | + getInfo().getMutableInput("timepoint", Integer.class).setMaximumValue( |
| 401 | + rai.numDimensions() > 3 ? |
| 402 | + ((graphics.scenery.volumes.Volume) currentSceneNode).getMaxTimepoint() : |
| 403 | + 0 ); |
397 | 404 |
|
398 | 405 | min = (int)((Volume)currentSceneNode).getConverterSetups().get(0).getDisplayRangeMin(); |
399 | 406 | max = (int)((Volume)currentSceneNode).getConverterSetups().get(0).getDisplayRangeMax(); |
|
0 commit comments