def showBoundary(self,color=None,linewidth=3,ax=None):
"""Shows ROI in a 2D plot.
If no color is specified, will use color specified in ``ROI.color``.
Keyword Args:
ax (matplotlib.axes): Matplotlib axes used for plotting. If not specified, will generate new one.
color (str): Color of plot.
linewidth (float): Linewidth of plot.
Returns:
matplotlib.axes: Axes used for plotting.
"""
if color==None:
color=self.color
if ax==None:
fig,axes = pyfrp_plot_module.makeSubplot([1,1],titles=["boundary"],sup=self.name+" boundary")
ax = axes[0]
img=np.nan*np.ones((self.embryo.dataResPx,self.embryo.dataResPx))
ax.imshow(img)
patch = ptc.Circle(self.center,self.radius,fill=False,linewidth=linewidth,color=color)
ax.add_patch(patch)
return ax
评论列表
文章目录