コード例 #1
0
ファイル: history.py プロジェクト: alfonsodiecko/PYTHON_DIST
    def save_to_stack(self):
        image = self.plugin.filtered_image.copy()
        io.push(image)

        msg = dedent('''\
            The image has been pushed to the io stack.
            Use io.pop() to retrieve the most recently pushed image.
            NOTE: The io stack only works in interactive sessions.''')
        notify(msg)
コード例 #2
0
ファイル: skivi.py プロジェクト: aeweiwi/scikit-image
 def save_to_stack(self):
     from skimage 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_()
コード例 #3
0
ファイル: test_io.py プロジェクト: ThomasWalter/scikit-image
def test_stack_non_array():
    with testing.raises(ValueError):
        io.push([[1, 2, 3]])
コード例 #4
0
ファイル: test_io.py プロジェクト: ThomasWalter/scikit-image
def test_stack_basic():
    x = np.arange(12).reshape(3, 4)
    io.push(x)

    assert_array_equal(io.pop(), x)
コード例 #5
0
ファイル: test_io.py プロジェクト: Autodidact24/scikit-image
def test_stack_non_array():
    io.push([[1, 2, 3]])
コード例 #6
0
def test_stack_non_array():
    with testing.raises(ValueError):
        io.push([[1, 2, 3]])
コード例 #7
0
def test_stack_basic():
    x = np.arange(12).reshape(3, 4)
    io.push(x)

    assert_array_equal(io.pop(), x)
コード例 #8
0
ファイル: test_io.py プロジェクト: nitishb/scikit-image
def test_stack_non_array():
    io.push([[1, 2, 3]])