Open LouisStefanuto opened 1 month ago
Hi, this is possible to extract, but I agree it should be more accessible and documented.
Here is how you can do it today (ref https://github.com/smistad/FAST/pull/206/files) :
patch_width, patch_height = int(patch.getFrameData("patch-width")), int(patch.getFrameData("patch-height"))
patch_overlap_x, patch_overlap_y = int(patch.getFrameData("patch-overlap-x")), int(patch.getFrameData("patch-overlap-y"))
x_pos = int(patch.getFrameData("patchid-x")) * (patch_width - patch_overlap_x * 2) + patch_overlap_x
y_pos = int(patch.getFrameData("patchid-y")) * (patch_height - patch_overlap_y * 2) + patch_overlap_y
Before closing the issue, I don't see it in the doc. Is it coming in the next release ?
Just leave the issue open so I can remember to make a single property of this instead of needing to calculate it.
I just haven't updated the documentation yet.
Thanks for your feedback 🙂
Is your feature request related to a problem? Please describe. No pb. Just looking for a feature. I am generating patches from a TIFF image.
Describe the solution you'd like I would like to be able to get the pixel position of the patch, let's say the (x,y) of the top left pixel Ideally it would be something like:
Do you have an idea of how it can/should be implemented? Currently I have access to the path number
I could compute the position using the stride, tile size and padding, but I am hoping it is already implemented somewhere.
Are you willing to contribute to the implementation of this feature N/A