-
Notifications
You must be signed in to change notification settings - Fork 32
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
Script for calculating min/max #103
base: develop
Are you sure you want to change the base?
Conversation
Script which calculates the min/max for a given number of images and resets the StatsInfo if so directed.
For performance, It might be actually better to calculate the rendering settings for the default plane (z =SizeZ/2, t=0) |
Is it useful to allow either/or? |
Both will be useful. |
Thoughts on the argument name and the default "off" or "on"? |
Another option to speed things up: randomly pick |
The "shared" rendering settings will require some major adjustments in the way we use them to generate thumbnails or display images. |
Hadn't thought about having anything shared. I'll probably leave that for further efforts. |
joshmoore@ccabe32 is a start on "default" and "random". |
Add options under the 'Choice' argument to reduce the processing overhead. Note: this does not yet search for random tiles across *all* images but rather per image
Going back to the script, I am now wondering if we should not "run" it when calculating the min/max during the rendering steps |
Note: @emilroz had also started working on a version for big images while this is for HCS images. I haven't found time to unify yet. |
Could such option be part of |
Certainly, that would match the strategy we've used with populate metadata as well:
cc: @sbesson |
""" | ||
Process the script params to make a list of channel_offsets, then iterate | ||
through the images creating a new image from each with the specified | ||
channel offsets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be out of date.
pixels = oldImage.getPrimaryPixels() | ||
rv = dict() | ||
dt = pixels.getTile(0, 0, 0, (0, 0, 16, 16)).dtype | ||
tile_min = iinfo(dt).max # Everything is less |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this fails for floating point data types.
statsInfos.update(x) | ||
|
||
if debug: | ||
print "Loaded %s tile(s) (%s bytes)" % (tile_count, byte_count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one and other similar print statements error in my hands. Is it because of the python3 environment I am using ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, just use print()
like
print("Loaded %s tile(s) (%s bytes)" % (tile_count, byte_count))
--exclude |
After importing with
--skip=all
the rendering settings for an image can be quite unattractive. If the range is large, finding a good setting manually can be problematic. This calculates the min/max perChannel
and optionally creates or updates theStatsInfo
for eachChannel
.cc: @manics @jburel @will-moore @sbesson