Qt : imagesc simple code

I am very interested with imagesc function in matlab. We can plot our data and plot image with user defined colormap. I have try to create a Qt: imagesc simple code using QPainter. This is a simple idea how to create Qt imagesc simple code. You can modified this code like your problem.

This code create a random data with size wdata(width) and hdata(height). I am create a winter colormap using colormap matlab function. You can get other colormap with looking at colormap matlab function. This is a code how to create winter colormap :

We can convert our data to colormap using this function :

You will get more information after reading my code. This is an output when running this Qt imagesc simple code :

You can download the full Qt imagesc simple code at here

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.