These are the codes we use to:
- Convert .svs to .dzi and publish as or embed in a web page
- Making a digital pathology archive
- deeply inspired by:
- to select a certain area from a .svs file and reduce the file size, one can use Imagescope and its extract region tool.
brew install vips
brew install openslide
pip3 install openslide-python
vips dzsave HE.svs HE
this runs a long time depending on file size
-
one file:
HE.dzi
-
one folder:
HE_files
This folder contains multilevel images
<?xml version="1.0" encoding="UTF-8"?>
<Image xmlns="http://schemas.microsoft.com/deepzoom/2008"
Format="jpeg"
Overlap="1"
TileSize="254"
>
<Size
Height="30580"
Width="51792"
/>
</Image>
-
see
HE.html
<meta charset="utf-8"/>
<div id="openseadragon1" style="width: 100%; height: 95%;"></div>
<script src="./openseadragon/openseadragon.min.js"></script>
<script type="text/javascript">
var viewer = OpenSeadragon({
id: 'openseadragon1',
prefixUrl : './openseadragon/images/',
tileSources: {
Image: {
Url: './HE_files/', // name of image folder
TileSize: '254', // see .dzi file
Overlap: '1', // see .dzi file
Format: 'jpeg', // see .dzi file
ServerFormat: 'Default', // optional
xmlns: 'http://schemas.microsoft.com/deepzoom/2009', // see .dzi file
Size: {
Width: '51792', // see .dzi file
Height: '30580' // see .dzi file
}
}}});
</script>
- [https://images.patolojiatlasi.com/template/HE.html](https://images.patolojiatlasi.com/template/HE.html)
- See Microscopy with viewer:
<iframe src="https://images.patolojiatlasi.com/template/HE.html" width="100%" height="400px"></iframe>