Multidimensional (4D) color conversion

I have 3 3D numpy arrays of shape 600 x 600 x 200 representing the X, Y, Z directions. The arrays contain 3D dip azimuth, dip magnitude, and edge intensity calculated from a geophysical dataset.

I would like to stack them into a 4D array of shape 600x600x600x3 where azimuth is Hue, dip is Saturation, and edge is Value.

Question : Would color skimage.color. hsv2rg take this 4D array as input and convert it to RGB?


My goal is to then split the 3 R,G,B arrays and load them into a commercial software where I can visualize them using RGB blending?




Yes, hsv2rgb will do this.

As a shameless plug, you might not need to plug them into commercial software. You can use napari.

import napari

with napari.gui_qt():
        rgb_volume, channel_axis=-1, colormap=['red', 'green', 'blue']
1 Like

Thanks Juan
The commercial software is a necessity as this is for day job and the tool is also data repository.
But I will definitely try napari as it might allow me complementary visualizations.I will comment back here.