-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New/merging annotations when using the classifier #198
Comments
I suspect the difficulty is with how the hierarchy handles annotations that overlap... that can make knowing that's inside what a bit awkward, and not always very intuitive. There may be a manual way to do want you want through the user interface, but I suspect it could be quite laborious. Since this looks like it could be generally useful for others as well, my mind always turns to whether it would be cleaner to write a script or add a new command to the software instead... I have a few questions to check if I understand correctly what you need:
|
Hi Pete,
- We want the number of positive and negative cells and also the percentage of positive cells in the different regions: in the tumor center (500 µm from the tumor border) (black), in the invasive front (area between the green and black annotation) and in the tumor (blue).
- In this case it was not problematic that the green region extended outside of the tissue since there were no cells of interest in this “white space”. But ideally it would also fallow the “cut”.
- I always start with lining the tumor border (blue) and then I extend it 500µm to get the green one. After this I perform the cell detection in the green one (but the blue one always disappears) after this I run the classifier and when this is completed I ‘expand’ my green annotation with -500µm to get the blue one again and after this I ‘expand the blue one with -500µm to get the black one.
I think it may be better that the green and blue would be hollow rings around the outside of the black one. Since we want to measure cells in three different regions: in the tumor center (500 µm from the tumor border) (black), in the invasive front (area between the green and black annotation) and in the tumor (blue).But as of now I don’t know if it is possible to establish this?
- We want to count every immune cell in the tumor (+ and -) but not the tumor cells. In the beginning I tried “Positive cell detection” but when using this command, the software also counted a lot of cells that weren’t immune cells. That is why I switched to the classifier, I am very pleased with the results the classifier is giving me. We are scoring 7 different staining’s (70 samples per staining) and I would like to train the classifier for each staining but within a staining I would like to apply the same classifier for each sample.
- In total it will be around 500 images.
- I am just starting and trying some things out. I will try to create the annotations before cell detection, but as I have mentioned above: I start with the blue annotation and then I extend it 500µm to get the green one. But when I want to perform the cell detection the first annotation (blue) disappears. So I thought it was nog possible to perform a cell detection in overlapping annotation, or is there a way I can overcome this?
Thank you!
|
I suspect this will be a frequent enough need to deserve its own command in the future... in the meantime I've written a script that I hope will help. You can find it along with a description here. I hope it helps, but if you see a way to improve it just let me know. |
Many thanks! It works perfectly and it will save me a lot of time, you really helped me out.
From: Pete <notifications@github.com>
Sent: woensdag 8 augustus 2018 16:32
To: qupath/qupath <qupath@noreply.github.com>
Cc: Lieze Berben <lieze.berben@kuleuven.be>; Author <author@noreply.github.com>
Subject: Re: [qupath/qupath] New/merging annotations when using the classifier (#198)
I suspect this will be a frequent enough need to deserve its own command in the future... in the meantime I've written a script that I hope will help.
You can find it along with a description here<https://petebankhead.github.io/qupath/scripts/2018/08/08/three-regions.html>.
I hope it helps, but if you see a way to improve it just let me know.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#198 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AoNwyOpnbOnOW9rFnT_2pqry0gg-jCySks5uOvZygaJpZM4VxsNx>.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/qupath/qupath","title":"qupath/qupath","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/qupath/qupath"}},"updates":{"snippets":[{"icon":"PERSON","message":"@petebankhead in #198: I suspect this will be a frequent enough need to deserve its own command in the future... in the meantime I've written a script that I hope will help.\r\n\r\nYou can find it along with a description [here](https://petebankhead.github.io/qupath/scripts/2018/08/08/three-regions.html).\r\n\r\nI<https://petebankhead.github.io/qupath/scripts/2018/08/08/three-regions.html)./r/n/r/nI> hope it helps, but if you see a way to improve it just let me know."}],"action":{"name":"View Issue","url":"#198 (comment)"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "#198 (comment)", "url": "#198 (comment)", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [qupath/qupath] New/merging annotations when using the classifier (#198)", "sections": [ { "text": "", "activityTitle": "**Pete**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@petebankhead", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"qupath/qupath\",\n\"issueId\": 198,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"qupath/qupath\",\n\"issueId\": 198\n}" }, { "targets": [ { "os": "default", "uri": "#198 (comment)" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 365347697\n}" } ], "themeColor": "26292E" } ]
|
I find that defining the inner region from expanding the outer region and intersecting with the original area helps to avoid getting an inner margin in regions where the area of interest expands all the way to the tissue border where it makes no sense to add an inner margin. The central margin is then just the original area - the inner margin |
Hi,
I am using the classifier to detect positive and negative cells in a tumor, I am measuring them in three different areas: 500µm outside of the tumor (green), the whole tumor (blue) and tumor centre (black). When I substract the black one from the green one I get an idea of how many cells there are located in the invasive front of the tumor.
I do this by running the classifier on the biggest area (green) and expanding this annotation with -500µm to get the blue one and expanding this one with -500µm to get the black one. It gives me nice results
But because some of my slides only have a part of the tumor (cut), I want the black annotation to be merged with the yellow annotation (to get a correct estimation of the cells located in the invasive front).
When I do this, I get very low cell counts, while I see a lot more cells in that yellow area that should be counted as well. Is there a way to get the correct number of cells when merging two annotations after using the classifier?.
Thanks!
Lieze
The text was updated successfully, but these errors were encountered: