Changeset 72 for trunk/src/series
- Timestamp:
- Mar 30, 2010, 11:03:42 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/ima2vol.m
r41 r72 20 20 curdir=pwd; 21 21 cd(path); 22 mkdir([subdir_ima '_ ij']);22 mkdir([subdir_ima '_vol']); 23 23 cd(curdir); 24 basename_new=fullfile(path,[subdir_ima '_ ij'],namebase);24 basename_new=fullfile(path,[subdir_ima '_vol'],namebase); 25 25 26 26 % read imadoc … … 55 55 t=set(t,uid_value(1),'value',ImageName)%indicate name of the first image, with ;png extension 56 56 end 57 58 % %add information about image transform59 % [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 images68 57 save(t,[basename_new '.xml']) 69 58 end … … 83 72 if num_j==nbfield2 84 73 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 86 75 vol=[]; 87 76 end … … 104 93 Mfiltre=Mfiltre/(sum(sum(Mfiltre))); 105 94 106 C=filter2( ones(windowsize)/windowsize^2,B);95 C=filter2(Mfiltre,B); 107 96 C(:,1:windowsize)=C(:,windowsize)*ones(1,windowsize); 108 97 C(:,end-windowsize+1:end)=C(:,end-windowsize+1)*ones(1,windowsize); … … 127 116 cmax=max(c_select); 128 117 C=(C-cmin)/(cmax-cmin)*256; 129 C=uint8(C);118 %C=uint8(C);
Note: See TracChangeset
for help on using the changeset viewer.