[ome-devel] bug in single channel tiff importer

Richard Beare Richard.Beare at csiro.au
Sat Dec 18 06:07:24 GMT 2004


Hi,
I've just come across a problem that seems to be present in the latest 
cvs version. Just thought I'd let you know. Let me know if I've done 
something stupid.

If I import a colour tif, everything seems OK:

ome import image78.tif
Importing files
         1/4: [IN PROGRESS] Starting import
         3/4: [IN PROGRESS] Importing
         4/4: [IN PROGRESS] Executing import chain
         4/4: [FINISHED] Imported 1 images from 1 files. 1 scanned. 0 
unknown format, 0 duplicates, 0 errors.
Successfully Imported:
41: image78
Exiting...
Exiting...

However the single channel equivalent gives the following:

 ome import crap.tif
Importing files
         1/4: [IN PROGRESS] Starting import
WARNING: Error convertPlaneFromTIFF failed: Error calling ConvertTIFF 
with PixelsID=12: Did not convert correct number of pixels.  Expected 
1048576, got 0
OMEIS Error: ConvertTIFF (PixelsID=12). TIFF (ID=118) <-> Pixels mismatch.
        Width x Height:    Pixels (1024,1024) TIFF (1024,1024)
        Samples per pixel: Pixels (1) TIFF (1)
        Bits per sample:   Pixels (8) TIFF (8)
        Planar Config:     Pixels (1) TIFF (2)
        
OME::Image::Server::__callOMEIS('OME::Image::Server','theZ',0,'theC',0,'PixelsID',12,'Method','ConvertTIFF',...) 
called at /usr/lib/perl5/site_perl/5.8.3/OME/Image/Server.pm line 1438
        
OME::Image::Server::convertPlaneFromTIFF('OME::Image::Server',12,0,0,0,118) 
called at /usr/lib/perl5/site_perl/5.8.3/OME/Image/Server/Pixels.pm line 
519        
OME::Image::Server::Pixels::convertPlaneFromTIFF('OME::Image::Server::Pixels=ARRAY(0x9843684)','OME::Image::Server::File=ARRAY(0x958fd44)',0,0,0) 
called at /usr/lib/perl5/site_perl/5.8.3/OME/ImportEngine/TIFFreader.pm 
line 402
        eval {...} called at 
/usr/lib/perl5/site_perl/5.8.3/OME/ImportEngine/TIFFreader.pm line 399
        
OME::ImportEngine::TIFFreader::importGroup('OME::ImportEngine::TIFFreader=HASH(0x97775ec)','HASH(0x980eba8)','CODE(0x90a323c)') 
called at 
/usr/lib/perl5/site_perl/5.8.3/OME/ImportEngine/ImportEngine.pm line 345
        eval {...} called at 
/usr/lib/perl5/site_perl/5.8.3/OME/ImportEngine/ImportEngine.pm line 344
        
OME::ImportEngine::ImportEngine::importFiles('OME::ImportEngine::ImportEngine=HASH(0x9471150)','ARRAY(0x9196c10)') 
called at /usr/lib/perl5/site_perl/5.8.3/OME/Tasks/ImageTasks.pm line 147
        eval {...} called at 
/usr/lib/perl5/site_perl/5.8.3/OME/Tasks/ImageTasks.pm line 135
        
OME::Tasks::ImageTasks::importFiles('undef','ARRAY(0x94133c4)','HASH(0x9419120)','OME::Task=HASH(0x94f308c)') 
called at /usr/lib/perl5/site_perl/5.8.3/OME/Util/Import.pm line 230
        
OME::Util::Import::import('OME::Util::Import','ARRAY(0x87af600)') called 
at /usr/lib/perl5/site_perl/5.8.3/OME/Util/Commands.pm line 265
        
OME::Util::Commands::handleCommand('OME::Util::Import',0,'ARRAY(0x87af600)') 
called at /usr/lib/perl5/site_perl/5.8.3/OME/Util/Commands.pm line 238
        OME::Util::Commands::handleCommand('OME::Util::OMECommander',0) 
called at /usr/local/bin/ome line 64
 
 importing image: OME::ImportEngine::TIFFreader HASH(0x980eba8)
         4/4: [FINISHED] Imported 0 images from 0 files. 1 scanned. 0 
unknown format, 0 duplicates, 1 errors.
Successfully Imported:
Exiting...
         4/4: [FINISHED] Imported 0 images from 0 files. 1 scanned. 0 
unknown format, 0 duplicates, 1 errors.
Exiting...


The tiffinfo outputs for each image are:
tiffinfo  crap.tif
TIFF Directory at offset 0x987f4
  Image Width: 1024 Image Length: 1024
  Bits/Sample: 8
  Compression Scheme: PackBits
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 8
  Planar Configuration: separate image planes

tiffinfo  image78.tif
TIFF Directory at offset 0x8
  Subfile Type: (0 = 0x0)
  Image Width: 1024 Image Length: 1024
  Resolution: 150, 150 pixels/inch
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: RGB color
  Samples/Pixel: 3
  Rows/Strip: 1024
  Planar Configuration: single image plane
  ICC Profile: <present>, 3144 bytes
  Photoshop Data: <present>, 4192 bytes



More information about the ome-devel mailing list