Ignore:
Timestamp:
Mar 23, 2010, 2:52:49 PM (14 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/imadoc2struct.m

    r29 r60  
    210210        %look for laser plane definitions   
    211211        uid_Angle=find(subt,'/GeometryCalib/PlaneAngle');
    212         uid_Pos=find(subt,'/GeometryCalib/PlanePos');
     212        uid_Pos=find(subt,'/GeometryCalib/SliceCoord');
     213        if isempty(uid_Pos)
     214            uid_Pos=find(subt,'/GeometryCalib/PlanePos');%old convention
     215        end
    213216        if ~isempty(uid_Angle)
    214217            tsai.PlaneAngle=str2num(get(subt,children(subt,uid_Angle),'value'));
    215218        end
    216         if ~isempty(uid_Pos)
     219        if ~isempty(uid_Pos)     
    217220            for j=1:length(uid_Pos)
    218221                tsai.SliceCoord(j,:)=str2num(get(subt,children(subt,uid_Pos(j)),'value'));
    219222            end
     223            uid_DZ=find(subt,'/GeometryCalib/SliceDZ');
     224            uid_NbSlice=find(subt,'/GeometryCalib/NbSlice');
     225            if ~isempty(uid_DZ) && ~isempty(uid_NbSlice)
     226                DZ=str2double(get(subt,children(subt,uid_DZ),'value'));
     227                NbSlice=get(subt,children(subt,uid_NbSlice),'value');
     228                if isequal(NbSlice,'volume')
     229                    tsai.NbSlice='volume';
     230                    NbSlice=NbDtj+1;
     231                else
     232                    tsai.NbSlice=str2double(NbSlice);
     233                end
     234                tsai.SliceCoord=ones(NbSlice,1)*tsai.SliceCoord+DZ*[0:NbSlice-1]'*[0 0 1];
     235            end         
    220236        end
    221237        s.GeometryCalib=tsai;
Note: See TracChangeset for help on using the changeset viewer.