Skip to content

Commit

Permalink
Merge pull request #292 from scenerygraphics/volume-timepoint
Browse files Browse the repository at this point in the history
Volume timepoint
  • Loading branch information
kephale authored Oct 4, 2020
2 parents 1312c73 + 8f17995 commit 17bb3ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/sc/iview/commands/edit/Properties.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -391,9 +393,14 @@ public void updateCommandFields() {
final MutableModuleItem<String> lutNameItem = getInfo().getMutableInput("colormapName", String.class );
lutNameItem.setChoices( new ArrayList( lutService.findLUTs().keySet() ) );

RandomAccessibleInterval<RealType> rai = (RandomAccessibleInterval<RealType>) 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();
Expand Down

0 comments on commit 17bb3ab

Please sign in to comment.