|
28 | 28 | */ |
29 | 29 | package sc.iview.commands.edit |
30 | 30 |
|
31 | | -import bdv.viewer.SourceAndConverter |
32 | 31 | import graphics.scenery.* |
33 | 32 | import graphics.scenery.volumes.Colormap.Companion.fromColorTable |
34 | 33 | import graphics.scenery.volumes.Volume |
35 | 34 | import net.imagej.lut.LUTService |
36 | | -import net.imglib2.RandomAccessibleInterval |
37 | 35 | import net.imglib2.display.ColorTable |
38 | | -import net.imglib2.type.numeric.RealType |
39 | 36 | import org.joml.Quaternionf |
40 | 37 | import org.joml.Vector3f |
41 | 38 | import org.joml.Vector4f |
@@ -90,95 +87,95 @@ class Properties : InteractiveCommand() { |
90 | 87 | @Parameter(required = false, style = ChoiceWidget.LIST_BOX_STYLE, callback = "refreshSceneNodeInDialog") |
91 | 88 | private val sceneNode: String? = null |
92 | 89 |
|
93 | | - @Parameter(label = "[Basic]Visible", callback = "updateNodeProperties") |
| 90 | + @Parameter(label = "Visible", callback = "updateNodeProperties", style = "group:Basic") |
94 | 91 | private var visible = false |
95 | 92 |
|
96 | | - @Parameter(label = "[Basic]Color", required = false, callback = "updateNodeProperties") |
| 93 | + @Parameter(label = "Color", required = false, callback = "updateNodeProperties", style = "group:Basic") |
97 | 94 | private var colour: ColorRGB? = null |
98 | 95 |
|
99 | | - @Parameter(label = "[Camera]Active", required = false, callback = "updateNodeProperties") |
| 96 | + @Parameter(label = "Active", required = false, callback = "updateNodeProperties", style = "group:Camera") |
100 | 97 | private var active = false |
101 | 98 |
|
102 | | - @Parameter(label = "[Basic]Name", callback = "updateNodeProperties") |
| 99 | + @Parameter(label = "Name", callback = "updateNodeProperties", style = "group:Basic") |
103 | 100 | private var name: String = "" |
104 | 101 |
|
105 | | - @Parameter(label = "[Volume]Timepoint", callback = "updateNodeProperties", style = NumberWidget.SLIDER_STYLE) |
| 102 | + @Parameter(label = "Timepoint", callback = "updateNodeProperties", style = NumberWidget.SLIDER_STYLE+"group:Volume") |
106 | 103 | private var timepoint = 0 |
107 | 104 |
|
108 | | - @Parameter(label = "[Volume]Play", callback = "playTimeSeries") |
| 105 | + @Parameter(label = "Play", callback = "playTimeSeries", style = "group:Volume") |
109 | 106 | private var playPauseButton: Button? = null |
110 | 107 |
|
111 | 108 | @Volatile |
112 | | - @Parameter(label = "[Volume]Speed", min = "1", max = "10", style = NumberWidget.SCROLL_BAR_STYLE, persist = false) |
| 109 | + @Parameter(label = "Speed", min = "1", max = "10", style = NumberWidget.SCROLL_BAR_STYLE + ",group:Volume", persist = false) |
113 | 110 | private var playSpeed = 4 |
114 | 111 |
|
115 | | - @Parameter(label = "[Volume]Min", callback = "updateNodeProperties") |
| 112 | + @Parameter(label = "Min", callback = "updateNodeProperties", style = "group:Volume") |
116 | 113 | private var min = 0 |
117 | 114 |
|
118 | | - @Parameter(label = "[Volume]Max", callback = "updateNodeProperties") |
| 115 | + @Parameter(label = "Max", callback = "updateNodeProperties", style = "group:Volume") |
119 | 116 | private var max = 255 |
120 | 117 |
|
121 | | - @Parameter(label = "[Volume]Color map", choices = [], callback = "updateNodeProperties") |
| 118 | + @Parameter(label = "Color map", choices = [], callback = "updateNodeProperties", style = "group:Volume") |
122 | 119 | private var colormapName: String = "Red" |
123 | 120 |
|
124 | | - @Parameter(label = "[Volume] ") |
| 121 | + @Parameter(label = " ", style = "group:Volume") |
125 | 122 | private var colormap = dummyColorTable |
126 | 123 |
|
127 | | - @Parameter(label = "[Lighting]Intensity", style = NumberWidget.SPINNER_STYLE, stepSize = "0.1", callback = "updateNodeProperties") |
| 124 | + @Parameter(label = "Intensity", style = NumberWidget.SPINNER_STYLE+ ",group:Lighting", stepSize = "0.1", callback = "updateNodeProperties") |
128 | 125 | private var intensity = 0f |
129 | 126 |
|
130 | | - @Parameter(label = "[Basic]Position X", style = NumberWidget.SPINNER_STYLE, stepSize = "0.1", callback = "updateNodeProperties") |
| 127 | + @Parameter(label = "Position X", style = NumberWidget.SPINNER_STYLE+ ",group:Basic", stepSize = "0.1", callback = "updateNodeProperties") |
131 | 128 | private var positionX = 0f |
132 | 129 |
|
133 | | - @Parameter(label = "[Basic]Position Y", style = NumberWidget.SPINNER_STYLE, stepSize = "0.1", callback = "updateNodeProperties") |
| 130 | + @Parameter(label = "Position Y", style = NumberWidget.SPINNER_STYLE+ ",group:Basic", stepSize = "0.1", callback = "updateNodeProperties") |
134 | 131 | private var positionY = 0f |
135 | 132 |
|
136 | | - @Parameter(label = "[Basic]Position Z", style = NumberWidget.SPINNER_STYLE, stepSize = "0.1", callback = "updateNodeProperties") |
| 133 | + @Parameter(label = "Position Z", style = NumberWidget.SPINNER_STYLE+ ",group:Lighting", stepSize = "0.1", callback = "updateNodeProperties") |
137 | 134 | private var positionZ = 0f |
138 | 135 |
|
139 | | - @Parameter(label = "[Rotation & Scaling]Scale X", style = NumberWidget.SPINNER_STYLE, stepSize = "0.1", callback = "updateNodeProperties") |
| 136 | + @Parameter(label = "[Rotation & Scaling]Scale X", style = NumberWidget.SPINNER_STYLE+"group:Rotation & Scaling", stepSize = "0.1", callback = "updateNodeProperties") |
140 | 137 | private var scaleX = 1f |
141 | 138 |
|
142 | | - @Parameter(label = "[Rotation & Scaling]Scale Y", style = NumberWidget.SPINNER_STYLE, stepSize = "0.1", callback = "updateNodeProperties") |
| 139 | + @Parameter(label = "[Rotation & Scaling]Scale Y", style = NumberWidget.SPINNER_STYLE+"group:Rotation & Scaling", stepSize = "0.1", callback = "updateNodeProperties") |
143 | 140 | private var scaleY = 1f |
144 | 141 |
|
145 | | - @Parameter(label = "[Rotation & Scaling]Scale Z", style = NumberWidget.SPINNER_STYLE, stepSize = "0.1", callback = "updateNodeProperties") |
| 142 | + @Parameter(label = "[Rotation & Scaling]Scale Z", style = NumberWidget.SPINNER_STYLE+"group:Rotation & Scaling", stepSize = "0.1", callback = "updateNodeProperties") |
146 | 143 | private var scaleZ = 1f |
147 | 144 |
|
148 | | - @Parameter(label = "[Rotation & Scaling]Rotation Phi", style = NumberWidget.SPINNER_STYLE, min = PI_NEG, max = PI_POS, stepSize = "0.01", callback = "updateNodeProperties") |
| 145 | + @Parameter(label = "[Rotation & Scaling]Rotation Phi", style = NumberWidget.SPINNER_STYLE+"group:Rotation & Scaling", min = PI_NEG, max = PI_POS, stepSize = "0.01", callback = "updateNodeProperties") |
149 | 146 | private var rotationPhi = 0f |
150 | 147 |
|
151 | | - @Parameter(label = "[Rotation & Scaling]Rotation Theta", style = NumberWidget.SPINNER_STYLE, min = PI_NEG, max = PI_POS, stepSize = "0.01", callback = "updateNodeProperties") |
| 148 | + @Parameter(label = "[Rotation & Scaling]Rotation Theta", style = NumberWidget.SPINNER_STYLE+"group:Rotation & Scaling", min = PI_NEG, max = PI_POS, stepSize = "0.01", callback = "updateNodeProperties") |
152 | 149 | private var rotationTheta = 0f |
153 | 150 |
|
154 | | - @Parameter(label = "[Rotation & Scaling]Rotation Psi", style = NumberWidget.SPINNER_STYLE, min = PI_NEG, max = PI_POS, stepSize = "0.01", callback = "updateNodeProperties") |
| 151 | + @Parameter(label = "[Rotation & Scaling]Rotation Psi", style = NumberWidget.SPINNER_STYLE+"group:Rotation & Scaling", min = PI_NEG, max = PI_POS, stepSize = "0.01", callback = "updateNodeProperties") |
155 | 152 | private var rotationPsi = 0f |
156 | 153 |
|
157 | 154 | /* Volume properties */ |
158 | | - @Parameter(label = "[Volume]Rendering Mode", style = ChoiceWidget.LIST_BOX_STYLE, callback = "updateNodeProperties") |
| 155 | + @Parameter(label = "Mode", style = ChoiceWidget.LIST_BOX_STYLE+"group:Volume", callback = "updateNodeProperties") |
159 | 156 | private var renderingMode: String = Volume.RenderingMethod.AlphaBlending.name |
160 | 157 |
|
161 | | - @Parameter(label = "[Volume]AO steps", style = NumberWidget.SPINNER_STYLE, callback = "updateNodeProperties") |
| 158 | + @Parameter(label = "AO steps", style = NumberWidget.SPINNER_STYLE+"group:Volume", callback = "updateNodeProperties") |
162 | 159 | private val occlusionSteps = 0 |
163 | 160 |
|
164 | 161 | /* Bounding Grid properties */ |
165 | | - @Parameter(label = "[Grid]Grid Color", callback = "updateNodeProperties") |
| 162 | + @Parameter(label = "Grid Color", callback = "updateNodeProperties", style = "group:Grid") |
166 | 163 | private var gridColor: ColorRGB? = null |
167 | 164 |
|
168 | | - @Parameter(label = "[Grid]Ticks only", callback = "updateNodeProperties") |
| 165 | + @Parameter(label = "Ticks only", callback = "updateNodeProperties", style = "group:Grid") |
169 | 166 | private var ticksOnly = false |
170 | 167 |
|
171 | 168 | /* TextBoard properties */ |
172 | | - @Parameter(label = "[Text]Text", callback = "updateNodeProperties") |
| 169 | + @Parameter(label = "Text", callback = "updateNodeProperties", style = "group:Text") |
173 | 170 | private var text: String? = null |
174 | 171 |
|
175 | | - @Parameter(label = "[Text]Text Color", callback = "updateNodeProperties") |
| 172 | + @Parameter(label = "Text Color", callback = "updateNodeProperties", style = "group:Text") |
176 | 173 | private var fontColor: ColorRGB? = null |
177 | 174 |
|
178 | | - @Parameter(label = "[Text]Background Color", callback = "updateNodeProperties") |
| 175 | + @Parameter(label = "Background Color", callback = "updateNodeProperties", style = "group:Text") |
179 | 176 | private var backgroundColor: ColorRGB? = null |
180 | 177 |
|
181 | | - @Parameter(label = "[Text]Transparent Background", callback = "updateNodeProperties") |
| 178 | + @Parameter(label = "Transparent Background", callback = "updateNodeProperties", style = "group:Text") |
182 | 179 | private var transparentBackground = false |
183 | 180 | private val renderingModeChoices = Arrays.asList(*Volume.RenderingMethod.values()) |
184 | 181 | var fieldsUpdating = true |
|
0 commit comments