Skip to content

Tips&Tricks

Loic A. Royer edited this page Mar 13, 2024 · 4 revisions

Tips, Tricks, and Examples on how to prompt Omega

Tips & Tricks:

  1. Be very explicit and clear, and avoid assumptions.
  2. Ask for ideas, solutions, methods, and strategies before asking to do things (consider using the tutorial mode).
  3. If it doesn't work the first time, please ask again, revising the prompt. In general it often suffices to ask Omega to "try again" (see reproducibility table from paper).
  4. Don't hesitate to call out mistakes and explain how to revise an approach, code, or widget.
  5. Use Omega's code snippet editor to make small fixes to widgets.

Example prompts:

Here are example prompts/questions/requests to try:

  • What is your name?
  • What tools do you have available?
  • Make me a Gaussian blur widget with sigma parameter
  • Open this tiff file in napari: https://people.math.sc.edu/Burkardt/data/tif/at3_1m4_03.tif
  • Make a widget that applies the transformation: y = x^alpha + y^beta with alpha and beta two parameters.
  • Create a widget to multiply two images
  • Open a photo of Albert Einstein in napari.
  • Downscale by a factor 3x the image on layer named 'image'
  • Rename the selected layer to 'downscaled_image'
  • Upscale image 'downscaled_image' by a factor of 3 using some smart interpolation scheme of your choice (not nearest neighbor)
  • How many channels does the image on layer 0 have?
  • Make an image sharpening filter widget, expose relevant parameters
  • Open this file in napari: https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.4/idr0062A/6001240.zarr
  • Split the two channels of the first layer (first axis) into two separate layers
  • Switch viewer to 3d mode
  • Create a napari widget for a function that takes two image layers and returns a 3D image stack of n images where each 2D image corresponds to a linear blending of the two images between 0 and 1.
  • Loaded the ‘cell’ sample image. there is one cell in the image on the first layer, it is roughly circular and brighter than its surroundings, ca you write segmentation code that returns a labels layer for it?
  • Can you create a widget to blend two images?
  • Can you tell me more about the 'guided Canny edge filter' ?
  • Write a configurable RGB to grayscale widget, ensure weights sum to 1

More widget examples can be found in this table

Clone this wiki locally