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

Project Goal: Config JSON #4

Closed
dekuenstle opened this issue May 28, 2021 · 0 comments
Closed

Project Goal: Config JSON #4

dekuenstle opened this issue May 28, 2021 · 0 comments

Comments

@dekuenstle
Copy link
Member

dekuenstle commented May 28, 2021

Every function of the plugin should be controllable through a configuration file in the JSON format.
This makes the configuration permanent modifications reproducible, which is important in the scientific context.
The plugin can - in addition - show UI elements for important configuration options. The UI should be a subset of the config file options (if an option is available through the file, but not the UI this is fine. The other way round is not ok). Changes from the UI should be saved back to the config file.

This is how the config file could (!!!) look at the end of the teamproject:

{
  "name": "SSFD",
  "processing": [
    {
      "name": "Create all combinations",
      "op": "matrix-develop",
      "config": {
        "saturation": [
          0.1,
          0.5,
          0.9
        ],
        "contrast": [
          0.3,
          0.7
        ]
      }
    },
    {
      "name": "Reduce size",
      "op": "crop",
      "config": {
        "width": "500px",
        "height": "500px",
        "origin_x": "50%",
        "origin_y": "50%",
        "anchor_x": "50%",
        "anchor_y": "50%"
      }
    }
  ],
  "export": {
    "format": "png",
    "image_name": "{image_name}",
    "structure": "groupby-image"
  },
  "metadata": {
    "last_export_date": "2021-...",
    "last_modified": "2021-..."
  }
}

Let's look at some of the aspects:

The plugin should apply the processing steps in the defined order.
We need at least two basic processing operation. develop, which applies image manipulations, and crop, which crops the image. In addition, there should be two advanced operation strategies, indicated by prepended matrix- or random- (they should work with develop and crop). In these advanced strategies, lists of parameters instead of scalars should be defined. Then random or all possible (matrix) combinations of these should be applied to the image.
Bonus for crop: Support absolute (pixel) and relative (percentage) coordinates.

name should be an optional parameter everywhere. If it is missing, choose a reasonable default (e.g. "Processing step 5").

The export section can provide options for the image format, patterns for the exported image names, and the created directory structure.

Bonus: Notice, if the user modified the config file. Then do not overwrite it, but post a warning and ask before.

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

1 participant