function varargout = Glaucoma_Detection(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Glaucoma_Detection_OpeningFcn, ...
'gui_OutputFcn', @Glaucoma_Detection_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
function Glaucoma_Detection_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObject;
guidata(hObject, handles);
handles.output = hObject;
a=ones(256,256);
b=imread('images.jpeg');
axes(handles.axes3);
imshow(b);
axes(handles.axes2);
imshow(a);
axes(handles.axes1);
imshow(a);
guidata(hObject, handles);
function varargout = Glaucoma_Detection_OutputFcn(hObject, eventdata, handles)
varargout{1} = handles.output;
function ANGLE_Callback(hObject, eventdata, handles)
function ANGLE_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function STATUS1_Callback(hObject, eventdata, handles)
function STATUS1_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function delete_Callback(hObject, eventdata, handles)
[file, pathname] = uigetfile('*.bmp', 'Pick an Image');
if isequal(file,0) | isequal(pathname,0)
warndlg('User pressed cancel')
else
a=file;
delete(a);
uiwait(msgbox('File Deleted Succesfully','Message','modal'));
end
function clear_Callback(hObject, eventdata, handles)
a=ones(256,256);
axes(handles.axes1);
imshow(a);
axes(handles.axes2);
imshow(a);
bb='0'
set(handles.ANGLE,'String',bb);
bb='0'
set(handles.STATUS1,'String',bb);
function help_Callback(hObject, eventdata, handles)
helpwin ch1;
function exist_Callback(hObject, eventdata, handles)
exit;
function load_Callback(hObject, eventdata, handles)
[file, pathname] = uigetfile('*.jpeg', 'Pick an Image');
if isequal(file,0) | isequal(pathname,0)
warndlg('User pressed cancel')
else
a=imread(file);
axes(handles.axes1);
imshow(a);
handles.file=file;
guidata(hObject, handles);
end
function enhacement_Callback(hObject, eventdata, handles)
file = handles.file;
a =imread(file);
[r c p]=size(a);
if p==3
a=rgb2gray(a);
end
b=histeq(a);
imwrite(b,'enhanced.bmp');
axes(handles.axes2);
imshow(b);
function thresh_Callback(hObject, eventdata, handles)
file = handles.file;
a=imread(file);
[r c p]=size(a);
b=a;
if p==3
b=rgb2gray(a);
end
Out =zeros(r,c);
for i=1:r
for j=1:c
if b(i,j) >150
Out(i,j)=1;
else
Out(i,j)=0;
end
end
end
axes(handles.axes2);
imshow(Out);
imwrite(Out,'thresholded.bmp');
function erosion_Callback(hObject, eventdata, handles)
file = handles.file;
Out=imread(file);
B1 = medfilt2(Out,[5 5]);
axes(handles.axes2);
imshow(B1);
imwrite(B1,'eroded.bmp');
function holefill_Callback(hObject, eventdata, handles)
file = handles.file;
bw1=imread(file);
BW15 = imfill(bw1,8,'holes');
axes(handles.axes2);
imshow(BW15);
BW15=uint8(BW15);
imwrite(BW15,'FILLED.bmp');
uiwait(msgbox('Process completed','Hole filling Status','modal'));
function segment_Callback(hObject, eventdata, handles)
file = handles.file;
file=imread(file);
J = imcomplement(file);
figure(1);
imshow(J);
J=bwmorph(J,'FILL');
figure(2);
imshow(J);
[r1 c1]=size(J);
[L2 NUM2] = bwlabel(J);
disp(NUM2);
removed=0;
STATS = regionprops(L2,'area');
aA=[STATS.Area];
for j=1:1:NUM2
bw= aA(j);
if bw <1500
L2(L2==j)=0;
removed = removed + 1;
end
end
NUM2=NUM2-removed;
[L3 NUM3] = bwlabel(L2);
STATS = regionprops(L3,'area');
disp(NUM3);
stats1 = regionprops(L3, 'PixelList');
CC=[];
for j=1:1:NUM3
aA1=stats1(j);
CC{j} = [aA1.PixelList];
end
removed1=0;
tmp = [];
for j=1:NUM3
tmp = CC{j}(:);
B=find(tmp(:,1)==1);
disp(B);
if isempty(B)
imshow(L3==j);
else
L3(L3==j)=0;
removed1=removed1+1;
end
end
NUM3=NUM3-removed1;
disp(NUM3);
[L4 NUM4] = bwlabel(L3);
for i=1:NUM4
[r,c] = find(L4 == i);
BW2 = bwselect(L3,c,r,4);
imwrite(BW2,'SEGMENTED.BMP');
end
if NUM4~=0
Image=BW2;
th1=1;
th2=0;
[rows columns]=size(Image);
len=rows;
Rimage = Image;
OutputImage=ones(rows,columns);
Boundary_Pixel=[];
h = waitbar(0,'Please wait...');
index=1;
for y= 1:columns
for x=1:rows
if (x==1 & y==1)
if (Rimage(x, y+1)==th1)
if (Rimage(x+1, y+1)==th1)
if (Rimage(x+1,y)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==1 & y==len)
if (Rimage(x+1, y)==th1)
if (Rimage(x+1, y-1)==th1)
if (Rimage(x,y-1)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==len & y==1)
if (Rimage(x-1, y)==th1)
if (Rimage(x-1, y+1) ==th1)
if (Rimage(x,y+1) ==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==len & y==len)
if (Rimage(x, y-1)==th1)
if (Rimage(x-1, y-1)==th1)
if (Rimage(x-1,y)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==1)
if (Rimage(x, y-1)==th1)
if (Rimage(x+1, y-1)==th1)
if (Rimage(x+1, y)==th1)
if (Rimage(x+1, y+1)==th1)
if (Rimage(x,y+1)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
elseif (y==len)
if (Rimage(x-1, y)==th1)
if (Rimage(x-1, y-1)==th1)
if (Rimage(x, y-1)==th1)
if (Rimage(x+1, y-1)==th1)
if (Rimage(x+1,y)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
elseif (x==len)
if (Rimage(x, y-1)==th1)
if (Rimage(x-1, y-1)==th1)
if (Rimage(x-1, y)==th1)
if (Rimage(x-1, y+1)==th1)
if (Rimage(x,y+1)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
elseif (y==1)
if (Rimage(x-1, y)==th1)
if (Rimage(x-1, y+1)==th1)
if (Rimage(x, y+1)==th1)
if (Rimage(x+1, y+1)==th1)
if (Rimage(x+1,y)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
else
if (Rimage(x-1,y-1)==th1)
if (Rimage(x-1,y)==th1)
if (Rimage(x-1,y+1)==th1)
if (Rimage(x,y+1)==th1)
if (Rimage(x+1,y+1)==th1)
if (Rimage(x+1,y)==th1)
if (Rimage(x+1,y-1)==th1)
if (Rimage(x,y-1)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
end
end
end
end
end
end
index=1;
for y=1:columns
for x=1:rows
if (x==1 & y==1)
if (Rimage(x, y+1)==th2)
if (Rimage(x+1, y+1)==th2)
if (Rimage(x+1,y)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==1 & y==len)
if (Rimage(x+1, y)==th2)
if (Rimage(x+1, y-1)==th2)
if (Rimage(x,y-1)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==len & y==1)
if (Rimage(x-1, y)==th2)
if (Rimage(x-1, y+1) ==th2)
if (Rimage(x,y+1) ==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==len & y==len)
if (Rimage(x, y-1)==th2)
if (Rimage(x-1, y-1)==th2)
if (Rimage(x-1,y)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==1)
if (Rimage(x, y-1)==th2)
if (Rimage(x+1, y-1)==th2)
if (Rimage(x+1, y)==th2)
if (Rimage(x+1, y+1)==th2)
if (Rimage(x,y+1)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
elseif (y==len)
if (Rimage(x-1, y)==th2)
if (Rimage(x-1, y-1)==th2)
if (Rimage(x, y-1)==th2)
if (Rimage(x+1, y-1)==th2)
if (Rimage(x+1,y)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
elseif (x==len)
if (Rimage(x, y-1)==th2)
if (Rimage(x-1, y-1)==th2)
if (Rimage(x-1, y)==th2)
if (Rimage(x-1, y+1)==th2)
if (Rimage(x,y+1)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
elseif (y==1)
if (Rimage(x-1, y)==th2)
if (Rimage(x-1, y+1)==th2)
if (Rimage(x, y+1)==th2)
if (Rimage(x+1, y+1)==th2)
if (Rimage(x+1,y)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
else
if (Rimage(x-1,y-1)==th2)
if (Rimage(x-1,y)==th2)
if (Rimage(x-1,y+1)==th2)
if (Rimage(x,y+1)==th2)
if (Rimage(x+1,y+1)==th2)
if (Rimage(x+1,y)==th2)
if (Rimage(x+1,y-1)==th2)
if (Rimage(x,y-1)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
end
end
end
end
waitbar(y/columns,h)
end
end
close(h);
imwrite(OutputImage,'Bound1.bmp');
Out1=OutputImage;
[m n]=size(Out1);
Out2=zeros(m,n);
for i=1:m
for j=1:n
if Out1(i,j)>=1
Out2(i,j)=255;
end
end
end
index=1;
for x = 1:256
for y=1:256
bb=Out2(x,y);
if bb>=10
Boundary_Pixel{index}=[x,y];
X1(index)=x;
Y1(index)=y;
index=index+1;
end
end
end
X = X1;
Y =Y1;
save X X
save Y Y
X1=X;
Y1 =Y;
XB=X;
YB =Y;
Xmin = min(XB)
[Ymin Ind] = min(YB)
Dec=X(Ind)
Xmax = max(XB);
Ymax = max(YB);
[Ymax Ind] = max(YB);
Dec1=X(Ind);
axes(handles.axes2);
X = [Dec Dec1];
Y = [Ymin Ymax];
line(Y,X) ;
X = [Dec Dec];
Y = [Ymin Ymax];
line(Y,X) ;
X = [Dec Dec1];
Y = [Ymax Ymax];
line(Y,X) ;
X = [Dec Xmax];
Y = [Ymax Ymax];
line(Y,X) ;
X = [Dec Xmax];
Y = [Ymin Ymax];
b=ones(256,256);
line(Y,X) ;
handles.Xmin=Xmin;
handles.Xmax=Xmax;
handles.Dec=Dec;
handles.Dec1=Dec1;
handles.Ymin=Ymin;
handles.Ymax=Ymax;
else
bb='0'
set(handles.ANGLE,'String',bb);
warndlg('anterior chamber is almost closed ... glaucoma detected..no further processing');
bb='GLAUCOMA DETECTED'
set(handles.STATUS1,'String',bb);
disp('no anterior chamber');
end
guidata(hObject, handles);
function mask_Callback(hObject, eventdata, handles)
Xmin=get(handles.Xmin);
Xmax=get(handles.Xmax);
Dec =handles.Dec;
Dec1 =handles.Dec1;
Ymin =handles.Ymin;
Ymax =handles.Ymax;
file = handles.file;
aa=imread(file);
X1=Ymin;
Y1=Dec;
LTX1=X1-25;
LTY1=Y1-25;
RTX1=X1-25;
RTY1=Y1+25;
LBX1=X1+25;
LBY1=Y1-25;
RBX1=X1+25;
RBY1=Y1+25;
ROIIMAGE11=aa(LTY1:RBY1,LTX1:LBX1);
axes(handles.axes2);
imshow(ROIIMAGE11);
imwrite(ROIIMAGE11,'masked.bmp');
function aod_Callback(hObject, eventdata, handles)
file=handles.file;
a=imread(file);
a=uint8(a);
b=histeq(a);
figure(2);
imshow(b);
[r c]=size(a);
for i=1:r
for j=1:c
if b(i,j) >50
aOut2(i,j)=1;
aOut21(i,j)=0;
else
aOut2(i,j)=0;
aOut21(i,j)=1;
end
end
end
aOut22 = imcomplement(imfill(imcomplement(aOut2),'holes'));
aOut22 = imfill(aOut22,'holes');
aJ2 = imcomplement(aOut22);
[L2 NUM2] = bwlabel(aJ2);
removed=0;
removed1=0;
STATS = regionprops(L2,'area');
aA=[STATS.Area];
for j=1:1:NUM2
bw= aA(j);
if bw <150
L2(L2==j)=0;
removed = removed + 1;
end
end
NUM2=NUM2-removed;
[L3 NUM3] = bwlabel(L2);
imshow(L3==1);
[r,c] = find(L3 == 1);
BW2 = bwselect(L3,c,r,4);
Image=BW2;
imshow(Image);
th1=1;
th2=0;
[rows columns]=size(Image);
len=rows;
Rimage = Image;
j=columns;
Num=[];
index1=1;
for i=1:r
if Image(i,j)==1
Boundary_Pixel_1{index1}=[i,j];
Num(index1)=i;
index1=index1+1;
end
end
Mini=min(Num);
Maxi=max(Num);
OutputImage=ones(rows,columns);
Boundary_Pixel=[];
h = waitbar(0,'Please wait...');
index=1;
for y= 1:columns
for x=1:rows
if (x==1 & y==1)
if (Rimage(x, y+1)==th1)
if (Rimage(x+1, y+1)==th1)
if (Rimage(x+1,y)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==1 & y==len)
if (Rimage(x+1, y)==th1)
if (Rimage(x+1, y-1)==th1)
if (Rimage(x,y-1)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==len & y==1)
if (Rimage(x-1, y)==th1)
if (Rimage(x-1, y+1) ==th1)
if (Rimage(x,y+1) ==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==len & y==len)
if (Rimage(x, y-1)==th1)
if (Rimage(x-1, y-1)==th1)
if (Rimage(x-1,y)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==1)
if (Rimage(x, y-1)==th1)
if (Rimage(x+1, y-1)==th1)
if (Rimage(x+1, y)==th1)
if (Rimage(x+1, y+1)==th1)
if (Rimage(x,y+1)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
elseif (y==len)
if (Rimage(x-1, y)==th1)
if (Rimage(x-1, y-1)==th1)
if (Rimage(x, y-1)==th1)
if (Rimage(x+1, y-1)==th1)
if (Rimage(x+1,y)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
elseif (x==len)
if (Rimage(x, y-1)==th1)
if (Rimage(x-1, y-1)==th1)
if (Rimage(x-1, y)==th1)
if (Rimage(x-1, y+1)==th1)
if (Rimage(x,y+1)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
elseif (y==1)
if (Rimage(x-1, y)==th1)
if (Rimage(x-1, y+1)==th1)
if (Rimage(x, y+1)==th1)
if (Rimage(x+1, y+1)==th1)
if (Rimage(x+1,y)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
else
if (Rimage(x-1,y-1)==th1)
if (Rimage(x-1,y)==th1)
if (Rimage(x-1,y+1)==th1)
if (Rimage(x,y+1)==th1)
if (Rimage(x+1,y+1)==th1)
if (Rimage(x+1,y)==th1)
if (Rimage(x+1,y-1)==th1)
if (Rimage(x,y-1)==th1)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
end
end
end
end
end
end
index=1;
for y=1:columns
for x=1:rows
if (x==1 & y==1)
if (Rimage(x, y+1)==th2)
if (Rimage(x+1, y+1)==th2)
if (Rimage(x+1,y)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==1 & y==len)
if (Rimage(x+1, y)==th2)
if (Rimage(x+1, y-1)==th2)
if (Rimage(x,y-1)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==len & y==1)
if (Rimage(x-1, y)==th2)
if (Rimage(x-1, y+1) ==th2)
if (Rimage(x,y+1) ==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==len & y==len)
if (Rimage(x, y-1)==th2)
if (Rimage(x-1, y-1)==th2)
if (Rimage(x-1,y)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
elseif (x==1)
if (Rimage(x, y-1)==th2)
if (Rimage(x+1, y-1)==th2)
if (Rimage(x+1, y)==th2)
if (Rimage(x+1, y+1)==th2)
if (Rimage(x,y+1)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
elseif (y==len)
if (Rimage(x-1, y)==th2)
if (Rimage(x-1, y-1)==th2)
if (Rimage(x, y-1)==th2)
if (Rimage(x+1, y-1)==th2)
if (Rimage(x+1,y)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
elseif (x==len)
if (Rimage(x, y-1)==th2)
if (Rimage(x-1, y-1)==th2)
if (Rimage(x-1, y)==th2)
if (Rimage(x-1, y+1)==th2)
if (Rimage(x,y+1)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
elseif (y==1)
if (Rimage(x-1, y)==th2)
if (Rimage(x-1, y+1)==th2)
if (Rimage(x, y+1)==th2)
if (Rimage(x+1, y+1)==th2)
if (Rimage(x+1,y)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
else
if (Rimage(x-1,y-1)==th2)
if (Rimage(x-1,y)==th2)
if (Rimage(x-1,y+1)==th2)
if (Rimage(x,y+1)==th2)
if (Rimage(x+1,y+1)==th2)
if (Rimage(x+1,y)==th2)
if (Rimage(x+1,y-1)==th2)
if (Rimage(x,y-1)==th2)
Boundary_Pixel{index}=[x,y];
OutputImage(x,y)=0;
index=index+1;
end
end
end
end
end
end
end
end
end
waitbar(y/columns,h)
end
end
close(h);
Out1=OutputImage;
[m n]=size(Out1);
Out2=zeros(m,n);
for i=1:m
for j=1:n
if Out1(i,j)>=1
Out2(i,j)=255;
end
end
end
index=1;
threshold=255;
for x = 1:rows
for y=1:columns
bb=Out2(x,y);
if bb>=10
Boundary_Pixel{index}=[x,y];
X1(index)=x;
Y1(index)=y;
index=index+1;
end
end
end
save a11
load a11
X1=X;
Y1 =Y;
XB=X;
YB =Y;
Xmin = min(XB);
[Ymin Ind] = min(YB);
Dec=X(Ind);
Xmax = max(XB);
Ymax = max(YB);
[Ymax Ind] = max(YB);
Dec1=X(Ind);
aa=imread(file);
axes(handles.axes2);
imshow(aa);
X = [Dec Mini];
Y = [Ymin Ymax];
line(Y,X) ;
X = [Dec Dec];
Y = [Ymin Ymax];
line(Y,X) ;
X = [Dec Dec1];
Y = [Ymax Ymax];
line(Y,X) ;
X = [Dec Xmax];
Y = [Ymax Ymax];
line(Y,X) ;
X = [Dec Maxi];
Y = [Ymin Ymax];
b=ones(256,256);
line(Y,X) ;
Distance1=sqrt((Dec-Mini)^2+(Ymin-Ymax)^2);
disp(Distance1);
Distance2=sqrt((Dec-Maxi)^2+(Ymin-Ymax)^2);
disp(Distance2);
Distance3=sqrt((Dec-Dec)^2+(Ymin-Ymax)^2);
disp(Distance3);
Thete1=acos(Distance3/Distance1);
Thete2=acos(Distance3/Distance2);
AA=Thete1+Thete2;
BB=(180/pi)*AA;
Theta1=(180/pi)*Thete1;
Theta2=(180/pi)*Thete2;
disp(Theta1);
disp(Theta2);
Theta3=Theta1-Theta2;
Theta13=num2str(Theta3);
set(handles.ANGLE,'String',Theta13);
Theta3=round(Theta3);
if Theta3 > 19
bb='NORMAL EYE'
set(handles.STATUS1,'String',bb);
else
bb='GLAUCOMA DETECTED'
set(handles.STATUS1,'String',bb);
end
function radian_Callback(hObject, eventdata, handles)
function togglebutton2_Callback(hObject, eventdata, handles)
button_state = get(hObject,'Value');
if button_state == get(hObject,'Max')
display('clicked')
elseif button_state == get(hObject,'Min')
display('rleased');
end