Data array format for Intensity Graph [message #1263729] |
Tue, 04 March 2014 13:32  |
Eclipse User |
|
|
|
I have looked at the Intensity Graph example and the Javadoc for IntensityGraphFigure; however, I am still having trouble understanding the format required for the data array. It is not clear to me why the simulation data array (simuData) is twice as long as the data array, how the array index corresponds to the row/column of the graph, and whether any normalization of the data is required before passing it to the graph.
Could someone provide a description to clarify these issues? Thanks in advance.
|
|
|
Re: Data array format for Intensity Graph [message #1265482 is a reply to message #1263729] |
Thu, 06 March 2014 01:35   |
Eclipse User |
|
|
|
IntensityGraph displays 2D array data to a 2D image with each point maps a color from the color map, but the input data must be in 1D array format, in which the values are arranged in row by row so it can be converted to a 2D array. For example, for a N rows by M columns 2D data, the input data should like this:
InputData = P11, P12,...P1M, P21, P22, ... P2M, ... PN1, PN2, ...PNM
For example, for an image of 3X3:
1,2,3
4,5,6
7,8,9
The input array should be [1,2,3,4,5,6,7,8,9] by calling setDataArray(). Another important thing is that you need to call setDataWidth(3) and setDataHeight(3) to tell it the array height and width.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03784 seconds