Skip to content

Commit

Permalink
Merge pull request #542 from scenerygraphics/volume-dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
kephale authored Jul 27, 2023
2 parents 3ab78d2 + 7347f08 commit 7227a02
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/main/kotlin/sc/iview/commands/edit/Properties.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import net.imglib2.display.ColorTable
import org.joml.Quaternionf
import org.joml.Vector3f
import org.joml.Vector4f
import org.scijava.ItemVisibility
import org.scijava.command.Command
import org.scijava.command.InteractiveCommand
import org.scijava.event.EventService
Expand Down Expand Up @@ -156,6 +157,15 @@ class Properties : InteractiveCommand() {
@Parameter(label = "Volume slicing mode", callback = "updateNodeProperties", style = ChoiceWidget.LIST_BOX_STYLE+"group:Volume")
private var slicingMode: String = Volume.SlicingMode.Slicing.name

@Parameter(label = "Width", callback = "updateNodeProperties", visibility = ItemVisibility.MESSAGE, style = "group:Volume")
private var width: Int = 0

@Parameter(label = "Height", callback = "updateNodeProperties", visibility = ItemVisibility.MESSAGE, style = "group:Volume")
private var height: Int = 0

@Parameter(label = "Depth", callback = "updateNodeProperties", visibility = ItemVisibility.MESSAGE, style = "group:Volume")
private var depth: Int = 0

/* Light properties */

@Parameter(label = "Intensity", style = NumberWidget.SPINNER_STYLE+ ",group:Lighting", stepSize = "0.1", callback = "updateNodeProperties")
Expand Down Expand Up @@ -393,6 +403,10 @@ class Properties : InteractiveCommand() {
log.error("Could not load LUT $colormapName")
}

width = node.getDimensions().x
height = node.getDimensions().y
depth = node.getDimensions().z

min = node.converterSetups[0].displayRangeMin.toInt()
max = node.converterSetups[0].displayRangeMax.toInt()

Expand All @@ -418,6 +432,9 @@ class Properties : InteractiveCommand() {
maybeRemoveInput("colormapName", String::class.java)
maybeRemoveInput("playPauseButton", Button::class.java)
maybeRemoveInput("playSpeed", java.lang.Integer::class.java)
maybeRemoveInput("width", java.lang.Integer::class.java)
maybeRemoveInput("height", java.lang.Integer::class.java)
maybeRemoveInput("depth", java.lang.Integer::class.java)
}

if (node is PointLight) {
Expand Down

0 comments on commit 7227a02

Please sign in to comment.