Comments (7)
Hi Michel,
Yes, indeed the intersection can then be done on polygon level. And yes you can use that function to convert a NumPy array to polygons. You can use a spacing value of ~4.0 or ~8.0 (.get_slide) when opening the mask (please use the asap backend, because openslide backend does not work well with monochrome images) and upscale the polygons.
For creating tissue masks I recommend using this algorithm
Best wishes,
Mart
from pathology-whole-slide-data.
Hi Mart,
Okay, all clear! Thank you very much for the explanation.
Best,
Michel
from pathology-whole-slide-data.
Hi Michel,
If it is still pending, maybe you can contact Peter Bandi he has created this algorithm.
from pathology-whole-slide-data.
from pathology-whole-slide-data.
Dear Michel,
There are two options available already.
The first one is by using the MaskAnnotationParser
This parser converts a mask into multiple rectangle regions for which the size can be specified.
Another option, which I would recommend, is to create polygons from the tissue mask with this function
With the Shapely library, you can intersect the tissue mask polygons and the annotated polygons. From the intersection you create a new annotation file, e.g., with write_asap_annotation or use the internal JSON representation of wholeslidedata convert_annotations_to_json. In this way you get a cleaned annotation file which you can use for training.
I hope this helps and please let me know if anything is unclear.
Best wishes,
Mart
from pathology-whole-slide-data.
Dear Mart,
Thanks for the suggestions. I think the second option, where a clean annotation file is created, is indeed preferred. If I understand it correctly we then find the intersection between the tissue region and the annotation region on polygon level.
This function converts a tissue mask (Numpy) to polygon format and assumes that I have already obtained a tissue mask as well, right? What would you recommend to obtain the tissue masks themselves?
Best,
Michel
from pathology-whole-slide-data.
Hi Mart,
I requested access to the algorithm that you mentioned, but its still pending. Do you perhaps know who I would have to contact to get permission?
Best,
Michel
from pathology-whole-slide-data.
Related Issues (20)
- Iterating over classes in WholeSlideAnnotation objects HOT 2
- plot_annotations plots everything flipped HOT 1
- AsapAnnotationParser label colors from group HOT 1
- Sliding Window configuration HOT 6
- Strict sampling with `point_sampler` fails when using data with different level 0 spacings HOT 2
- I got confused between branch 'main' and '0.0.16' HOT 1
- Installing package on local machine HOT 3
- Advantage of ConcurrentBuffer against standard pytorch data loader HOT 2
- create_batch_iterator fails when copy_path != None and number_of_batches > 0 HOT 2
- from wholeslidedata.source.configuration.config import insert_paths_into_config HOT 2
- QuPath annotations (.geojson) format not readable by parser HOT 1
- Implement annotation offset for offset bounds in mrxs files HOT 1
- Patch label sampler fails with point annotation HOT 3
- Support qptiff? HOT 4
- mask to xml/json overhaul HOT 1
- KeyError: 'classification' in qupath annotation parser HOT 1
- add conda recipe HOT 5
- Cucim backend not available
- cuCIM backend not fully supported HOT 1
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 pathology-whole-slide-data.