Changeset 213


Ignore:
Timestamp:
Mar 4, 2011, 12:07:38 AM (14 years ago)
Author:
sommeria
Message:

bug corrected for 3D geometry calib: tilt angles

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/geometry_calib.m

    r207 r213  
    242242if strcmp(answer,'Yes')
    243243    if strcmp(calib_cell{val}(1:2),'3D')%set the plane position for 3D (projection) calibration
    244        input_key={'Z (first position)','Z (last position)','Z (water surface)', 'refractive index','NbSlice','volume scan (y/n)','tilt angle'};
    245        input_val=[{num2str(ZEnd)} {num2str(ZStart)} {num2str(ZStart)} {'1.33'} num2str(NbSlice_j) {volume_scan} {'0'}];
    246         answer=inputdlg(input_key,'slice position(s)',ones(1,7), input_val,'on');
     244       input_key={'Z (first position)','Z (last position)','Z (water surface)', 'refractive index','NbSlice','volume scan (y/n)','tilt angle y axis','tilt angle x axis'};
     245       input_val=[{num2str(ZEnd)} {num2str(ZStart)} {num2str(ZStart)} {'1.333'} num2str(NbSlice_j) {volume_scan} {'0'} {'0'}];
     246        answer=inputdlg(input_key,'slice position(s)',ones(1,8), input_val,'on');
    247247        %answer_1=msgbox_uvmat('INPUT_TXT',' Z= ',num2str(Z_plane));
    248248        GeometryCalib.NbSlice=str2double(answer{5});
     
    254254        end     
    255255        GeometryCalib.SliceCoord=Z_plane'*[0 0 1];
    256         GeometryCalib.SliceAngle=answer{7}*ones(GeometryCalib.NbSlice,1)*[0 1 0];%rotation around y axis (to generalise)
     256        GeometryCalib.SliceAngle(:,3)=0;
     257        GeometryCalib.SliceAngle(:,2)=str2double(answer{7})*ones(GeometryCalib.NbSlice,1);%rotation around y axis (to generalise)
     258        GeometryCalib.SliceAngle(:,1)=str2double(answer{8})*ones(GeometryCalib.NbSlice,1);%rotation around x axis (to generalise)
    257259        GeometryCalib.InterfaceCoord=[0 0 str2double(answer{3})];
    258260        GeometryCalib.RefractionIndex=str2double(answer{4});     
  • trunk/src/get_field.m

    r204 r213  
    6363%% prepare the list of RUN fcts and set their paths
    6464% functions included by default in 'get_field.m
    65 menu_str={'PLOT';'FFT';'filter_band';'histogram'};
     65menu_str={'PLOT';'FFT';'filter_band'};
    6666nb_builtin=numel(menu_str);
    6767path_uvmat=fileparts(which('uvmat'));%path of the function 'uvmat'
     
    627627        return
    628628    else
    629         perm_ind=[1:nbdim];
     629        perm_ind=1:nbdim;
    630630    end
    631631    if nbdim==3
     
    836836function plot_get_field(SubField,handles)
    837837%------------------------------------------------------------------------
    838 list_fig=get(handles.list_fig,'String')
     838list_fig=get(handles.list_fig,'String');
    839839val=get(handles.list_fig,'Value');
    840840if strcmp(list_fig{val},'uvmat')
  • trunk/src/mouse_motion.m

    r207 r213  
    175175                            if size(Field.PlaneCoord)>=[ZIndex 3]
    176176                            z=Field.PlaneCoord(ZIndex,3);
    177                             if isfield(Field,'PlaneAngle')
     177                            if isfield(Field,'PlaneAngle')&&~isequal(Field.PlaneAngle,[0 0 0])
    178178                                om=norm(Field.PlaneAngle(ZIndex,:));%norm of rotation angle in radians
    179179                                OmAxis=Field.PlaneAngle(ZIndex,:)/om; %unit vector marking the rotation axis
  • trunk/src/proj_field.m

    r212 r213  
    208208     
    209209    else
    210         if length(ivar_X)>1 | length(ivar_Y)>1 | length(ivar_Z)>1
     210        if length(ivar_X)>1 || length(ivar_Y)>1 || length(ivar_Z)>1
    211211                 errormsg='multiple coordinate input in proj_field.m';
    212212                    return
     
    238238            test3D=1;
    239239        end
    240         if length(ivar_F)>1 | length(ivar_FF)>1
     240        if length(ivar_F)>1 || length(ivar_FF)>1
    241241                 msgbox_uvmat('ERROR','multiple flag input in proj_field.m')
    242242                    return
     
    748748            elseif isequal(ProjMode,'filter') %filtering
    749749                npoint=floor(linelength/DX)+1;% nbre of points in the profile (interval DX)
    750                 Xproj=[linelength/(2*npoint):linelength/npoint:linelength-linelength/(2*npoint)];
     750                Xproj=linelength/(2*npoint):linelength/npoint:linelength-linelength/(2*npoint);
    751751                siz=size(X_sel);
    752752                xregij=cos(theta(ip))*Xproj'*ones(1,siz(2))+ObjectData.Coord(ip,1);
     
    887887                    eval(['ProjData.' VarName{ivar} '=((sum(A_out,1)/npY))'';']);
    888888                elseif nbcolor==3
    889                     vec_B(ind_in,[1:3])=vec_A(ICOMB,:);
     889                    vec_B(ind_in,1:3)=vec_A(ICOMB,:);
    890890                    vec_B(ind_out,1)=zeros(size(ind_out));
    891891                    vec_B(ind_out,2)=zeros(size(ind_out));
     
    13281328        end
    13291329        npX=1+round(abs(Coord{NbDim}(end)-Coord{NbDim}(1))/DX);%nbre of points after interpol
    1330         for idim=[1:NbDim]
     1330        for idim=1:NbDim
    13311331            if test_interp(idim)
    13321332                DimValue(idim)=1+round(abs(Coord{idim}(end)-Coord{idim}(1))/abs(DCoord_min(idim)));%nbre of points after possible interpolation on a regular gri
  • trunk/src/set_object.m

    r212 r213  
    767767%% plot the field projected on the object and store in the corresponding figue
    768768'TESTproj'
     769UvData.Field
     770ObjectData
    769771ProjData= proj_field(UvData.Field,ObjectData)%project the current interface field on ObjectData
    770772PlotParam=read_plot_param(PlotHandles);
Note: See TracChangeset for help on using the changeset viewer.