cytomine / Cytomine-IMS

Cytomine-IMS: Image Management System
GNU Lesser General Public License v2.1
14 stars 16 forks source link

Support tiled tiff /tiff #3

Closed rmaree closed 10 years ago

rmaree commented 10 years ago

Au départ, tentative d'uploader une image "tiled tiff": cela ne passe pas. C'est un format TIFF spécial qui peut être lu par bioformats. Pour tester j'ai fait une conversion manuelle de cette image avec fiji en tif "normal".

Ensuite j'ai fait tentative d'upload mais ça coince quelque part.

Log catalina:
27-02-2014 10:28:45,325  INFO ModelService - Command class be.cytomine.command.EditCommand with flag false
be.cytomine.image.UploadedFile : 104618576
[error_convert:false, error_format:false, status:2, converted:false, deployed:true, uploaded:false, class:be.cytomine.image.UploadedFile, to_deploy:false, storages:[17763541], contentType:image/tiff, deleted:null, ext:t\
if, size:1316819224, id:104618576, projects:[101899914], updated:1393493325229, created:1393493321975, path:/tmp/imageserver_buffer, filename:14/1393496467841/base2_c1_nuclei_notiled_xn.tif, originalFilename:base2_c1_nu\
clei_notiled_xn.tif, user:14, uncompressed:false]
27-02-2014 10:28:45,227  INFO ModelService - edit
be.cytomine.image.UploadedFile : 104618576
27-02-2014 10:28:45,228  INFO ModelService - beforeUpdate
27-02-2014 10:28:45,228  INFO ModelService - saveDomain
status originalValue=4
status realValue=2
27-02-2014 10:28:45,231  INFO ModelService - afterUpdate
27-02-2014 10:28:45,231  INFO ModelService - response
be.cytomine.image.UploadedFile : 104618576
27-02-2014 10:28:45,262  INFO RequestFilters - restUploadedFile.update Request took 46ms
27-02-2014 10:28:45,292  INFO RequestFilters - restUploadedFile.show: user:14
be.cytomine.image.UploadedFile : 104618576
27-02-2014 10:28:45,303  INFO RequestFilters - restUploadedFile.show Request took 10ms
27-02-2014 10:28:45,316  INFO RequestFilters - restUploadedFile.update: user:14
27-02-2014 10:28:45,325  INFO ModelService - Command class be.cytomine.command.EditCommand with flag false
be.cytomine.image.UploadedFile : 104618576
27-02-2014 10:28:45,225  INFO ModelService - Command class be.cytomine.command.EditCommand with flag false
be.cytomine.image.UploadedFile : 104618576
[error_convert:true, error_format:false, status:2, converted:false, deployed:false, uploaded:false, class:be.cytomine.image.UploadedFile, to_deploy:false, storages:[17763541], contentType:image/tiff, deleted:null, ext:t\
if, size:1316819224, id:104618576, projects:[101899914], updated:1393493322154, created:1393493321975, path:/tmp/imageserver_buffer, filename:14/1393496467841/base2_c1_nuclei_notiled_xn.tif, originalFilename:base2_c1_nu\
clei_notiled_xn.tif, user:14, uncompressed:false]

tiffinfo de l'image uploadée donne:

maree@cytomine-imageserver-os:/data/beta.cytomine.be/14/14/1393496467841$ tiffinfo base2_c1_nuclei_notiled_xn.tif
TIFFReadDirectoryCheckOrder: Warning, Invalid TIFF directory; tags are not sorted in ascending order.
TIFFReadDirectory: Warning, Unknown field with tag 317 (0x13d) encountered.
TIFF Directory at offset 0x8 (8)
  Image Width: 31744 Image Length: 41472
  Resolution: 72, 72 pixels/inch
  Bits/Sample: 8
  Compression Scheme: None
  Photometric Interpretation: min-is-black
  Samples/Pixel: 1
  Rows/Strip: 1
  Planar Configuration: single image plane
  Software: LIBFORMAT (c) Pierre-e Gougelet
  ImageDescription: ImageJ=1.45b
unit=micron
  Tag 317: 1

Pourtant si ensuite j'utilise vips pour la convertir ça a l'air d'aller (avec warning):

maree@cytomine-imageserver-os:/data/beta.cytomine.be/14/14/1393496467841/
vips im_vips2tiff base2_c1_nuclei_notiled_xn.tif output_image.tif:deflate,,flat,,,,8
vips warning: TIFFReadDirectoryCheckOrder: Invalid TIFF directory; tags are not sorted in ascending order
vips warning: TIFFReadDirectory: Unknown field with tag 317 (0x13d) encountered
vips warning: TIFFReadDirectoryCheckOrder: Invalid TIFF directory; tags are not sorted in ascending order
vips warning: TIFFReadDirectory: Unknown field with tag 317 (0x13d) encountered
vips warning: TIFFReadDirectoryCheckOrder: Invalid TIFF directory; tags are not sorted in ascending order
vips warning: TIFFReadDirectory: Unknown field with tag 317 (0x13d) encountered
vips warning: TIFFReadDirectoryCheckOrder: Invalid TIFF directory; tags are not sorted in ascending order
vips warning: TIFFReadDirectory: Unknown field with tag 317 (0x13d) encountered

screen vips tiffsave output_image.tif output_image_compress.tif --tile --pyramid --compression jpeg --tile-width 256 --tile-height 256

maree@cytomine-imageserver-os:/data/beta.cytomine.be/14/14/1393496467841$ ls -altr
total 1973864
-rwxrwxrwx    1 tomcat7 tomcat7 1316819224 fév 27 11:21 base2_c1_nuclei_notiled_xn.tif
drwxrwxrwx 4561 storage storage     143360 fév 27 11:21 ..
-rw-rw-r--    1 maree   maree    601027108 fév 27 11:30 output_image.tif
drwxrwxrwx    2 tomcat7 tomcat7       4096 fév 27 11:32 .
-rw-rw-r--    1 maree   maree    103221075 fév 27 11:33 output_image_compress.tif

tiffinfo des fichiers produits par vips:

maree@cytomine-imageserver-os:/data/beta.cytomine.be/14/14/1393496467841$ tiffinfo output_image.tif
TIFF Directory at offset 0x23d24efc (600985340)
  Image Width: 31744 Image Length: 41472
  Resolution: 28.3465, 28.3465 pixels/cm
  Bits/Sample: 8
  Compression Scheme: AdobeDeflate
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 16
  Planar Configuration: single image plane
maree@cytomine-imageserver-os:/data/beta.cytomine.be/14/14/1393496467841$ tiffinfo output_image_compress.tif
TIFF Directory at offset 0x23d24efc (600985340)
  Image Width: 31744 Image Length: 41472
  Resolution: 28.3465, 28.3465 pixels/cm
  Bits/Sample: 8
  Compression Scheme: AdobeDeflate
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 16
  Planar Configuration: single image plane
maree@cytomine-imageserver-os:/data/beta.cytomine.be/14/14/1393496467841$ tiffinfo output_image_compress.tif
TIFF Directory at offset 0x43da558 (71148888)
  Image Width: 31744 Image Length: 41472
  Tile Width: 256 Tile Length: 256
  Resolution: 28.3465, 28.3465 pixels/cm
  Bits/Sample: 8
  Compression Scheme: JPEG
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Planar Configuration: single image plane
  JPEG Tables: (289 bytes)
TIFF Directory at offset 0x581153a (92345658)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 15872 Image Length: 20736
  Tile Width: 256 Tile Length: 256
  Resolution: 28.3465, 28.3465 pixels/cm
  Bits/Sample: 8
  Compression Scheme: JPEG
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Planar Configuration: single image plane
  JPEG Tables: (289 bytes)
TIFF Directory at offset 0x5f1dbfa (99736570)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 7936 Image Length: 10368
  Tile Width: 256 Tile Length: 256
  Resolution: 28.3465, 28.3465 pixels/cm
  Bits/Sample: 8
  Compression Scheme: JPEG
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Planar Configuration: single image plane
  JPEG Tables: (289 bytes)
TIFF Directory at offset 0x617bca4 (102218916)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 3968 Image Length: 5184
  Tile Width: 256 Tile Length: 256
  Resolution: 28.3465, 28.3465 pixels/cm
  Bits/Sample: 8
  Compression Scheme: JPEG
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Planar Configuration: single image plane
  JPEG Tables: (289 bytes)
TIFF Directory at offset 0x622e212 (102949394)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 1984 Image Length: 2592
  Tile Width: 256 Tile Length: 256
  Resolution: 28.3465, 28.3465 pixels/cm
  Bits/Sample: 8
  Compression Scheme: JPEG
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Planar Configuration: single image plane
  JPEG Tables: (289 bytes)
TIFF Directory at offset 0x625de3a (103145018)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 992 Image Length: 1296
  Tile Width: 256 Tile Length: 256
  Resolution: 28.3465, 28.3465 pixels/cm
  Bits/Sample: 8
  Compression Scheme: JPEG
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Planar Configuration: single image plane
  JPEG Tables: (289 bytes)
TIFF Directory at offset 0x626affa (103198714)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 496 Image Length: 648
  Tile Width: 256 Tile Length: 256
  Resolution: 28.3465, 28.3465 pixels/cm
  Bits/Sample: 8
  Compression Scheme: JPEG
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Planar Configuration: single image plane
  JPEG Tables: (289 bytes)
TIFF Directory at offset 0x626f750 (103216976)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 248 Image Length: 324
  Tile Width: 256 Tile Length: 256
  Resolution: 28.3465, 28.3465 pixels/cm
  Bits/Sample: 8
  Compression Scheme: JPEG
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Planar Configuration: single image plane
  JPEG Tables: (289 bytes)
TIFF Directory at offset 0x6270550 (103220560)
  Subfile Type: reduced-resolution image (1 = 0x1)
  Image Width: 124 Image Length: 162
  Tile Width: 256 Tile Length: 256
  Resolution: 28.3465, 28.3465 pixels/cm
  Bits/Sample: 8
  Compression Scheme: JPEG
  Photometric Interpretation: min-is-black
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Planar Configuration: single image plane
  JPEG Tables: (289 bytes)
stevben commented 10 years ago

Peux-tu fournir un lien pour télécharger l'image ?

rmaree commented 10 years ago

Depuis réseau ULG (ou VPN) monter en SAMBA:

\storage.giga.priv\uXXXXXX User: ULG\uXXXXXX Mot de passe: le même que pour l'e-mail ULG. Puis aller dans: Platforms\IMG\CYT\DATA\

Ou bien:

scp uXXXXXX@10.19.0.21:/gpfs0/home/ULG/uXXXXXX/Platforms/IMG/CYT/DATA/base2_c1_nuclei_notiled_xn.tif