Fwd: OpenSlide library inquiry

David Gutman dagutman at gmail.com
Tue Jun 5 07:45:45 EDT 2012


aaah ok--- so I have to just make sure when I build VIPS from source I
compile against openslide as well---  I think last time I compiled it I was
building against the latest version of libtiff as well---   how does VIPS
"know" which library to use th read the JPEG2000 encoded tiff's or is there
some search hierarchy if it finds an encoding library X won't handle, it
will go to library Y?



On Mon, Jun 4, 2012 at 11:06 PM, Benjamin Gilbert <bgilbert at cs.cmu.edu>wrote:

> On 06/04/2012 07:39 PM, David Gutman wrote:
>
>> Ben--- I've been using vips to transcode  raw SVS files into pyramidal
>> tiff files... and it works as long as the images are not JPEG2000 encoded.
>>
>> vips im_vips2tiff  INPUT_SVS_FILE.svs
>> OUTPUT.dzi.tif:jpeg:75,tile:**256x256,pyramid,,,,8
>>
>> Basically the above command tells VIPS to transcode the original SVS
>> file (layer 0) into a pyramidal tiff at 75% quality as a jpeg, at
>> 256x256 tiles--- the "8" at the end tells it to save it as a BIGTIFF
>> image.  I use the dzi.tif  extension to remind me it's a deep
>> zoom/pyramidal tiff file...
>>
>
> Actually, Deep Zoom is a particular file format, unrelated to TIFF.
>
>
>  Do you think it would be possible to use VIPS/OpenSlide together to
>> accomplish the same thing in a single python script?    With the recent
>> integration/support of VIPS and OpenSlide that I saw I was hoping this
>> possible, but haven't delved into the details.
>>
>
> I haven't looked at the VIPS Python bindings, but if you have VIPS >=
> 7.28.3 linked against OpenSlide, it should be straightforward.  You can
> also do this directly from the VIPS command line.  The obvious approach
> with "vips tiffsave" does *not* work, because the TIFF writer gets confused
> by the fourth (alpha) channel returned by OpenSlide.  But you can use
> im_extract_bands:
>
>        vips im_extract_bands INPUT.svs \
>                OUTPUT.tif:jpeg:75,tile:**256x256,pyramid,,,,8 0 3
>
> --Benjamin Gilbert
>



-- 
David A Gutman, M.D. Ph.D.
Assistant Professor of Biomedical Informatics
Senior Research Scientist, Center for Comprehensive Informatics
Emory University School of Medicine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20120605/51ba059e/attachment.html 


More information about the openslide-users mailing list