How to plot colormap in 3D SLICER,like use imagesc in matlab

How to plot colormap in 3D SLICER,like use imagesc in matlab,
or How to develop the module to Implement the function?

Hi @iwangwangwang, it’s great to see your interest in developing with Slicer. I saw from another thread that some websites aren’t easily available for you. Are you able to access https://slicer.readthedocs.io/en/latest/ and Documentation/Nightly/Training - Slicer Wiki ? These are great places to start learning but let us know if there’s a way to make the information more available to you.

Regarding colormaps, I’m not familiar with matlab, but you should be able to render either direct color (RGB) or map scalar fields through a lookup table. If you look at the documentation and it’s still not clear you can come back here for more specific information. Usually it helps people provide you with answers if you give some more context. Volumes — 3D Slicer documentation

Thanks, but let me provide a more detailed description, I want to plot 2D matrix data with color (RGB) or map scalar fields through a lookup table in 3D Slicer, just like “imshow” in python or “imagesc” in matlab, I think using 2D slice or 3D view representation is all not appropriate in 3D Slicer, so there is any other method to present 2d data ? or must develop a extension to Implement the function?
sincerely wating for your answers.

Maybe you just want to us matplotlib directly: Script repository — 3D Slicer documentation

Of course, using Matplotlib is very convenient, but it can also make my program bulky, after all, I only need to use Matplotlib to draw color maps

Do you mean you want to display a color legend (color bar that shows what color correspond to what value) and you are not sure how to do it in Slicer?

I meant to plot a Matrix data as colormap, just like function “imshow” in python, I don’t know if I expressed myself clearly,here is a picture for example

1693940223938

Slice views show “matrix data” (2D array) as an image as in your screenshot. You can select what color map you want to use for display and you can also enable displaying a color legend.

Do you have trouble setting these up using the GUI or Python scripting?

yes, I have trouble how to implement the function