Hmm, not sure what is happening. I tried this and didn’t have any problems with a 150 core .mrxs TMA. I even tried drawing annotations that were halfway out of TMAs, had holes in them, polylines, points, and other weird things.
Yeah the distance tools work and so does the “Distance to annotation” - measurement if I only dearray 9 TMA cores within the very same image (.mrxs too). That’s why I assumed it might be an issue of performance.
The cores contain about 1000 cells each and the tumor annotations (to which I want to measure the distance) are quite complex ROI (compare image).
@microluke I wasn’t working with TMAs when developing this command, and didn’t really consider the specifics of TMAs. As a result, the command is not very TMA-friendly at all. For example, it will also use annotations found in other cores.
You could try this alternative to see if it works better:
Make sure to read the comments… I have only just written it and only checked it quickly on one image. Please let me know if you find any problems or weirdness.
In general, performance is expected to be fairly terrible if you have a large number of complex annotations with many vertices – since the work involved in computing distances is pretty substantial. However, the script above might work rather a lot faster since it only worries about annotations within each core.
That’s awesome, it worked perfectly fine and I was able to process the full TMA (300+ cores) within a couple of seconds! This tool is of great potential in my eyes as you can then go on and build classes based on the cell’s neighborhood…