Changeset 229:32c86849a1ed


Ignore:
Timestamp:
10/18/2012 01:56:36 PM (8 years ago)
Author:
Dmitry Fedorov <fedorov@…>
Branch:
default
Phase:
public
Message:

fixes for reaading ome-bigtiff and additional tests

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libsrc/libbioimg/formats/tiff/dim_ometiff_format_io.cpp

    r221 r229  
    260260  if (!par) return 1;
    261261  if (!par->dimTiff) return 1;
    262   if (par->subType != tstOmeTiff) return 1; 
     262  if (par->subType != tstOmeTiff && par->subType != tstOmeBigTiff) return 1; 
    263263  bim::TinyTiff::IFD *ifd = par->ifds.firstIfd();
    264264  if (!ifd) return 1;
  • libsrc/libbioimg/formats/tiff/dim_tiff_format.cpp

    r221 r229  
    317317    lsmGetCurrentPageInfo(tiffParams);
    318318  else
    319   if ( tiffParams->subType == tstOmeTiff )
     319  if ( tiffParams->subType == tstOmeTiff || tiffParams->subType == tstOmeBigTiff )
    320320    omeTiffGetCurrentPageInfo(tiffParams);
    321321}
  • libsrc/libbioimg/formats/tiff/dim_tiff_format_io.cpp

    r227 r229  
    687687  }
    688688 
    689   if (tifParams->subType != tstOmeTiff) img->i = tifParams->info;
     689  if (tifParams->subType!=tstOmeTiff && tifParams->subType!=tstOmeBigTiff )
     690      img->i = tifParams->info;
    690691
    691692  TIFFGetField(tif, TIFFTAG_COMPRESSION, &compression);
     
    699700
    700701  // this is here due to some OME-TIFF do not conform with the standard and come with all channels in the same IFD
    701   if (tifParams->subType == tstOmeTiff) {
     702  if (tifParams->subType==tstOmeTiff || tifParams->subType==tstOmeBigTiff) {
    702703    int r = omeTiffReadPlane( fmtHndl, tifParams, fmtHndl->pageNumber );
    703704    if (r != 2) return r;
     
    746747  if (!areValidParams(fmtHndl, tifParams)) return 1;
    747748
    748   if (tifParams->subType == tstOmeTiff)
     749  if (tifParams->subType == tstOmeTiff || tifParams->subType == tstOmeBigTiff)
    749750    return omeTiffWritePlane( fmtHndl, tifParams);
    750751
  • testing/runtest.py

    r222 r229  
    576576    test_image_metadata( "IBW", "tubule20000.ibw", meta_test )
    577577   
    578     ##meta_test = {}
    579     ##meta_test['image_num_z'] = '13'
    580     ##meta_test['image_num_t'] = '1'
    581     ##meta_test['pixel_resolution_x'] = '0.207160'
    582     ##meta_test['pixel_resolution_y'] = '0.207160'
    583     ##meta_test['pixel_resolution_z'] = '1.000000'
    584     ##meta_test['pixel_resolution_unit_x'] = 'microns'
    585     ##meta_test['pixel_resolution_unit_y'] = 'microns'
    586     ##meta_test['pixel_resolution_unit_z'] = 'microns'
    587     ##meta_test['channel_0_name'] = 'FITC'
    588     ##meta_test['channel_1_name'] = 'Cy3'
    589     ##test_image_metadata( "OME-BigTIFF", "bigtiff.ome.btf", meta_test )
     578    meta_test = {}
     579    meta_test['image_num_z'] = '13'
     580    meta_test['image_num_t'] = '1'
     581    meta_test['pixel_resolution_x'] = '0.207160'
     582    meta_test['pixel_resolution_y'] = '0.207160'
     583    meta_test['pixel_resolution_z'] = '1.000000'
     584    meta_test['pixel_resolution_unit_x'] = 'microns'
     585    meta_test['pixel_resolution_unit_y'] = 'microns'
     586    meta_test['pixel_resolution_unit_z'] = 'microns'
     587    meta_test['channel_0_name'] = 'FITC'
     588    meta_test['channel_1_name'] = 'Cy3'
     589    test_image_metadata( "OME-BigTIFF", "bigtiff.ome.btf", meta_test )
    590590
    591591if 'all' in mode or 'readmeta' in mode:
Note: See TracChangeset for help on using the changeset viewer.