Need help urgent

Coleman Stavish coleman at proscia.com
Wed Jul 6 01:53:33 EDT 2022


Hi Ali,

Please have a look at this thread from 2014 on this topic:
https://lists.andrew.cmu.edu/pipermail/openslide-users/2014-November/000965.html

Paraphrasing Benjamin Gilbert's response linked above, the coordinates in
the ndpa file are in physical units (nanometers, specifically) relative to
the center of the *slide* as you deduced. You will need to extract the
XOffsetFromSlideCentre and YOffsetFromSlideCentre properties from the ndpi
image using Openslide. Adding these to each coordinate will yield physical
units relative to the center of the main *image*. (Note the center of the
image does not necessarily correlate to the center of the physical slide).
Then, you can divide the coordinates by 1000 to yield microns. Using the
mpp-x and mpp-y (microns per pixel) Openslide properties for the ndpi
image, divide by mpp-[xy] to get pixel coordinates relative to the center
of the main image. Finally, subtract by level-0 dimensions / 2 to get into
a coordinate space with (0,0) as top-left origin.


Best,
Coleman



On Wed, Jul 6, 2022 at 1:19 AM Ali Hassan Raza via openslide-users <
openslide-users at lists.andrew.cmu.edu> wrote:

> Hello Openslide members,
>
> I am desperately in need of help. My name is Ali, and I am a masters level
> student in computer science at roskilde university in Denmark. I am writing
> my masters thesis in cardiac biopsy using a deep learning approach. The
> dataset I am working with is from the hospital rigshospital in Copenhagen,
> and they use a scanner from hamamatsu which saves the WSI in the format of
> NDPI alongside the annotation the pathologist have done which are in
> NDPI.NDPA format.
>
> I want to segmentate the areas (create a mask) where the pathologist have
> done annotations, so that I can make some deep learning models which can
> learn from the masks, and thereby test them on some data to see how well
> the model performs. I did som research on the internet and could not find
> anything about how to convert these coordinates, until I came across some
> posts where people have suggested that openslide plugin may be useful.
>
> The problem I have is that the annotations the pathologist have done on
> the ndpi wsi have negative x and y coordinates, which means that the
> coordinates system in ndpi format has 0,0 in the center of the slide (I
> guess) and not the top left corner as normal images. I am stuck at the
> moment, and don’t know how to deal with the ndpi.ndpa annotations, and
> would be very thankful if you could help me. I am coding in python using
> jupyter notebook.
>
> Kind Regards
> Ali Hassan Raza
> Roskilde University
> _______________________________________________
> openslide-users mailing list
> openslide-users at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users
>


-- 

*Coleman Stavish*
Chief Technology Officer | Proscia
+1 610-996-3951
www.proscia.com
This email and any attachments are confidential and intended solely for the
individual to whom they are addressed. If you have received this message in
error, please notify the sender immediately and delete this email from your
system. Nothing in this email amounts to a contractual or other legal
commitment on the part of Proscia.

-- 
This email and any attachments are confidential and intended solely for the 
individual to whom they are addressed. If you have received this message in 
error, please notify the sender immediately and delete this email from your 
system. Nothing in this email amounts to a contractual or other legal 
commitment on the part of Proscia.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20220706/7bb738d3/attachment-0001.html>


More information about the openslide-users mailing list