scenerygraphics / sciview

sciview is a tool for visualization and interaction with ND image and mesh data
BSD 2-Clause "Simplified" License
68 stars 17 forks source link

Volume timepoints are not working anymore #309

Closed kephale closed 3 years ago

kephale commented 3 years ago

If you run this script and then try to Play the time series of the volume via the inspector, it does not play.

# @SciView sv

import net.imglib2.img.array.ArrayImgs as ArrayImgs
import bdv.util.BdvFunctions as BdvFunctions

w = 50
h = w
d = w
tmax = 10

img = ArrayImgs.unsignedBytes(w, h, d, tmax)

x = 0
y = 0
z = 0
t = 0

c = img.cursor()
while c.hasNext():
    c.fwd()
    x = c.getFloatPosition(0)
    y = c.getFloatPosition(1)
    z = c.getFloatPosition(2)
    t = c.getFloatPosition(3)

    c.get().setReal(((x%15 + y%15 + z%15) * (t%4))%255)

BdvFunctions.show(img, "test")

sv.addVolume(img)
kephale commented 3 years ago

Not quite true. It is actually the same problem as https://github.com/scenerygraphics/sciview/issues/308

If you disable push mode, then it works again.

skalarproduktraum commented 3 years ago

This issue is fixed in #304.