def __init__(self, axes, model, interpolation="nearest", aspect="auto"):
super(SliceView, self).__init__()
data = np.zeros((1, 1))
self._image = axes.imshow(data, interpolation=interpolation, aspect=aspect, origin='upper')
""" :type: AxesImage """
self._model = model
""" :type: SliceModel """
style = {"fill": False,
"alpha": 1,
"color": 'black',
"linestyle": 'dotted',
"linewidth": 0.75
}
self._vertical_indicator = patches.Rectangle((-0.5, -0.5), 1, model.height, **style)
self._horizontal_indicator = patches.Rectangle((-0.5, -0.5), model.width, 1, **style)
self._zoom_factor = 1.0
self._view_limits = None
self._min_xlim = 0
self._max_xlim = model.width
self._min_ylim = 0
self._max_ylim = model.height
评论列表
文章目录