FeatureOptionsWidget

class menpowidgets.options.FeatureOptionsWidget(style='minimal')[source]

Bases: FlexBox

Creates a widget for selecting feature options. The widget consists of the following objects from ipywidgets and menpowidgets.tools:

No Object Property (self.) Description
1 RadioButtons feature_radiobuttons Feature type selector
2 DSIFTOptionsWidget dsift_options_widget DSIFT options
3 HOGOptionsWidget hog_options_widget HOG options
4 IGOOptionsWidget igo_options_widget IGO options
5 LBPOptionsWidget lbp_options_widget LBP options
6 DaisyOptionsWidget daisy_options_widget Daisy options
7 Latex no_options_widget No options available
8 Box per_feature_options_box Contains 2 - 7
9 Image preview_image Contains 6, 7
10 Latex preview_input_latex Contains 5, 9
11 Latex preview_output_latex Contains 3, 2
12 Latex preview_time_latex Contains 4, 10
13 VBox preview_box Contains 9 - 12
14 Tab options_box Contains 1, 8, 13

Note that:

  • To set the styling please refer to the style() and predefined_style() methods.
  • The widget stores the features function to self.features_function, the features options dict in self.features_options and the partial function with the options as self.function.
Parameters:style (str (see below), optional) –

Sets a predefined style at the widget. Possible options are:

Style Description
'minimal' Simple black and white style
'success' Green-based style
'info' Blue-based style
'warning' Yellow-based style
'danger' Red-based style
'' No style
predefined_style(style)[source]

Function that sets a predefined style on the widget.

Parameters:style (str (see below)) –

Style options:

Style Description
'minimal' Simple black and white style
'success' Green-based style
'info' Blue-based style
'warning' Yellow-based style
'danger' Red-based style
'' No style
style(box_style=None, border_visible=False, border_colour='black', border_style='solid', border_width=1, border_radius=0, padding=0, margin=0, font_family='', font_size=None, font_style='', font_weight='')[source]

Function that defines the styling of the widget.

Parameters:
  • box_style (str or None (see below), optional) –

    Possible widget style options:

    'success', 'info', 'warning', 'danger', '', None
    
  • border_visible (bool, optional) – Defines whether to draw the border line around the widget.
  • border_colour (str, optional) – The colour of the border around the widget.
  • border_style (str, optional) – The line style of the border around the widget.
  • border_width (float, optional) – The line width of the border around the widget.
  • border_radius (float, optional) – The radius of the border around the widget.
  • padding (float, optional) – The padding around the widget.
  • margin (float, optional) – The margin around the widget.
  • font_family (str (see below), optional) –

    The font family to be used. Example options:

    'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace',
    'helvetica'
    
  • font_size (int, optional) – The font size.
  • font_style (str (see below), optional) –

    The font style. Example options:

    'normal', 'italic', 'oblique'
    
  • font_weight (See Below, optional) –

    The font weight. Example options:

    'ultralight', 'light', 'normal', 'regular', 'book', 'medium',
    'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy',
    'extra bold', 'black'