Ejemplo n.º 1
0
 def addRandomLayer():
     o = Layer()
     o.name = "Layer %d" % (model.rowCount()+1)
     o.opacity = numpy.random.rand()
     o.visible = bool(numpy.random.randint(0,2))
     model.append(o)
Ejemplo n.º 2
0
 def addRandomLayer():
     o = Layer([ConstantSource()])
     o.name = "Layer %d" % (model.rowCount() + 1)
     o.opacity = numpy.random.rand()
     o.visible = bool(numpy.random.randint(0, 2))
     model.append(o)
Ejemplo n.º 3
0
if __name__ == "__main__":
    #make the program quit on Ctrl+C
    import signal
    signal.signal(signal.SIGINT, signal.SIG_DFL)

    import sys, numpy

    from PyQt4.QtGui import QApplication, QPushButton, QHBoxLayout, QVBoxLayout
    from volumina.pixelpipeline.datasources import ArraySource

    app = QApplication(sys.argv)

    model = LayerStackModel()

    o1 = Layer()
    o1.name = "Fancy Layer"
    o1.opacity = 0.5
    model.append(o1)

    o2 = Layer()
    o2.name = "Some other Layer"
    o2.opacity = 0.25
    model.append(o2)

    o3 = Layer()
    o3.name = "Invisible Layer"
    o3.opacity = 0.15
    o3.visible = False
    model.append(o3)

    o4 = Layer()
Ejemplo n.º 4
0
    # make the program quit on Ctrl+C
    import signal

    signal.signal(signal.SIGINT, signal.SIG_DFL)

    import sys, numpy

    from PyQt5.QtWidgets import QPushButton, QHBoxLayout, QVBoxLayout
    from volumina.pixelpipeline.datasources import ArraySource, ConstantSource

    app = QApplication(sys.argv)

    model = LayerStackModel()

    o1 = Layer([ConstantSource()])
    o1.name = "Fancy Layer"
    o1.opacity = 0.5
    model.append(o1)

    o2 = Layer([ConstantSource()])
    o2.name = "Some other Layer"
    o2.opacity = 0.25
    o2.numberOfChannels = 3
    model.append(o2)

    o3 = Layer([ConstantSource()])
    o3.name = "Invisible Layer"
    o3.opacity = 0.15
    o3.visible = False
    model.append(o3)