I modified that script to import NDPA files, but it was quite a bit more involved that I was expecting.
From this thread, I learned that NDPA files do not use a top-left centered coordinate system like Aperio does.
The Coordinate system that NDPAs use is relative to the physical slide center -- not even the scanned area center.
Additionally, it's not in pixels, it's in nanometers.
This value must be available somehow in QuPath thru open-slide when you open the slide, but I have no idea how to access it. @Pete?
In the absence of this value, I created a hack.
1. I manually drop a pin anywhere and name it "SlideCenter"
2. I manually open the NDPA file and find it in the XML. I manually set the X and Y coordinates to 1,1. (I used 0,0 before, but I experienced some unexplained bugs).
This is the physical center of the slide.

3. Reopen NDPVIEW and export annotation to CSV as opposed to NDPA. This is because the CSV option has ability to export to a Top-Left anchored coordinate system.
(I don't use this directly as the CSV export option only exports the annotation position, and not each point in an annotation, and the NDPA option has no option for Top-Left anchored coordinate system -- UGH).

4. I now know the annotation point positions relative to slide center from the NDPA file, and the SlideCenter position from the TOP-LEFT from the .CSV file. -- all in Nanometers.
5. I run my script, which takes the NDPA, CSV file and pixels per micron information.
This is a terrible hack, but it works, and can be made much simpler if I could obtain the slide-center coordinates that Openslide must somehow use.
(excuse the poor code)