Exemplo n.º 1
0
def imsave(filename, img):
    # we can add support for other than 3D uint8 here...
    img = prepare_for_display(img)
    qimg = QImage(img.data, img.shape[1], img.shape[0], img.strides[0],
                  QImage.Format_RGB888)
    saved = qimg.save(filename)
    if not saved:
        from textwrap import dedent
        msg = dedent('''The image was not saved. Allowable file formats
            for the QT imsave plugin are:
            BMP, JPG, JPEG, PNG, PPM, TIFF, XBM, XPM''')
        raise RuntimeError(msg)
Exemplo n.º 2
0
def imsave(filename, img):
    # we can add support for other than 3D uint8 here...
    img = prepare_for_display(img)
    qimg = QImage(img.data, img.shape[1], img.shape[0],
                          img.strides[0], QImage.Format_RGB888)
    saved = qimg.save(filename)
    if not saved:
        from textwrap import dedent
        msg = dedent(
            '''The image was not saved. Allowable file formats
            for the QT imsave plugin are:
            BMP, JPG, JPEG, PNG, PPM, TIFF, XBM, XPM''')
        raise RuntimeError(msg)
Exemplo n.º 3
0
def imshow(arr, fancy=False):
    global app
    if not app:
        app = QApplication([])

    arr = prepare_for_display(arr)

    if not fancy:
        iw = ImageWindow(arr, window_manager)
    else:
        from scivi import SciviImageWindow
        iw = SciviImageWindow(arr, window_manager)

    iw.show()
Exemplo n.º 4
0
def imshow(arr, fancy=False):
    global app
    if not app:
        app = QApplication([])

    arr = prepare_for_display(arr)

    if not fancy:
        iw = ImageWindow(arr, window_manager)
    else:
        from scivi import SciviImageWindow
        iw = SciviImageWindow(arr, window_manager)

    iw.show()
Exemplo n.º 5
0
        def imshow(arr):
            arr = prepare_for_display(arr)

            iw = ImageWindow(arr, window_manager)
            iw.show()
Exemplo n.º 6
0
        def imshow(arr):
            arr = prepare_for_display(arr)

            iw = ImageWindow(arr, window_manager)
            iw.show()
Exemplo n.º 7
0
 def update_image(self):
     arr = prepare_for_display(self.image_data[self.counter])