Changeset 72 for trunk/src/series


Ignore:
Timestamp:
Mar 30, 2010, 11:03:42 AM (15 years ago)
Author:
sommeria
Message:

ima2vol: write image volumes in 16 bits (test for civ_3D)
plot-text removed: put as a sub-function of plot_field
uvmat: movie stops in case of error in reding files
bug fixes for reading 3D vel fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/ima2vol.m

    r41 r72  
    2020curdir=pwd;
    2121cd(path);
    22 mkdir([subdir_ima '_ij']);
     22mkdir([subdir_ima '_vol']);
    2323cd(curdir);
    24 basename_new=fullfile(path,[subdir_ima '_ij'],namebase);
     24basename_new=fullfile(path,[subdir_ima '_vol'],namebase);
    2525
    2626% read imadoc
     
    5555        t=set(t,uid_value(1),'value',ImageName)%indicate  name of the first image, with ;png extension
    5656    end 
    57 
    58 %     %add information about image transform
    59 %     [t,new_uid]=add(t,1,'element','ImageTransform');
    60 %     [t,NameFunction_uid]=add(t,new_uid,'element','NameFunction');
    61 %     [t]=add(t,NameFunction_uid,'chardata','sub_background');     
    62 %     [t,NbSlice_uid]=add(t,new_uid,'element','NbSlice');
    63 %     [t]=add(t,new_uid,'chardata',num2str(nbslice_i));
    64 %     [t,NbSlidingImages_uid]=add(t,new_uid,'element','NbSlidingImages');
    65 %     [t]=add(t,NbSlidingImages_uid,'chardata',num2str(nbaver));
    66 %     [t,LuminosityRank_uid]=add(t,new_uid,'element','RankBackground');
    67 %     [t]=add(t,LuminosityRank_uid,'chardata',num2str(rank));% luminosity rank almong the nbaver sliding images
    6857    save(t,[basename_new '.xml'])
    6958end
     
    8372    if num_j==nbfield2
    8473         filename_new=name_generator(basename_new,num_i,1,'.vol','_i');
    85          imwrite(vol,filename_new,'png')
     74         imwrite(vol,filename_new,'png','BitDepth',16)% WRITE IN 16 bits
    8675         vol=[];
    8776    end     
     
    10493Mfiltre=Mfiltre/(sum(sum(Mfiltre)));
    10594
    106 C=filter2(ones(windowsize)/windowsize^2,B);
     95C=filter2(Mfiltre,B);
    10796C(:,1:windowsize)=C(:,windowsize)*ones(1,windowsize);
    10897C(:,end-windowsize+1:end)=C(:,end-windowsize+1)*ones(1,windowsize);
     
    127116cmax=max(c_select);
    128117C=(C-cmin)/(cmax-cmin)*256;
    129 C=uint8(C);
     118%C=uint8(C);
Note: See TracChangeset for help on using the changeset viewer.