コード例 #1
0
        hit['BBox'] = (hit['BBox'][0] + dX, hit['BBox'][1] + dY,
                       hit['BBox'][2], hit['BBox'][3])

    if show_roi:
        roi = Roi(*hit['BBox'])
        roi.setName(hit['TemplateName'])
        rm.addRoi(roi)

    if show_table:
        Xcorner, Ycorner = hit['BBox'][0], hit['BBox'][1]
        Xcenter, Ycenter = CornerToCenter(Xcorner, Ycorner, hit['BBox'][2],
                                          hit['BBox'][3])
        Dico = {
            "Image": ImageName,
            'Template': hit['TemplateName'],
            'Xcorner': Xcorner,
            'Ycorner': Ycorner,
            'Xcenter': Xcenter,
            'Ycenter': Ycenter,
            'Score': hit['Score']
        }
        AddToTable(Table,
                   Dico,
                   Order=("Image", "Template", "Score", "Xcorner", "Ycorner",
                          "Xcenter", "Ycenter"))

## Finally update display
if show_roi: IJ.selectWindow(ImageName)
if show_table:
    Table.show("Results")
コード例 #2
0
                                                  hit['BBox'][3])

                Dico = {
                    'Image': hit['ImageName'],
                    'Slice': i,
                    'Template': hit['TemplateName'],
                    'Xcorner': Xcorner,
                    'Ycorner': Ycorner,
                    'Xcenter': Xcenter,
                    'Ycenter': Ycenter,
                    'Score': hit['Score']
                }  # column order is defined below

                if add_roi:
                    # Add ROI index to the result table
                    Dico['Roi Index'] = rm.getCount()
                    AddToTable(Table,
                               Dico,
                               Order=("Image", "Slice", "Template", "Score",
                                      "Roi Index", "Xcorner", "Ycorner",
                                      "Xcenter", "Ycenter"))
                else:
                    AddToTable(Table,
                               Dico,
                               Order=("Image", "Slice", "Template", "Score",
                                      "Xcorner", "Ycorner", "Xcenter",
                                      "Ycenter"))

    # Display result table
    if show_table:
        Table.show("Results")
コード例 #3
0
            Xcenter, Ycenter = CornerToCenter(Xcorner, Ycorner, hit['BBox'][2],
                                              hit['BBox'][3])

            Dico = {
                'Image': ImName,
                'Template': hit['TemplateName'],
                'Xcorner': Xcorner,
                'Ycorner': Ycorner,
                'Xcenter': Xcenter,
                'Ycenter': Ycenter,
                'Score': hit['Score']
            }
            if add_roi:
                Dico['Roi Index'] = rm.getCount()
                AddToTable(Table,
                           Dico,
                           Order=("Image", "Template", "Score", "Roi Index",
                                  "Xcorner", "Ycorner", "Xcenter", "Ycenter"))
            else:
                AddToTable(Table,
                           Dico,
                           Order=('Image', 'Template', 'Score', 'Xcorner',
                                  'Ycorner', 'Xcenter', 'Ycenter'))

            Table.show("Results")

    ## Display outputs
    if show_images:

        # Initialise a stack of proper size if not the case before
        if Stack_Image.getSize() == 0:
            Stack_Image = ImageStack(