manual

advertisement
qwφιertyuiopasdfghjklzxερυυξn
mηqσwωψerβνtyuςiopasdρfghjk
lzxcvbnmqwertyuiopasdfghjklzx
cvbnφγιmλιqπςπζαwωeτrtνyuτio
How to draw a grid using
GUIDE
ρνμpκaλsdfghςjklzxcvλοπbnαm
Manual of ‘mygrid’
qwertyuiopasdfghjklzxcvbnmσγ
qwφertyuioσδφpγρaηsόρωυdfg
hjργklαzxcvbnβφδγωmζqwertλκ
οθξyuiύασφdfghjklzxcvbnmqwe
rtyuiopaβsdfghjklzxcεrυtγyεuνiι
oαpasdfghjklzxcηvbnασφδmqw
ertασδyuiopasdfασδφγθμκxcvυξ
σφbnmσφγqwθeξτσδφrtyuφγςο
ιopaασδφsdfghjklzxcvασδφbnγμ
,mqwertyuiopasdfgασργκοϊτbn
mqwertyσδφγuiopasσδφγdfghjk
Maria Georgiou
1 Introduction
In order to calibrate a small gamma camera system a series of corrections in the
initial image are urgent to be made. One of these corrections is flood correction
which maps each crystal pixel in order to take into account scintillator and
collimator response. Raw images obtained from the camera (see figure 1aand 2a
for example) show distorted crystal positions due to non-uniformities in the
PSPMT response. Since the true relative position of each crystal is known and
the crystal regions have been defined, a distortion correction is easily achieved
by replotting the data identified to belong to a particular crystal into that crystals
appropriate pixel in the corrected image [1] [2].An example of a raw, a summed
and a corrected image is provided in figure2.This software is made in order one’s
draw the grid that maps each crystal pixel of a scintillator.
Figure 1:raw image(a), grid that maps each crystal pixel(b), the summed flood matrix(c)
Figure 2: example of an uncorrected raw image(a), summed image(b), flood corrected
image(c)
2
2 How to use mygrid.fig
2.1 Getting started
First of all, you must open the matlab program. Then, change the directory,
where the folder mygrid is placed, and push the button “GUIDE”. Choose the
option “open an existing GUI” and browse the file named “…mygrid.fig”. A new
window will be opened and it is shown below.
Figure 3: mygrid.fig
If you push the button 1 in the circle, you open the menu editor and check the
code. DO NOT CHANGE anything except from the lines 317, 356, 444, 464, 487,
which you must replace with the correct directory path. Be careful with the
changes! You don’t have to change the names of the .txt files, but if you want
to, just be careful!
Now you are ready to ‘run’ the gui! Push the button 2 in the circle. A new
window opens, like the one below.
3
Figure 4: mygrid-user interface window
2.2 Push Buttons
1. Load figure: the first thing you have to do in order to draw your grid is to
push the load figure button, a dialog box opens and you choose your
initial (.txt) file.
2. Take 1st point x (1): either by clicking on this push button or by pressing
the keyboard button ‘1’, you choose your first point with the mouse
clicking on the figure. Use this button for drawing horizontal lines.
3. Take 1st point y (2): either by clicking on this push button or by pressing
the keyboard button ‘2’, you choose your first point with the mouse
clicking on the figure. Use this button for drawing vertical lines.
4. Take 2nd point (3): either by clicking on this push button or by pressing
the keyboard button ‘3’, you choose your second point with the mouse
clicking on the figure. Use this button for drawing horizontal or vertical
lines.
4
5. Connect x (4) : either by clicking on this push button or by pressing the
keyboard button ‘4’, you draw a horizontal line between the two points
you have chosen before and the coordinates are shown in the boxes.
6. Connect y (5): either by clicking on this push button or by pressing the
keyboard button ‘5’, you draw a vertical line between the two points you
have chosen before or the coordinates are shown in the boxes.
7. End x line (6) : either by clicking on this push button or by pressing the
keyboard button ‘6’ ,a line is drawn between the last point you have
chosen (x, y) and the last point of the figure(512,y).
8. End y line (7) : either by clicking on this push button or by pressing the
keyboard button ‘7’ ,a line is drawn between the last point you have
chosen (x, y) and the last point of the figure(x,512).
9. Undo: by clicking on this push button, you undo your last action, in case
of a mistake.
10.Save grid: by clicking this button, you save only the grid.
11.Save image: by clicking this button, you save the initial image with the
drawn grid.
12.Zoom: for more details, click this button for zoom or from the taskbar.
13.Choose_point: click this button to choose a point you want to change.
14.Add_x: click this button and the point you have chosen will take the value
50.
15.Add_y: click this button and the point you have chosen will take the value
55.
16.Add_xy: click this button and the point you have chosen will take the
value 60.
17.Delete: click this button and the point you have chosen will take the value
0.
2.3 How to draw a line
Firstly, you load your .txt file, which represents a 512*512 image. If you want to
draw a horizontal line, choose a point from the left side of the figure. It is not
necessary to be in the beginning, because the first point has always the
coordinates (1, y). Then you choose the second point and click the button
‘connect x’ (4). To continue the line, click the button ‘take 2nd point’ (3), choose
the next point and click again ‘connect x’ (4). Continue until the end of the line
with the same procedure. Respectively, you can draw a vertical line. Start from
the top of the figure, connect the points by clicking the button ‘connect y’ (5).
For your convenience, end the lines with the ‘end x line’ or ‘end y line’.
Don’t forget that if you made a mistake, you can undo this action and continue
from the previous point!
5
When you have finished your grid, save the image and the grid separately. Your
grid is saved in the file ‘my_g_grid.txt’ and the image in the file
‘my_g_figure.txt’.
6
2.4 How to correct a point value
The x-line corresponds to the value 50, the y-line to 55 and the xy-point to 60.
Sometimes, points that must have a specific value don’t have that value and you
have to correct them. An example is shown below. Although, the points in the
circle must have the value 60, they have the value 55. So, they must be
corrected.
To correct points with wrong value, click on the button ‘choose_point’, click the
point on the figure (the coordinates are shown at the edit text) and finally click
on the button that correct the point value. There are four options: correct xvalue, correct y-value, correct xy-value or delete a value.
In order to find easier wrong points, scan only the grid and make the changes
there.
Figure 5: wrong point value
7
Περιεχόμενα
2.1 Getting started ..................................................................................... 3
2.2 Push Buttons ....................................................................................... 4
2.3 How to draw a line ................................................................................ 5
2.4 How to correct a point value .................................................................. 7
Figure 1:raw image(a), grid that maps each crystal pixel(b), the summed flood
matrix(c) .................................................................................................. 2
Figure 2: example of an uncorrected raw image(a), summed image(b), flood
corrected image(c) ..................................................................................... 2
Figure 3: mygrid.fig ................................................................................... 3
Figure 4: mygrid-user interface window ........................................................ 4
Figure 5: wrong point value......................................................................... 7
8
Download