Changeset 84 for trunk/src/uvmat.m


Ignore:
Timestamp:
Apr 24, 2010, 2:07:22 PM (14 years ago)
Author:
sommeria
Message:

-update_imadoc: copy the timing information of the movie file avi in the new xml file when a geometry_calibration is performed
-set_grid: modified to produce grids in px coordiantes and to display the produced grid
-geometry_calib: display the point with max error
-civ: bug corrected for copying avi movies to png files
-uvmat: small bug fixes
-px_XYZ: introduce default values for Calib parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r82 r84  
    788788    nbfield=size(XmlData.Time,1);
    789789    nburst=size(XmlData.Time,2);
     790    %transform .Time to a column vector if it is a line vector the nomenclature uses a single index
     791    if isequal(nbfield,1) && ~isequal(nburst,1)% .Time is a line vector
     792        NomType=get(handles.FileIndex,'UserData');
     793        if numel(NomType)>=2 &&(strcmp(NomType,'_i')||strcmp(NomType(1:2),'%0')||strcmp(NomType(1:2),'_%'))
     794            XmlData.Time=(XmlData.Time)';
     795            nbfield=nburst;
     796            nburst=1;
     797        end
     798    end
    790799end
    791800last_i_cell=get(handles.last_i,'String');
     
    822831            set(handles.pycm,'String',num2str(pixcmy))
    823832        end
    824         set(handles.transform_fct,'Value',2); % phys transform by default
     833        if ~get(handles.FixedLimits,'Value')
     834            set(handles.transform_fct,'Value',2); % phys transform by default if fixedLimits is off
     835        end
    825836        if isfield(GeometryCalib,'SliceCoord')
    826837           siz=size(GeometryCalib.SliceCoord);
     
    21222133     switch FileType
    21232134        case 'movie'
    2124             A=read(UvData.MovieObject,num_i1);
     2135            try
     2136                A=read(UvData.MovieObject,num_i1);
     2137            catch
     2138                errormsg=lasterr;
     2139                return
     2140            end
    21252141        case 'avi'
    2126             mov=aviread(filename,num_i1);
     2142            try
     2143                mov=aviread(filename,num_i1);
     2144            catch
     2145                errormsg=lasterr;
     2146                return
     2147            end
    21272148            A=frame2im(mov(1));
    21282149        case 'vol'
     
    28142835else
    28152836    set(handles.FixedLimits,'BackgroundColor',[0.7 0.7 0.7])
     2837    update_plot(handles);
    28162838end
    28172839
     
    42084230% --- Executes on button press in grid.
    42094231function grid_Callback(hObject, eventdata, handles)
    4210 %-------------------------------------------------------------------
    4211 
    4212 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
    4213 
    4214 %suppress the other options if grid is chosen
    4215 set(handles.edit_vect,'Value',0)
    4216 edit_vect_Callback(hObject, eventdata, handles)
    4217 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    4218 set(handles.edit_vect,'Value',0) 
    4219 edit_vect_Callback(hObject, eventdata, handles)
    4220 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    4221 set(handles.list_object_1,'Value',1)     
    4222 
    4223 %prepare display of the set_grid GUI
    4224 data.fixedtitle=1;
    4225 FileName=read_file_boxes(handles);
    4226 [hset_object,UvData.sethandles]=set_grid(FileName);% call the set_object interface
    4227 set(handles.uvmat,'UserData',UvData);
     4232
    42284233
    42294234
     
    47064711%-- open the GUI set_grid.fig to create grid
    47074712function MenuGrid_Callback(hObject, eventdata, handles)
    4708 set(handles.TOOLS_txt,'Visible','on')
    4709 set(handles.frame_tools,'Visible','on')
    4710 grid_Callback(hObject,eventdata,handles)
     4713%UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
     4714
     4715%suppress the other options if grid is chosen
     4716set(handles.edit_vect,'Value',0)
     4717edit_vect_Callback(hObject, eventdata, handles)
     4718set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
     4719set(handles.edit_vect,'Value',0) 
     4720edit_vect_Callback(hObject, eventdata, handles)
     4721set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
     4722set(handles.list_object_1,'Value',1)     
     4723
     4724%prepare display of the set_grid GUI
     4725FileName=read_file_boxes(handles);
     4726CoordList=get(handles.transform_fct,'String');
     4727val=get(handles.transform_fct,'Value');
     4728set_grid(FileName,CoordList{val});% call the set_object interface
     4729%set(handles.uvmat,'UserData',UvData);
    47114730
    47124731%----------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.