I tried saving as SVS:JPEG. The key issue seems to be whether there are multiple levels. If I save a small image in SVS:JPEG format, so it has only one level (plus thumbnail, label and macro images), OpenSlide behaves as I described before - it ignores the true thumbnail and the label image and returns the macro image as the thumbnail. If I save a larger image with two levels, OpenSlide behaves correctly.<div>
<br></div><div>Kent</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 6, 2012 at 12:59 PM, Cornwell, Carl (NIH/NLM/LHC) [C] <span dir="ltr">&lt;<a href="mailto:ccornwell@mail.nih.gov" target="_blank">ccornwell@mail.nih.gov</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It looks like you selected Output/Compression as TIF:LZW - is that correct? If so, can you redo the export with Output/Compression set to SVS:JPEG or SVS:JPEG2000?<br>

<br>
The OpenSlide code (openslide-vendor-aperios.c) accepts the current file as Aperio based only on the appearance of &quot;Aperio&quot; in the image description, then applies various checks which initially pass and identify the components correctly - so, in theory it should correctly assign the sub-images in your file. However, it looks like the LZW compression may be causing some problems - note the unrecognized tag 347 - although I can&#39;t see  exactly why in the code.<br>

<br>
Perhaps one of the experts will chime in soon.<br>
<br>
--<br>
Carl Cornwell<br>
Contractor<br>
Lister Hill National Center For<br>
   Biomedical Communications<br>
National Library of Medicine<br>
8600 Rockville Pike<br>
Bldg. 38A, Room 10S1015D<br>
Bethesda, MD 20894<br>
Voice <a href="tel:%28301%29%20435-5187" value="+13014355187">(301) 435-5187</a><br>
<br>
________________________________<br>
From: Kent Johnson [<a href="mailto:kent3737@gmail.com">kent3737@gmail.com</a>]<br>
Sent: Tuesday, November 06, 2012 10:22 AM<br>
To: <a href="mailto:openslide-users@lists.andrew.cmu.edu">openslide-users@lists.andrew.cmu.edu</a><br>
Subject: Reading file exported from Aperio ImageScope<br>
<div class="HOEnZb"><div class="h5"><br>
Hi,<br>
<br>
I&#39;m trying to use OpenSlide (openslide-win32-20120908) to read a partial-slide TIFF file exported from Aperio ImageScope. The file is recognized as an Aperio file but the component images are not interpreted correctly.<br>

<br>
The first image is read by OpenSlide as the level 0 image. The second image is a thumbnail. The third image is a label image and the fourth is a macro image. OpenSlide ignores the second and third images and uses the macro image as the thumbnail.<br>

<br>
My expectation is that the second image would be used as the thumbnail and the label and macro images would be included as associated images. Is this something that should work correctly or am I stretching OpenSlide a bit too much?<br>

<br>
Below is the tiffinfo output for the image.<br>
<br>
Thanks,<br>
Kent<br>
<br>
TIFF Directory at offset 0xc7563e<br>
  Subfile Type: (0 = 0x0)<br>
  Image Width: 3278 Image Length: 3026 Image Depth: 1<br>
  Tile Width: 240 Tile Length: 240<br>
  Bits/Sample: 8<br>
  Compression Scheme: LZW<br>
  Photometric Interpretation: RGB color<br>
  Image Description: &quot;Aperio Image Library v11.2.1 \r\n68340x43430 [49868,23390 3278x3026] (240x240) LZW;Aperio Image Library v8.0<br>
.19\n69360x43530 [0,0 68340x43430] (240x240) JPEG/RGB Q=70|AppMag = 20|StripeWidth = 2034|ScanScope ID = PHUSCA-W20585|Filename =<br>
13203|Title = none|Date = 01/03/07|Time = 14:09:11|User = f92fa4e0-e189-4a07-bb9b-095c3f5bbde4|MPP = 0.4667|Left = 9.760571|Top =<br>
22.175273|LineCameraSkew = 0.000000|LineAreaXOffset = 0.000000|LineAreaYOffset = 0.000000|DSR ID = 192.168.2.102|ImageID = 13203|O<br>
riginalWidth = 69360|Originalheight = 43530|OriginalWidth = 68340|OriginalHeight = 43430&quot;<br>
  Samples/Pixel: 3<br>
  Planar Configuration: single image plane<br>
  Predictor: horizontal differencing 2 (0x2)<br>
TIFF Directory at offset 0xd93922<br>
  Subfile Type: (0 = 0x0)<br>
  Image Width: 831 Image Length: 768 Image Depth: 1<br>
  Bits/Sample: 8<br>
  Compression Scheme: LZW<br>
  Photometric Interpretation: RGB color<br>
  Image Description: &quot;Aperio Image Library v11.2.1 \n3278x3026 -&gt; 831x768 - ;Aperio Image Library v8.0.19\n69360x43530 [0,0 68340x<br>
43430] (240x240) JPEG/RGB Q=70|AppMag = 20|StripeWidth = 2034|ScanScope ID = PHUSCA-W20585|Filename = 13203|Title = none|Date = 01<br>
/03/07|Time = 14:09:11|User = f92fa4e0-e189-4a07-bb9b-095c3f5bbde4|MPP = 0.4667|Left = 9.760571|Top = 22.175273|LineCameraSkew = 0<br>
.000000|LineAreaXOffset = 0.000000|LineAreaYOffset = 0.000000|DSR ID = 192.168.2.102|ImageID = 13203|OriginalWidth = 69360|Origina<br>
lheight = 43530|OriginalWidth = 68340|OriginalHeight = 43430&quot;<br>
  Samples/Pixel: 3<br>
  Rows/Strip: 3<br>
  Planar Configuration: single image plane<br>
  Predictor: horizontal differencing 2 (0x2)<br>
TIFF Directory at offset 0xdb0ede<br>
  Subfile Type: reduced-resolution image (1 = 0x1)<br>
  Image Width: 356 Image Length: 320 Image Depth: 1<br>
  Bits/Sample: 8<br>
  Compression Scheme: LZW<br>
  Photometric Interpretation: RGB color<br>
  Image Description: &quot;Aperio Image Library v11.2.1 \nlabel 356x320&quot;<br>
  Samples/Pixel: 3<br>
  Rows/Strip: 7<br>
  Planar Configuration: single image plane<br>
  Predictor: horizontal differencing 2 (0x2)<br>
TIFFReadDirectory: Warning, exported from ImageScope 13203.tif: unknown field with tag 347 (0x15b) encountered.<br>
TIFF Directory at offset 0xdbcd6c<br>
  Subfile Type: reduced-resolution image (9 = 0x9)<br>
  Image Width: 640 Image Length: 246 Image Depth: 1<br>
  Bits/Sample: 8<br>
  Compression Scheme: JPEG<br>
  Photometric Interpretation: RGB color<br>
  YCbCr Subsampling: 2, 2<br>
  Image Description: &quot;Aperio Image Library v11.2.1 \nmacro 640x246&quot;<br>
  Samples/Pixel: 3<br>
  Rows/Strip: 16<br>
  Planar Configuration: single image plane<br>
  Tag 347: &lt;unsupported data type in TIFFPrint&gt;<br>
</div></div></blockquote></div><br></div>