def hist_multi_channel(self, locs):
oversampling = self.parameters_dialog.oversampling.value()
self.oversampling = oversampling
if locs is None:
locs = self.locs
n_channels = len(locs)
hues = np.arange(0, 1, 1 / n_channels)
colors = [colorsys.hsv_to_rgb(_, 1, 1) for _ in hues]
renderings = []
for i in range(n_channels):
if self.dataset_dialog.checks[i].isChecked():
renderings.append(render.render_hist3d(locs[i], oversampling, self.t_min, self.t_min, self.t_max, self.t_max, self.z_min, self.z_max, self.pixelsize))
n_locs = sum([_[0] for _ in renderings])
images = np.array([_[1] for _ in renderings])
pixmap1 = self.pixmap_from_colors(images,colors,2)
pixmap2 = self.pixmap_from_colors(images,colors,0)
pixmap3 = self.pixmap_from_colors(images,colors,1)
return pixmap1, pixmap2, pixmap3
评论列表
文章目录