Changeset 956 for trunk/src/series/merge_proj.m
- Timestamp:
- Jun 22, 2016, 8:10:14 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/merge_proj.m
r955 r956 203 203 if min(cell2mat(CheckImage))==1 && (~Param.CheckObject || strcmp(Param.ProjObject.Type,'plane')) 204 204 FileExtOut='.png'; %image output (input and proj result = image) 205 for iview=1:NbView206 BitDepth(iview)=FileInfo{iview}.BitDepth;207 end208 BitDepth=max(BitDepth);209 205 else 210 206 FileExtOut='.nc'; %netcdf output … … 357 353 %% recording the merged field 358 354 if strcmp(FileExtOut,'.png') %output as image 359 if BitDepth==8360 imwrite(uint8(MergeData.A),OutputFile,'BitDepth',8)361 else362 imwrite(uint16(MergeData.A),OutputFile,'BitDepth',16)363 end364 355 if index==1 356 if strcmp(class(MergeData.A),'uint8') 357 BitDepth=8; 358 else 359 BitDepth=16; 360 end 365 361 %write xml calibration file, using the first file 366 362 siz=size(MergeData.A); … … 391 387 save(t,[fileparts(OutputFile) '.xml']) 392 388 end 393 389 if BitDepth==8 390 imwrite(uint8(MergeData.A),OutputFile,'BitDepth',8) 391 else 392 imwrite(uint16(MergeData.A),OutputFile,'BitDepth',16) 393 end 394 394 else %output as netcdf files 395 395 MergeData.ListGlobalAttribute={'Conventions','Project','InputFile_1','InputFile_end','NbCoord','NbDim'};
Note: See TracChangeset
for help on using the changeset viewer.