-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add the option to save as a tif
file
#778
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #778 +/- ##
==========================================
+ Coverage 84.36% 84.46% +0.09%
==========================================
Files 21 21
Lines 3134 3134
==========================================
+ Hits 2644 2647 +3
+ Misses 490 487 -3 ☔ View full report in Codecov by Sentry. |
Thanks for this PR @derollins . I looks like you've used the Normally, although not exclusively, new branches should be made from We can work round this though, perhaps most simply by waiting for #777 to be more widely tested, reviewed and merged first. One question I would have, which might influence the implementation of supporting the TIFF format is whether the loss of metadata is likely to be problematic further down the line? There are other ways of writing such files some of which may include metadata. A quick scan also suggests that TIFFs can hold multiple images, is this something that is likely to be required for example when working with |
Thanks for the feedback @ns-rse. I assumed the #777 PR would probably be merged before this so worked off that but I'll go back to main in the future. I have never looked at the image output metadata, but having quickly opened it, doesn't look like there is much there at the moment and both the There is a lot of advantages to the TIFF image format, when I first started using 'old' topostats it was the default image format I used (generated though the gwydion module) until I swapped to I'm no optical microscopy expert but I know TIFF 'stacks' of many images either in a time or depth series are generated by other microscopy techniques and can be opened and processed in software such as ImageJ. |
I think we should ultimately be look at using PIL to save metadata to the images as its fairly key information. I'll try and get round to looking at this in the coming weeks. In the meantime there is a tpyo that is causing the pre-commit checks to fail. |
Typo correction
@ns-rse @derollins I think with Eddie's changes this should be marked as completed and pushed asap as we can now save the files as The need for metadata in the Tiff files isn't a big priority and I think it should be a new issue. |
I noticed while testing PR #777 that
tif
was not available as an option for saving images. Although this may be due to inability of matplotlib to embed metadata into these files (https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.savefig.html),tif
files are a standard for lot of image analysis programmes that users may use in conjunction with Topostats as well as being the preferred format for many journal.For these reasons I thought I would add
tif
tovalidation.py
and thedeafult_congif.yaml
file and update documentation to reflect this update.