-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cropping of source image by affine transform #31
Comments
Apologies, I thought GitHub allowed sharing of small files of any type through issues. I can send the image and landmark files upon request (through email?) if that's helpful. |
Can you put the files on a gist? https://gist.github.com/ That might be the way to go here. Or share them via a public LIBD OneDrive link. |
Here are the input files |
Dear Leo and Nick, Thanks for the well documented reproduction of the issues. @mmganant can you please take a look into this as it related to brain? In general, note that Best, |
Hello,
I created a jupyter notebook demonstrating behavior of
STalign
that was unexpected to me: after applying an affine transform to the source image in a source-target pair, the pixel locations of the result appear to be using the coordinate system of the target image. In my case, since there is a partial overlap between the Visium sections (and mutually exclusive areas in each), this results in a large piece of the source image being cropped out, making it impractical for use downstream. Another unexpected result is the blurring effect seen at the bottom of the transformed source image.For my use case, I was hoping to integrate both spot coordinates and images; in particular, with a bit of custom code in addition to
STalign
, I wanted to create a merged image containing the union of pixels from the source and target. I was imagining that applying an affine transform to the source image would really just rotate the result (similar to howImage.rotate
works fromPIL
), ignoring translations that would otherwise put the area of interest "out of frame" in many cases (like mine).Perhaps a new parameter to
STalign.transform_image_source_with_A()
could be added to output an image this way? I understand this is a large request, but would love to hear thoughts about how this issue might be addressed (or other options I could explore).I'll attached files required to reproduce the notebook's output.
Thanks!
STalign
is quite a useful tool, so I appreciate your work to develop and maintain it.Best,
-Nick
The text was updated successfully, but these errors were encountered: