Skip to content
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

Allow mrc_visual_min_max be called as a python function #55

Open
philipmac opened this issue Apr 12, 2023 · 3 comments
Open

Allow mrc_visual_min_max be called as a python function #55

philipmac opened this issue Apr 12, 2023 · 3 comments

Comments

@philipmac
Copy link
Member

and not mandate the use of the CLI to use.

Create a function, eg mrc_visual_min_max(f_in: Path) -> dict which does the same thing as mrc_visual_min_max, except does not mandate the use of the CLI, and allows workflows to call that function directly.

@blowekamp
Copy link
Collaborator

So no arguments or options are needed?

What should be the contents of the dictionary?

@philipmac
Copy link
Member Author

philipmac commented Apr 12, 2023

the behaviour should be the same as the CLI.
Currently the argument mad is used:

 --mad FLOAT                     Use INPUT_IMAGE's robust median absolute
                                  deviation (MAD) scale by option's value
                                  about the median for minimum and maximum
                                  range.  NOTE: This argument is mutually
                                  exclusive with  arguments: [percentile-crop,
                                  sigma].

Currently the output is:

 --output-json FILE              The output filename produced in JSON format
                                  with "neuroglancerPrecomputedMin",
                                  "neuroglancerPrecomputedMax",
                                  "neuroglancerPrecomputedFloor" and
                                  "neuroglancerPrecomputedLimit" data elements

@philipmac
Copy link
Member Author

currently additional args exist, but are not used - it would be nice to have these. But it's possible they are not needed at this moment.

  --sigma FLOAT                   Use INPUT_IMAGE's standard deviation (sigma)
                                  scale by option's value about the mean for
                                  minimum and maximum range.  NOTE: This
                                  argument is mutually exclusive with
                                  arguments: [percentile-crop, mad].
  --percentile FLOAT RANGE        Use INPUT_IMAGE's middle percentile
                                  (option's value) of data for minimum and
                                  maximum range. NOTE: This argument is
                                  mutually exclusive with  arguments: [sigma,
                                  mad].  [0.0<=x<=100]
  --clamp / --no-clamp            Clamps minimum and maximum range to existing
                                  intensity values (floor and limit).
  --log-level [DEBUG|INFO|WARNING|ERROR]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants