Skip to content

Feature a Flint API to select a mask image

This MR provides an API to BLISS, allowing a user to select a mask from an image.

It can be used this way from BLISS:

  • Create a plot image
  • Request a mask
  • Flint displays the mask
  • A mask can be created with the GUI
  • A button is there to save the mask as a file
  • A button is there to validate the result
  • The mask is available in BLISS
DEMO_SESSION [14]: import numpy                                                      
              ...: from bliss.common import plot                                     
              ...: image = numpy.arange(10*10).reshape(10, -1) 
              ...: plot_image = plot.plot_image(image, selected=True, closeable=True)
              ...: mask = plot_image.select_mask()              
WARNING 2020-04-01 17:44:26,865 flint: Flint starting...
DEMO_SESSION [15]: mask
         Out [15]: array([[1, 1, 1, 0, 1, 1, 1, 0, 1, 1],
                          [1, 1, 1, 0, 1, 0, 1, 0, 1, 1],
                          [1, 0, 0, 0, 1, 0, 1, 0, 1, 0],
                          [1, 0, 0, 0, 1, 0, 1, 0, 1, 0],
                          [1, 0, 0, 0, 1, 0, 1, 0, 1, 0],
                          [1, 0, 0, 0, 1, 0, 1, 0, 1, 0],
                          [1, 0, 0, 0, 1, 0, 1, 0, 1, 0],
                          [1, 0, 0, 0, 1, 0, 1, 0, 1, 0],
                          [1, 0, 0, 0, 1, 0, 1, 0, 1, 0],
                          [1, 0, 0, 0, 1, 1, 1, 0, 1, 0]], dtype=uint8)

Capture_d_écran_de_2020-04-01_17-45-13

Merge request reports