Hi
The file just contains raw data samples obtained using an analog to digital converter
Thanks
Hi
The file just contains raw data samples obtained using an analog to digital converter
Thanks
how do you know that raw data has correct image? I'm confused.![]()
Hi
The data are just samples, each samples amplitude is to represent a pixels intensity in the final image . Essentially all I have is 2d array of data, from which I want to create an image for display. I was looking at QImage as a possible solution, as you can load the QImage buffer with data using scanline, but I couldnt get this to work.
Thanks
Hi
I suppose you could look at the problem this way. Consider a 2d array of chars of say 200 rows x 200 columns. Every element in a row has the same value, this value increases by one for every row. So for example each sample in the first row might have sample value of 1, the second row 2 and so on until we get to the final row which would have sample value of 200. If you created an image of this 2d array you would expect to see horizontal lines of increasing intensity (if we assume a grayscale image). How could I create such an image using QT and display this on a label/widget
Thanks for your time
then use QImage this class allows to access to pixels.
Yes, I have used QImage and loaded the buffer with my data. How di I subsequently display this QImage on a widget?
I am also looking at similar problem (moving image )
so in the designer create a Qlabel
then access Qlabel ui.labelName->setQimage or something like that
then modify the QImage using QPainter
then update the
I found an example in the demo to draw a ball with gradient
Qt Code:
pixmap.fill(Qt::transparent); painter.fillRect(0, 0, 100, 100, gradient); channelImage = pixmap.alphaChannel(); update();To copy to clipboard, switch view to plain text mode
I am not sure yet if we can modify the Qpainter dot by dot
This may help
the problem seems to be how to modify the QPixmap having a set of coordinates X,Y
is there any good example around?
The pixmap is used to display data. QImage is used to manipulate data. Use QImage to change pixel colours and a pixmap created from it to display the image.
Bookmarks