How to use the roipoly.roipoly.RoiPoly function in roipoly

To help you get started, we’ve selected a few roipoly examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jdoepfert / roipoly.py / roipoly / roipoly.py View on Github external
# Only draw a new ROI if the previous one is completed
        if self.rois:
            if not all(r.completed for r in self.rois.values()):
                return

        count = len(self.rois)
        idx = count % len(self.color_cycle)
        logger.debug("Creating new ROI {}".format(count))
        if self.roi_names is not None and idx < len(self.roi_names):
            roi_name = self.roi_names[idx]
        else:
            roi_name = str(count + 1)

        self.ax.set_title("Draw ROI '{}'".format(roi_name))
        plt.draw()
        roi = RoiPoly(color=self.color_cycle[idx],
                      fig=self.fig,
                      ax=self.ax,
                      close_fig=False,
                      show_fig=False)
        self.rois[roi_name] = roi
github jdoepfert / roipoly.py / roipoly / roipoly.py View on Github external
def roipoly(*args, **kwargs):
    deprecation("Import 'RoiPoly' instead of 'roipoly'!")
    return RoiPoly(*args, **kwargs)

roipoly

Tool to draw regions of interest (ROIs)

Apache-2.0
Latest version published 4 years ago

Package Health Score

39 / 100
Full package analysis

Similar packages