Skip to content
Snippets Groups Projects
Commit d60208df authored by Tamino Huxohl's avatar Tamino Huxohl
Browse files

add custom color map to visualization script

parent 32eabd9b
No related branches found
No related tags found
No related merge requests found
......@@ -101,11 +101,15 @@ for _id in ids:
return np.where(mask, _img, black)
cm_plasma = mlp.colormaps["plasma"]
cm_prism_data = pd.read_csv("data/color_maps/PrismOeyn.cm")
cm_prism = mlp.colors.ListedColormap(cm_prism_data.values / 255.0)
cm_divergent = mlp.colormaps["RdYlBu"].reversed()
axs[0, 0].imshow(colormap_and_mask(baseline, cm_plasma))
axs[0, 0].imshow(colormap_and_mask(baseline, cm_prism))
axs[0, 0].set_title("AC" if args.baseline == "symbia" else "AC - CT")
for i, (recon, diff, label) in enumerate(zip(recons, diffs, labels), start=1):
axs[0, i].imshow(colormap_and_mask(recon, cm_plasma))
axs[0, i].imshow(colormap_and_mask(recon, cm_prism))
axs[0, i].set_title(label)
axs[1, i].imshow(colormap_and_mask(diff, cm_divergent))
......@@ -113,12 +117,12 @@ for _id in ids:
mlp.cm.ScalarMappable(
norm=mlp.colors.Normalize(vmin=diff_min, vmax=diff_max), cmap=cm_divergent
),
ax=axs[1, 1:4],
ax=axs[1],
)
fig.colorbar(
mlp.cm.ScalarMappable(
norm=mlp.colors.Normalize(vmin=0, vmax=100), cmap=cm_plasma
norm=mlp.colors.Normalize(vmin=0, vmax=100), cmap=cm_prism
),
ax=axs[0, 1:4]
ax=axs[0]
)
plt.show()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment