Comments (7)
Not too familiar with Leica, but my assumption is that the low level image data is the full size of what the scanner is capable of and within that space, in the case of nims-002.scn, there is a 62656x38816 sized image at the offset (8884,38525) according to the openslide.bounds-
properties. It looks like width and height may be swapped between the tool you're using and the properties openslide extracted from the slide.
The levels you are seeing in the original image include interpolated levels which are probably created by downsampling from a higher level. The actual levels that openslide sees in the slide are,
openslide level 0 == scn base
openslide level 1 == scn level 2
openslide level 2 == scn level 4
openslide level 3 == scn level 6
openslide level 4 == not shown in scn tool
from openslide-python.
Issue Regarding Levels Extraction of Leica .scn Images
Hello @jaharkes , @bgilbert, @agoode
I see your point. But even then openslide level 1 == scn level 2, openslide level 2 == scn level 4. The numeric values of height and width do not seem to match among them at all even if we assume they are swapped. The interpolated levels which you have mentioned, can you please elaborate on it a bit?
.
I request you to kindly go through the nims-002 and nims-004.txt document once again . The original question remains unanswered ie For two different Whole Slide Images (original images) openslide slide.level_dimensions and slide.properties function gives same level values and same dimensions. How is it possible when both of them have different values of the levels and different dimensions all together?
Also the number of levels mentioned in openslide about the orginal image seems to be wrong. It shows 5 levels when one of the images have 6 levels.
As a result I get tiles with huge y-coordinates(out of range) and few tiles that are completely black. I am attaching the nims-002 and nims-004.txt documents once again.
Request you to go through the document, images and suggest a feasible solution. If it could be fixed so that any other users would not face similar issues. Its very crucial for us to get acurate values of the levels since we are dealing with medical images.
Thanks in Advance
from openslide-python.
I believe I did answer your question, so I'll repeat my answer with some more detail.
The actual dimensions of the whole slide image match those of what the scanner is capable of scanning, 153470x53130, and as a result every file will report the same dimensions and pyramid levels in openslide.
Because the scanned slide did not cover the whole scannable area, there is a smaller region of interest which can be found from the openslide.bounds-*
properties. The area outside of that region are not actually black, but fully transparent and you are interpreting those tiles as black.
Also openslide only reports actual levels stored in the file which are 1x, ~4x, ~16x, ~64x, and ~256x. The reason why they are not rounded to 4, 16, 64, and 256 is because the highest resolution (1x) in one or both dimensions is not a multiple of any of these so either something has to be added or clipped at the edges, or there is non-linear scaling going on. All other levels reported by the other software you are using are generated from these base levels that are stored in the whole slide image, probably by just scaling the one-higher level down by 2.
The lowest resolution image that the slide contains (256x) would result in a corresponding region of interest of only 271x159 which is probably too small for a meaningful thumbnail which is probably why the thumbnail in the other software is listed at 542x319 (128x).
from openslide-python.
Hello @jaharkes, @agoode, @bgilbert
I think you completely missed out on one if the points I mentioned. Let me reiterate it again.
I request you to kindly go through the nims-002 and nims-004.txt document once again . The original question remains unanswered ie For two different Whole Slide Images (original images) openslide slide.level_dimensions and slide.properties function gives same level values (width and height) and same dimensions. How is it possible when both of the images have different values (width and height) of the levels and different dimensions all together when I open the original images in Aperio Imagescope Software? You could crosscheck the information about the image (attached above) and the nims-002 and nims-004.txt text documents.
There is a lot of discrepanies with regards to the values retrived by the Openslide , two entirely different images with different levels have same values when extracted using Openslide. Please go through the documents carefully to notice it.
Also the number of levels retrieved by openslide about the orginal image seems to be wrong. It shows 5 levels when one of the images have 6 levels. I have used Aperio ImageScope to open the Images and Inspect them.
Also I would request @bgilbert , @agoode to look into this issue. If any suggestions could be given. What is workaround for such issue?
Regards,
Hitesha
from openslide-python.
You clearly are not reading my response. Reread my previous reponse until you understand what it says. It explains exactly your issues, why every slide scanned on the same scanner will report the same dimensions for every layer in the pyramid and why the number of levels are different from what the imagescope software is reporting.
For nims-002 the declared region of interest at level 0, is 62656x38816, when you apply the scale factor for level 1 (divide by 3.99989...) as stored in the slide you get 15664x9704, level 2 as stored in the slide scales to 3916x2426 (i.e. divide by 15.99899..), level 3 in the slide is 979x607, level 4 as stored in the slide is 245x152. All other levels that imagescope is reported are computed off of these levels and it isn't showing or using the 256x down scaled level.
There is no issue and no workarounds are needed.
from openslide-python.
OpenSlide exposes the coordinate plane and image levels as they are encoded in the image file, without conversion or interpolation. On Leica slides, there will only be pixels in part of the image area, but you can use the openslide.bounds-*
properties to determine where they are.
As to the extra image levels: could you post the output of running tiffinfo
on your sample slides?
from openslide-python.
Without further feedback, I'm closing this issue.
Feel free to reopen if there is something in the tiffinfo
output.
from openslide-python.
Related Issues (20)
- Possible memory leak with read_region HOT 2
- OSError: -9 HOT 2
- openslide can not read a file with chinese path HOT 2
- get_thumbnail bug report HOT 3
- miniconda & openslide-python; LIBFFI_BASE_7.0 HOT 1
- WSIs appear dark black when I convert SVS files to 10x or lower scale factor HOT 6
- Release 1.3.0
- Build for Python 3.12 HOT 2
- Missing _convert.cpython-310-darwin.so HOT 4
- "openslide.lowlevel.OpenSlideUnsupportedFormatError: Unsupported or missing image file" for DICOM image HOT 1
- Release 1.3.1 HOT 2
- Consider dropping 32-bit Windows wheels
- No DICOM support in Anaconda version of openslide-python 1.3.1 HOT 1
- PIL.UnidentifiedImageError: cannot identify image file HOT 6
- OpenSlideError: Bad direction attribute "LEFT" HOT 1
- a bug of mrxs HOT 6
- Streamlining installation on Linux/MacOS HOT 1
- the shape of image from DeepZoomGenerator.get_tile is inconsistent HOT 1
- ValueError: Argument is not writable HOT 3
- Cannot open SVS file HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openslide-python.