当前位置: 首页>>代码示例>>Python>>正文


Python plot.ImageDialog类代码示例

本文整理汇总了Python中guiqwt.plot.ImageDialog的典型用法代码示例。如果您正苦于以下问题:Python ImageDialog类的具体用法?Python ImageDialog怎么用?Python ImageDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ImageDialog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: create_plot

 def create_plot(self, options, row=0, column=0, rowspan=1, columnspan=1):
     ImageDialog.create_plot(self, options, row, column, rowspan, columnspan)
     ra_panel = ObliqueCrossSection(self)
     splitter = self.plot_widget.xcsw_splitter
     splitter.addWidget(ra_panel)
     splitter.setStretchFactor(splitter.count() - 1, 1)
     splitter.setSizes(list(splitter.sizes()) + [2])
     self.add_panel(ra_panel)
开发者ID:gyenney,项目名称:Tools,代码行数:8,代码来源:cross_section_oblique.py

示例2: create_window

def create_window():
    gridparam = make.gridparam(background="black", minor_enabled=(False, False), major_style=(".", "gray", 1))
    win = ImageDialog(
        edit=False, toolbar=True, wintitle="Region of interest (ROI) test", options=dict(gridparam=gridparam)
    )
    for toolklass in (RectangleTool, EllipseTool, FreeFormTool, PlaceAxesTool):
        win.add_tool(toolklass)
    return win
开发者ID:stonebig,项目名称:guiqwt,代码行数:8,代码来源:imagesuperp.py

示例3: __init__

 def __init__(self, parent, wintitle=None, options=None, resize_to=None):
     if wintitle is None:
         wintitle = _("Rotate & Crop")
     ImageDialog.__init__(self, wintitle=wintitle, edit=True,
                          toolbar=False, options=options, parent=parent)
     if resize_to is not None:
         width, height = resize_to
         self.resize(width, height)
     self.accepted.connect(self.accept_changes)
     self.rejected.connect(self.reject_changes)
开发者ID:alimuldal,项目名称:guiqwt,代码行数:10,代码来源:base.py

示例4: create_window

def create_window():
    gridparam = make.gridparam(background="black",
                               minor_enabled=(False, False),
                               major_style=(".", "gray", 1))
    win = ImageDialog(edit=False, toolbar=True,
                      wintitle="All image and plot tools test",
                      options=dict(gridparam=gridparam))
    for toolklass in (RectangleTool, EllipseTool, SegmentTool,
                      MultiLineTool, FreeFormTool):
        win.add_tool(toolklass, handle_final_shape_cb=customize_shape)
    return win
开发者ID:HaMF,项目名称:guiqwt,代码行数:11,代码来源:customize_shape_tool.py

示例5: create_plot

 def create_plot(self, options):
     self.filter_gbox = DataSetEditGroupBox(_("Filter parameters"),
                                            FilterParam)
     self.filter_gbox.setEnabled(False)
     self.filter_gbox.SIG_APPLY_BUTTON_CLICKED.connect(self.apply_filter)
     self.plot_layout.addWidget(self.filter_gbox, 0, 0)
     self.param_gbox = DataSetShowGroupBox(_("Image parameters"), ImageParam)
     self.plot_layout.addWidget(self.param_gbox, 0, 1)
     
     options = dict(title=_("Image title"), zlabel=_("z-axis scale label"))
     ImageDialog.create_plot(self, options, 1, 0, 1, 0)
开发者ID:alimuldal,项目名称:guiqwt,代码行数:11,代码来源:simple_dialog.py

示例6: test

def test():
    filename = osp.join(osp.dirname(__file__), "mr-brain.dcm")
    image = make.image(filename=filename, title="DICOM img", colormap='gray')
    win = ImageDialog(edit=False, toolbar=True, wintitle="DICOM I/O test",
                      options=dict(show_contrast=True))
    plot = win.get_plot()
    plot.add_item(image)
    plot.select_item(image)
    contrast = win.get_contrast_panel()
    contrast.histogram.eliminate_outliers(54.)
    win.resize(600, 700)
    return win
开发者ID:alimuldal,项目名称:guiqwt,代码行数:12,代码来源:dicom_image.py

示例7: create_window

def create_window():
    win = ImageDialog(edit=False, toolbar=True,
                      wintitle="All image and plot tools test")
    for toolklass in (LabelTool, HRangeTool,
                      VCursorTool, HCursorTool, XCursorTool,
                      SegmentTool, RectangleTool, ObliqueRectangleTool,
                      CircleTool, EllipseTool,
                      MultiLineTool, FreeFormTool, PlaceAxesTool,
                      AnnotatedRectangleTool, AnnotatedObliqueRectangleTool,
                      AnnotatedCircleTool, AnnotatedEllipseTool,
                      AnnotatedSegmentTool, AnnotatedPointTool):
        win.add_tool(toolklass)
    return win
开发者ID:HaMF,项目名称:guiqwt,代码行数:13,代码来源:image_plot_tools.py

示例8: xyimagebug

def xyimagebug(offset):
    from guiqwt.plot import ImageDialog
    from guiqwt.builder import make
    import numpy
    import guidata
    app = guidata.qapplication()
    data = numpy.random.rand(100, 100)
    x = numpy.arange(100)+offset 
    y = numpy.arange(100)
    image = make.xyimage(x, y, data=data)
    win = ImageDialog()
    plot = win.get_plot()
    plot.add_item(image)
    plot.select_item(image) #this helps in seeing where the image should be
    win.exec_()
开发者ID:HaMF,项目名称:guiqwt,代码行数:15,代码来源:highprecisionxy.py

示例9: imshow

def imshow(data, title=None, hold=False):
    dlg = ImageDialog(wintitle=title)
    dlg.get_plot().add_item(make.image(data))
    if hold:
        dlg.show()
    else:
        dlg.exec_()
开发者ID:HaMF,项目名称:guiqwt,代码行数:7,代码来源:rotatecrop.py

示例10: mandel

def mandel():
    win = ImageDialog(edit=True, toolbar=True, wintitle="Mandelbrot",
                      options=dict(yreverse=False))
    mandel = MandelItem(-1.5, .5, -1., 1.)
    win.add_tool(FullScale, mandel)
    plot = win.get_plot()
    plot.set_aspect_ratio(lock=False)
    plot.add_item(mandel)
    plot.set_full_scale(mandel)
    win.show()
    win.exec_()
开发者ID:HaMF,项目名称:guiqwt,代码行数:11,代码来源:mandelbrot.py

示例11: get_segment

def get_segment(item):
    """Show image and return selected segment coordinates"""
    win = ImageDialog(_("Select a segment then press OK to accept"), edit=True)
    default = win.add_tool(SelectTool)
    win.set_default_tool(default)
    segtool = win.add_tool(AnnotatedSegmentTool, title="Test",
                           switch_to_default_tool=True)
    segtool.activate()
    plot = win.get_plot()
    plot.add_item(item)
    plot.set_active_item(item)
    win.show()
    if win.exec_():
        shape = segtool.get_last_final_shape()
        return shape.get_rect()
开发者ID:HaMF,项目名称:guiqwt,代码行数:15,代码来源:get_segment.py

示例12: test

def test():
    win = ImageDialog(edit=True, toolbar=True,
                      wintitle="Sample multi-polygon item")
    plot = win.get_plot()
    plot.set_aspect_ratio(lock=True)
    plot.set_antialiasing(False)
    plot.set_axis_direction('left', False)
    plot.set_axis_title("bottom", "Lon")
    plot.set_axis_title("left", "Lat")
    
    points = []
    offsets = zeros( (NCIRC, 2), int32)
    colors = zeros( (NCIRC, 2), uint32)
    npts = 0
    for k in range(NCIRC):
        pts = create_circle()
        offsets[k, 0] = k
        offsets[k, 1] = npts
        npts += pts.shape[0]
        points.append(pts)
        colors[k, 0] = COLORS[k%len(COLORS)][0]
        colors[k, 1] = COLORS[(3*k)%len(COLORS)][1]
    points = concatenate(points)
    
    print(NCIRC, "Polygons")
    print(points.shape[0], "Points")
    
    crv = PolygonMapItem()
    crv.set_data(points, offsets, colors)
    plot.add_item(crv, z=0)
    win.show()
    win.exec_()
开发者ID:HaMF,项目名称:guiqwt,代码行数:32,代码来源:polygons.py

示例13: imshow

def imshow(items, title=""):
    gridparam = make.gridparam(background="black", minor_enabled=(False, False),
                               major_style=(".", "gray", 1))
    win = ImageDialog(edit=False, toolbar=True, wintitle=title,
                      options=dict(gridparam=gridparam))
    nc = int(np.sqrt(len(items))+1.0)
    maxy = 0
    y = 0
    x = 0
    w = None
    plot = win.get_plot()
    print("-"*80)
    for i, item in enumerate(items):
        h = item.boundingRect().height()
        if i%nc==0:
            x = 0
            y += maxy
            maxy = h
        else:
            x += w
            maxy = max(maxy, h)
        w = item.boundingRect().width()

        item.set_transform(x, y, 0.0)
        print("Adding item #%d..." % i, end=' ')
        plot.add_item(item)
        print("Done")
    win.show()
    win.exec_()
开发者ID:alimuldal,项目名称:guiqwt,代码行数:29,代码来源:transform.py

示例14: Ui_Form

class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(651, 506)
        self.gridLayout = QtGui.QGridLayout(Form)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.imagewidget = ImageDialog()
        self.imagewidget.setOrientation(QtCore.Qt.Vertical)
        self.imagewidget.setObjectName(_fromUtf8("imagewidget"))
        for toolklass in (LabelTool, HRangeTool,
                      VCursorTool, HCursorTool, XCursorTool,
                      SegmentTool, RectangleTool, ObliqueRectangleTool,
                      CircleTool, EllipseTool,
                      MultiLineTool, FreeFormTool, PlaceAxesTool,
                      AnnotatedRectangleTool, AnnotatedObliqueRectangleTool,
                      AnnotatedCircleTool, AnnotatedEllipseTool,
                      AnnotatedSegmentTool, AnnotatedPointTool):
                        self.imagewidget.add_tool(toolklass)
        self.gridLayout.addWidget(self.imagewidget, 0, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        Form.setWindowTitle(_translate("Form", "Form", None))
开发者ID:Jothy,项目名称:RTQA,代码行数:25,代码来源:QWTWidget.py

示例15: imshow

def imshow(filename):
    win = ImageDialog(edit=False, toolbar=True, wintitle="RGB image item test")
    item = make.rgbimage(filename=filename, xdata=[-1, 1], ydata=[-1, 1])
    plot = win.get_plot()
    plot.add_item(item)
    win.show()
    win.exec_()
开发者ID:HaMF,项目名称:guiqwt,代码行数:7,代码来源:image_rgb.py


注:本文中的guiqwt.plot.ImageDialog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。