Example #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_()
Example #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_()
Example #3
0
def test_stack_basic():
    x = np.arange(12).reshape(3, 4)
    io.push(x)

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

    assert_array_equal(io.pop(), x)
Example #6
0
def test_stack_non_array():
    io.push([[1, 2, 3]])