ome / omero-scripts

Core OMERO Scripts
https://pypi.org/project/omero-scripts/
12 stars 32 forks source link

Images from ROIs track xy #196

Closed will-moore closed 2 years ago

will-moore commented 2 years ago

From user request to create a Movie from an ROI when the ROI moves in x and y over time.

This PR improves the Images_from_ROIs.py script so that the X and Y of the rectangle at each time point are used to crop the image.

To test:

Screenshot 2022-02-03 at 20 09 49

Screenshot 2022-02-02 at 08 49 38

cc @pwalczysko

imagesc-bot commented 2 years ago

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/creating-movies-from-rois-in-different-xy-positions-throughout-a-timecourse-in-omero/62776/2

pwalczysko commented 2 years ago

What is the next step if a movie is a desired end-product ? Combine images script ?

pwalczysko commented 2 years ago

Bug Taking the FRAP image in https://workshop.openmicroscopy.org/webclient/?show=image-28669 and not checking the Make Image stack checkbox, I still get the image stack.

Edit: Follow-up on the above: When I do check the Make Image stack checkbox, I do not get image stack, just one single plane.

Marking as a bug, it seems other way around than it should be, or rather, more precisely, in the case where I do not check the checkbox, I would expect many single images, which does not happen either.

pwalczysko commented 2 years ago

As discussed with @will-moore , maybe just adjust the description of the script.

the script principally does what we want, it is historically much more elaborate in comparison of with what is needed in a present case.

pwalczysko commented 2 years ago

Understood now what the script is doing. It is definitely catering for the new case and the behaviour is improved.

Ready to merge fmpov.

will-moore commented 2 years ago

Steps to update this on nightshade server:

will-moore commented 2 years ago

To test the last commit - drag the Rectangle outside the bounds of the image. Script should run without an error.

pwalczysko commented 2 years ago

To test the last commit - drag the Rectangle outside the bounds of the image. Script should run without an error.

Works as described, it does not crash when ROIs are outside of the image in some timepoints. (could also repeat the crash with the previous script)

All seems good to me here.