Changeset 60 for trunk/src/mouse_up.m


Ignore:
Timestamp:
Mar 23, 2010, 2:52:49 PM (11 years ago)
Author:
sommeria
Message:

-plot projections on a new specific GUI view_field, to avoid the multiplication of active figures
-introduce a ruler in uvmat (in menu/Tools), to measure distances and angles
-insert automatic detection of points for geometric calibration: tool 'detect_grid'. Four points, deliminating the grid to determine, must be marked with the mouse, as well as the physical grid. Then the points inside are automatically detected.
-reading plane positions in ImaDoc? improved to deal with volume scans

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_up.m

    r18 r60  
    275275      end
    276276end
     277if isequal(MouseAction,'ruler')
     278    UvData.MouseAction='none';
     279    UvData=rmfield(UvData,'RulerHandle')
     280     xy=get(currentaxes,'CurrentPoint');
     281    RulerCoord=[UvData.RulerCoord ;xy(1,1:2)]
     282    set(huvmat,'UserData',UvData)
     283    RulerCoord=diff(RulerCoord,1)
     284    RulerCoord=RulerCoord(1)+i*RulerCoord(2);
     285    distance=abs(RulerCoord)
     286    azimuth=(180/pi)*angle(RulerCoord)
     287    msgbox_uvmat('RULER','',['length: ' num2str(distance,3) ',  angle(degrees): ' num2str(azimuth,3)])
     288end
     289
    277290
    278291%display the data of the current object selected with the mouse right click
Note: See TracChangeset for help on using the changeset viewer.