Changeset 186 for aedes.m


Ignore:
Timestamp:
Jan 17, 2012, 9:26:23 AM (7 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

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.

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