function buttonlvRAY(hObject, eventdata, parentfig, Empty_Button, Buttons, AxesAFS, AxesSOL, SegPlot, rotoff, IPonoff, FPonoff, lvText, lvSlider, usmn, usmf, type, lcs);
data = get(Empty_Button,'UserData');

if (isfield(data,'isafs') == 0) || (data.isafs == 0)
    return
end

inx = [min(data.afs.pts(:,1)) max(data.afs.pts(:,1))];
iny = [min(data.afs.pts(:,2)) max(data.afs.pts(:,2))];
inz = [min(data.afs.pts(:,3)) max(data.afs.pts(:,3))];

if type <= 3
    x = get(lvSlider(type),'Value');
    set(lvText(2*type), 'String', num2str(x));
else
    mi = get(lvSlider(type-3),'Min');
    ma = get(lvSlider(type-3),'Max');
    x = getsetvar(lvText(2*(type-3)), mi, ma, 0, 1);
end

x = get(lvSlider(1),'Value');
y = get(lvSlider(2),'Value');
z = get(lvSlider(3),'Value');

pv = get(SegPlot, 'Value');
AFSview = get(AxesAFS,'view');

POS = [x y z];

buttonPlotSegRAY(hObject, eventdata, parentfig, Empty_Button, Buttons, AxesAFS, AxesSOL, SegPlot, rotoff, IPonoff, FPonoff, lvText, lvSlider, usmn, usmf, 0, 0, lcs, POS)
