The image array is simply an array of numbers. It has a number for each pixel. Each number is the value for that pixel. When the image is displayed the values are converted into gray levels or colors.
We will now look at some of the values that are contained in the array. We will do that by selecting a row of the array and then plotting it in another window.
; Make another window to display graphs of the
gray levels along an image row.
WINDOW,2,TITLE='GRAY LEVEL PLOTS'
; Select row 100 and all columns of the array
and plot it.
PLOT,A[*,100]
The plot indicates that the values of the array fluctuate between levels of about 20 to about 210 across the image. To find out more about where this plot comes from, we will make a line across the image in row 99. Our plot will then be from the row just above the line. To do this we simply set all of the pixels in row 99 to have a single value. Here we will choose 255.
B=A
; Save the image in a different array so it
can be restored
A[*,99]=255 ;
Set the values in row 99 to 255
WSET,1 ; Select
window 1 for display
TV,A ; Display
the modified array
A=B ; Restore
the image array
You should see an image with a horizontal white line. If you follow the line you see that the gray levels of the image change. These changes correspond to the fluctuations in the image graph.
Experiment with plots across the image at other positions. A flexible procedure for doing this is given below.
PRO IMSLICE,A,R
w=!D.WINDOW ; Remember
the window index
WINDOW,2 ;
Make a plotting window
PLOT,A[*,R] ; Plot
the curve
B=A ; Make a copy
of the array
B[*,R]=255 ; Make
a line on the copy
WSET,W ; Make the
image window active
TV,B ; Show the
image with a line
END
Save the above instructions in a file imslice.pro and then use
it to experiment with plotting horizontal brightness plots of the image.
You can use any value for R that is within the image -- that is, from 0
to 383.