Ok, I think I am starting to understand. The confusion is that ROI has a very specific meaning in QuPath and ImageJ - essentially the coordinates that define an annotation or detection. Thus ROIManager in FIJI. In QuPath it can be found using
.getROI(). Annotations and detections are the two kind of QuPath objects, there are no ROI objects:
I am guessing now that you meant a general region of interest, not the region of interest as a code object.
But yes, if you change the image, the coordinates will not match - you would need to alter the XY coordinates based on the cropped image - usually those are taken from the name of the cropped image file in some way.
“Image 1” has object A
“Image 1 Tile 4 [1923, 8245]” would then put object A at X-1923, Y-8245 since the upper left coordinate has moved. Without knowing at what location the image was cropped, it would be impossible to put the annotations back in after the fact - the annotations do not belong in the cropped image.
I do not know of any way to maintain the QuPath object locations automatically when cropping, but maybe @petebankhead has something.
Edit - come to think of it, maybe the “Send region to ImageJ” option would work - kind of? As long as the annotation being sent IS the bounding box. Using a mask image of the same region might be an even cleaner method, depending on the downstream use. And is already supported by the software.