Skip to content

Rand cmap

s204159 requested to merge rand_cmap into main

Created function that creates a rand_cmap object. Set as default for plot_cc function

Link: https://www.notion.so/qim-dtu/Colormaps-for-qim3d-b8500b578dd54278aa03f6a2866df97d?pvs=4

Code to run

import qim3d
qim3d.io.logger.level("info")
#Prepare data
vol = qim3d.examples.cement_128x128x128[50:150]
binary = qim3d.processing.filters.gaussian(vol, 2)<60
binary = qim3d.processing.filters.median(binary, size=6)
qim3d.viz.slices(binary)
cc = qim3d.utils.cc.get_3d_cc(binary)
qim3d.viz.slices(cc.get_cc(), cmap=qim3dCmap(len(cc)), interpolation="none")
qim3d.viz.img.plot_cc(cc, crop=True, show=True, overlay=None, n_slices=5, max_cc_to_plot=5)

Merge request reports

Loading