function isocoeffvis(handles,coeffs,isocoeffs)
[datadim,~]=dimsizetype(coeffs{1});
lev1iso=get(handles.checkbox21,'Value');
lev2iso=get(handles.checkbox22,'Value');
lev3iso=get(handles.checkbox23,'Value');
isotype1=get(handles.radiobutton7,'Value');
isotype2=get(handles.radiobutton8,'Value');
isotype3=get(handles.radiobutton9,'Value');
isotype4=get(handles.radiobutton10,'Value');
WTval=get(handles.popupmenu2,'String');
WT2val=WTval{get(handles.popupmenu2,'Value')};
if datadim~=3
    CoeffTypes=get(handles.popupmenu13,'String');
    if iscell(CoeffTypes)
        SelCoeffTypes=CoeffTypes{get(handles.popupmenu13,'Value')};
    else
        SelCoeffTypes=CoeffTypes;
    end
else
    SelCoeffTypes='All detail coefficients';
end
if isotype1==1
    IsoCoeffLabelType='added';
elseif isotype2==1
    IsoCoeffLabelType='Euclid.';
elseif isotype3==1
    IsoCoeffLabelType='abs. added';
elseif isotype4==1
    IsoCoeffLabelType='sqr. added';
end

if strcmp(SelCoeffTypes,'All detail coefficients')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - detail coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - detail coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - detail coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All horizontal')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - H coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - H coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - H coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All vertical')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - V coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - V coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - V coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All diagonal')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - D coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - D coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - D coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All horizontal & vertical')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - HV coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - HV coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - HV coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All real')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - Re coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - Re coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - Re coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All imaginary')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - Im coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - Im coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - Im coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All type 1')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - type 1 coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - type 1 coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - type 1 coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All type 2')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - type 2 coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - type 2 coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - type 2 coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All type 3')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - type 3 coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - type 3 coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - type 3 coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All type 4')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - type 4 coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - type 4 coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - type 4 coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All type 5')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - type 5 coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - type 5 coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - type 5 coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All type 6')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - type 6 coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - type 6 coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - type 6 coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All type 1-2')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - type 1-2 coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - type 1-2 coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - type 1-2 coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All type 3-4')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - type 3-4 coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - type 3-4 coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - type 3-4 coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All type 5-6')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - type 5-6 coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - type 5-6 coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - type 5-6 coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All type 1-4')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - type 1-4 coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - type 1-4 coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - type 1-4 coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
elseif strcmp(SelCoeffTypes,'All type 5-16')
    if lev1iso==1
        LabelIsoCoeff1=['Isotropic - type 5-16 coeff. - ' IsoCoeffLabelType ' - lev. 1'];
    else
        LabelIsoCoeff1='';
    end
    if lev2iso==1
        LabelIsoCoeff2=['Isotropic - type 5-16 coeff. - ' IsoCoeffLabelType ' - lev. 2'];
    else
        LabelIsoCoeff2='';
    end
    if lev3iso==1
        LabelIsoCoeff3=['Isotropic - type 5-16 coeff. - ' IsoCoeffLabelType ' - lev. 3'];
    else
        LabelIsoCoeff3='';
    end
end

coefflist=get(handles.popupmenu6,'String');
itray=[];
for i=1:length(coefflist)
    if strfind(coefflist{i},'Isotropic');
        itray=[itray;i];
    end
end
if ~isempty(itray)
    for j=1:length(itray)
        coefflist(length(coefflist))=[];
    end
end

if ~isempty(LabelIsoCoeff1)
    coefflist{end+1}=LabelIsoCoeff1;
end
if ~isempty(LabelIsoCoeff2)
    coefflist{end+1}=LabelIsoCoeff2;
end
if ~isempty(LabelIsoCoeff3)
    coefflist{end+1}=LabelIsoCoeff3;
end
set(handles.popupmenu6,'String',coefflist);
set(handles.popupmenu6,'Value',length(coefflist));

axes(handles.mainframe2);
set(handles.radiobutton15,'Value',1);
cla;
colorbar('off');
[datadim,~]=dimsizetype(isocoeffs{1});
WTval=get(handles.popupmenu2,'String');
WT2val=WTval{get(handles.popupmenu2,'Value')};

if datadim==1
    if strcmp(WT2val,'1D Continuous Wavelet Transform')
        scalechk=size(isocoeffs{1});
        if scalechk(1)==1
            plot(isocoeffs{length(isocoeffs)});
            xlimits=get(handles.mainframe2,'XLim');
            set(handles.edit10,'String',num2str(xlimits(1)));
            set(handles.edit11,'String',num2str(xlimits(2)));
            ylimits=get(handles.mainframe2,'YLim');
            set(handles.edit12,'String',num2str(ylimits(1)));
            set(handles.edit13,'String',num2str(ylimits(2)));
            set(handles.edit14,'String','NA');
            set(handles.edit15,'String','NA');
        else
            imagesc(isocoeffs{length(isocoeffs)});
            axis xy;
            xlimits=get(handles.mainframe2,'XLim');
            set(handles.edit10,'String',num2str(xlimits(1)));
            set(handles.edit11,'String',num2str(xlimits(2)));
            ylimits=get(handles.mainframe2,'YLim');
            set(handles.edit12,'String',num2str(ylimits(1)));
            set(handles.edit13,'String',num2str(ylimits(2)));
            zlimits=get(handles.mainframe2,'ZLim');
            set(handles.edit14,'String',num2str(zlimits(1)));
            set(handles.edit15,'String',num2str(zlimits(2)));
            nbcol=256; bright=0;
            colormap(jet(nbcol));
            set(handles.slider1,'Value',nbcol); set(handles.slider2,'Value',bright);
            set(handles.edit8,'String',num2str(nbcol)); set(handles.edit9,'String',num2str(bright));
            c=colorbar('location','southoutside');
            cpos = get(c,'Position');
            cpos=[0.546376811594203 0.083762149799886 0.435748792270531 0.5*cpos(4)];
            set(c,'Position',cpos);
            set(handles.mainframe2,'Position',[564 90 450 450]);
        end
    else
        cla;
        plot(isocoeffs{length(isocoeffs)});
        xlimits=get(handles.mainframe2,'XLim');
        set(handles.edit10,'String',num2str(xlimits(1)));
        set(handles.edit11,'String',num2str(xlimits(2)));
        ylimits=get(handles.mainframe2,'YLim');
        set(handles.edit12,'String',num2str(ylimits(1)));
        set(handles.edit13,'String',num2str(ylimits(2)));
        set(handles.edit14,'String','NA');
        set(handles.edit15,'String','NA');
    end
elseif datadim==2
    circchk=get(handles.edit4,'String');
    circdim=get(handles.edit3,'String');
    if strfind(circchk,'Circular')
        csiz=size(isocoeffs{length(isocoeffs)});
        if circdim(1:2)=='51'
            R=0.25;
        elseif circdim(1:2)=='64'
            R=0.5;
        end
        r=R/csiz(2):R/csiz(2):R;
        phi=0:2*pi/(csiz(1)-1):2*pi;
        [th,rq] = meshgrid(phi,r);
        [X_1,Y_1,Z_1] = pol2cart(th,rq,isocoeffs{length(isocoeffs)}');
        h = polar([0 2*pi], [0 R]);
        delete(h)
        hold on;
        surf(X_1,Y_1,Z_1);
        hold off;
        shading interp;
        set(findall(gca,'Type','patch'),'FaceColor','none');
    else
        imagesc(isocoeffs{length(isocoeffs)});
    end
    axis xy;
    xlimits=get(handles.mainframe2,'XLim');
    set(handles.edit10,'String',num2str(xlimits(1)));
    set(handles.edit11,'String',num2str(xlimits(2)));
    ylimits=get(handles.mainframe2,'YLim');
    set(handles.edit12,'String',num2str(ylimits(1)));
    set(handles.edit13,'String',num2str(ylimits(2)));
    zlimits=get(handles.mainframe2,'ZLim');
    set(handles.edit14,'String',num2str(zlimits(1)));
    set(handles.edit15,'String',num2str(zlimits(2)));
    nbcol=256; bright=0;
    colormap(jet(nbcol));
    set(handles.slider1,'Value',nbcol); set(handles.slider2,'Value',bright);
    set(handles.edit8,'String',num2str(nbcol)); set(handles.edit9,'String',num2str(bright));
    c=colorbar('location','southoutside');
    cpos = get(c,'Position');
    cpos=[0.546376811594203 0.083762149799886 0.435748792270531 0.5*cpos(4)];
    set(c,'Position',cpos);
    set(handles.mainframe2,'Position',[564 90 450 450]);
elseif datadim==3
    vol3d('CData',isocoeffs{length(isocoeffs)},'texture','3D');
    view(3);
    axis tight;
    xlimits=get(handles.mainframe2,'XLim');
    set(handles.edit10,'String',num2str(xlimits(1)));
    set(handles.edit11,'String',num2str(xlimits(2)));
    ylimits=get(handles.mainframe2,'YLim');
    set(handles.edit12,'String',num2str(ylimits(1)));
    set(handles.edit13,'String',num2str(ylimits(2)));
    zlimits=get(handles.mainframe2,'ZLim');
    set(handles.edit14,'String',num2str(zlimits(1)));
    set(handles.edit15,'String',num2str(zlimits(2)));
    nbcol=256; bright=0;
    colormap(jet(nbcol));
    set(handles.slider1,'Value',nbcol); set(handles.slider2,'Value',bright);
    set(handles.edit8,'String',num2str(nbcol)); set(handles.edit9,'String',num2str(bright));
    c=colorbar('location','southoutside');
    cpos = get(c,'Position');
    cpos=[0.546376811594203 0.083762149799886 0.435748792270531 0.5*cpos(4)];
    set(c,'Position',cpos);
    set(handles.mainframe2,'Position',[564 90 450 450]); 
end
