get_mask_bounds(nibabel.Nifti1Image(not_mask.astype(np.int),
affine))
data_2d_list = []
for display_ax in self.axes.itervalues():
try:
data_2d = display_ax.transform_2d(data, affine)
except IndexError:
// We are cutting outside the indices of the data
data_2d = None
data_2d_list.append(data_2d)
if kwargs.get("vmin") is None or kwargs.get("vmax") is None:
if "vmin" not in kwargs:
kwargs["vmin"] = max(d.min() for d in data_2d_list
if d is not None)
if "vmax" not in kwargs:
kwargs["vmax"] = max(d.max() for d in data_2d_list
if d is not None)
bounding_box = (xmin_, xmax_), (ymin_, ymax_), (zmin_, zmax_)
ims = []
to_iterate_over = itertools.izip(self.axes.itervalues(), data_2d_list)
for display_ax, data_2d in to_iterate_over:
if data_2d is not None:
im = display_ax.draw_2d(data_2d, data_bounds, bounding_box,
type=type, **kwargs)