Exemplo n.º 1
0
 def save_to_stack(self):
     from scikits.image import io
     img = self.arr.copy()
     io.push(img)
     msg = dedent('''
         The image has been pushed to the io stack.
         Use io.pop() to retrieve the most recently
         pushed image.''')
     msglabel = QLabel(msg)
     dialog = QtGui.QDialog()
     ok = QtGui.QPushButton('OK', dialog)
     ok.clicked.connect(dialog.accept)
     ok.setDefault(True)
     dialog.layout = QtGui.QGridLayout(dialog)
     dialog.layout.addWidget(msglabel, 0, 0, 1, 3)
     dialog.layout.addWidget(ok, 1, 1)
     dialog.exec_()
Exemplo n.º 2
0
 def save_to_stack(self):
     from scikits.image import io
     img = self.arr.copy()
     io.push(img)
     msg = dedent('''
         The image has been pushed to the io stack.
         Use io.pop() to retrieve the most recently
         pushed image.''')
     msglabel = QLabel(msg)
     dialog = QtGui.QDialog()
     ok = QtGui.QPushButton('OK', dialog)
     ok.clicked.connect(dialog.accept)
     ok.setDefault(True)
     dialog.layout = QtGui.QGridLayout(dialog)
     dialog.layout.addWidget(msglabel, 0, 0, 1, 3)
     dialog.layout.addWidget(ok, 1, 1)
     dialog.exec_()
Exemplo n.º 3
0
def test_stack_basic():
    x = np.arange(12).reshape(3, 4)
    io.push(x)

    assert_array_equal(io.pop(), x)
Exemplo n.º 4
0
def test_stack_non_array():
    io.push([[1, 2, 3]])
Exemplo n.º 5
0
def test_stack_basic():
    x = np.arange(12).reshape(3, 4)
    io.push(x)

    assert_array_equal(io.pop(), x)
Exemplo n.º 6
0
def test_stack_non_array():
    io.push([[1, 2, 3]])