Changeset 186


Ignore:
Timestamp:
Jan 17, 2012, 9:26:23 AM (6 years ago)
Author:
tjniskan
Message:
  • Fixed (hopefully) some issues with multiple monitors. Aedes now tries to open on the monitor where the cursor is, if other Aedes windows are not open.
  • Fixed bugs with RGB overlays.

M aedes_createmosaic.m
M aedes.m
M aedes_export_gui.m
A aedes_getcurrentmonitor.m
M aedes_revision.m

Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • aedes.m

    r182 r186  
    295295% Calculate default position for Aedes window
    296296try
    297         % If multiple monitors are connected, draw Aedes on primary monitor
     297        % If multiple monitors are connected, draw Aedes on the monitor where the
     298        % mouse cursor is located
    298299        scrsz = get(0,'MonitorPositions');
    299         fig_pos = [scrsz(1,3)/2-fig_w/2 scrsz(1,4)/2-fig_h/2-20 fig_w fig_h];
     300        ind = aedes_getcurrentmonitor;
     301        fig_pos = [scrsz(ind,3)/2-fig_w/2 scrsz(ind,4)/2-fig_h/2-20 fig_w fig_h];
     302        fig_pos(1) = fig_pos(1)+scrsz(ind,1);
    300303catch
    301304        % Get screen size
     
    42584261
    42594262%keyboard
     4263
     4264Dat.ImOverlayMax = double(max(max(max(max(Dat.ImageOverlay)))));
     4265Dat.ImOverlayMin = double(min(min(min(min(Dat.ImageOverlay)))));
    42604266if ~Dat.isOverlayRGB
    4261   Dat.ImOverlayMax = double(max(max(max(max(Dat.ImageOverlay)))));
    4262   Dat.ImOverlayMin = double(min(min(min(min(Dat.ImageOverlay)))));
    4263  
    42644267  if ~any(strcmpi(class(Dat.ImageOverlay),{'single','double'}))
    42654268        Dat.ImageOverlay = single(Dat.ImageOverlay);
     
    42844287    Dat.ImageOverlay(:)=ind(Dat.ImageOverlay);
    42854288    Dat.ImageOverlay = uint8(Dat.ImageOverlay);
    4286   end
     4289        end
    42874290end
    42884291
  • aedes_createmosaic.m

    r160 r186  
    398398                                        overlay_im(:,:,2)= reshape(ov_cmap(overlay_ind,2),sz);
    399399                                        overlay_im(:,:,3)= reshape(ov_cmap(overlay_ind,3),sz);
     400                                       
     401                                        overlay_alpha = zeros(size(overlay_ind));
     402                                        overlay_alpha(overlay_alpha_clim) = ov_alpha_val;
     403                                        overlay_alpha(overlay_alpha_th) = 0;
    400404                                else
    401405                                        overlay_im = overlay_data;
     406                                        overlay_alpha = ov_alpha_val;
    402407                                end
    403408                               
    404                                 overlay_alpha = zeros(size(overlay_ind));
    405                                 overlay_alpha(overlay_alpha_clim) = ov_alpha_val;
    406                                 overlay_alpha(overlay_alpha_th) = 0;
     409                               
    407410                               
    408411                                h=image('parent',overlay_ax,...
  • aedes_export_gui.m

    r160 r186  
    16251625        overlay_im(:,:,2)= reshape(ov_cmap(overlay_ind,2),sz);
    16261626        overlay_im(:,:,3)= reshape(ov_cmap(overlay_ind,3),sz);
     1627                               
     1628                                overlay_alpha = zeros(size(overlay_ind));
     1629                                overlay_alpha(overlay_alpha_clim) = ov_alpha_val;
     1630                                overlay_alpha(overlay_alpha_th) = 0;
    16271631      else
    16281632        overlay_im = overlay_data;
     1633                                overlay_alpha = ov_alpha_val;
    16291634      end
    16301635
    1631       overlay_alpha = zeros(size(overlay_ind));
    1632       overlay_alpha(overlay_alpha_clim) = ov_alpha_val;
    1633       overlay_alpha(overlay_alpha_th) = 0;
     1636     
    16341637
    16351638      h=image('parent',overlay_ax,...
  • aedes_revision.m

    r185 r186  
    9393% bash-script every time it is called so that this file "aedes_revision.m" is
    9494% always in the list of committed files. DO NOT EDIT THE NEXT LINE!!!
    95 % - SVN Hook -
     95% - Svn Hook -
Note: See TracChangeset for help on using the changeset viewer.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008