cytometer/data.py
def aida_rectangle_item(rectangle):
        """
        Create an object that describes a rectangle in AIDA.

        :param rectangle: (x0, y0, width, height).
        :return: item: dictionary with the structure of the rectangle object.
        """

        # extract rectangle parameters
        (x0, y0, width, height) = rectangle

        # convert RGB to HSL
        hls_colour_black = colorsys.rgb_to_hls(0, 0, 0)
        hls_colour_white = colorsys.rgb_to_hls(1, 1, 1)

        item = {
            'type': 'rectangle',
            'class': '',
            'color': {
                'fill': {
                    'hue': hls_colour_black[0] * 360,
                    'saturation': hls_colour_black[2],
                    'lightness': hls_colour_black[1],
                    'alpha': 0.5},
                'stroke': {
                    'hue': hls_colour_white[0] * 360,
                    'saturation': hls_colour_white[2],
                    'lightness': hls_colour_white[1],
                    'alpha': 1}},
            'x': x0,
            'y': y0,
            'width': width,
            'height': height,
            'locked': False
        }

        return item

        Create an object that describes a rectangle in AIDA.

        :param rectangle: (x0, y0, width, height).
        :return: item: dictionary with the structure of the rectangle object.
        
Create an object that describes a rectangle in AIDA.
Create an object that describes a rectangle in AIDA .
def aida_rectangle_item(rectangle):
        (x0, y0, width, height) = rectangle
        hls_colour_black = colorsys.rgb_to_hls(0, 0, 0)
        hls_colour_white = colorsys.rgb_to_hls(1, 1, 1)
        item = {
            'type': 'rectangle',
            'class': '',
            'color': {
                'fill': {
                    'hue': hls_colour_black[0] * 360,
                    'saturation': hls_colour_black[2],
                    'lightness': hls_colour_black[1],
                    'alpha': 0.5},
                'stroke': {
                    'hue': hls_colour_white[0] * 360,
                    'saturation': hls_colour_white[2],
                    'lightness': hls_colour_white[1],
                    'alpha': 1}},
            'x': x0,
            'y': y0,
            'width': width,
            'height': height,
            'locked': False
        }
        return item
def aida_rectangle_item ( rectangle ) : ( x0 , y0 , width , height ) = rectangle hls_colour_black = colorsys . rgb_to_hls ( 0 , 0 , 0 ) hls_colour_white = colorsys . rgb_to_hls ( 1 , 1 , 1 ) item = { 'type' : 'rectangle' , 'class' : '' , 'color' : { 'fill' : { 'hue' : hls_colour_black [ 0 ] * 360 , 'saturation' : hls_colour_black [ 2 ] , 'lightness' : hls_colour_black [ 1 ] , 'alpha' : 0.5 } , 'stroke' : { 'hue' : hls_colour_white [ 0 ] * 360 , 'saturation' : hls_colour_white [ 2 ] , 'lightness' : hls_colour_white [ 1 ] , 'alpha' : 1 } } , 'x' : x0 , 'y' : y0 , 'width' : width , 'height' : height , 'locked' : False } return item
Create an object that describes a rectangle in AIDA.
Create an object that describes a rectangle in AIDA .
"""
        Create an object that describes a rectangle in AIDA.

        :param rectangle: (x0, y0, width, height).
        :return: item: dictionary with the structure of the rectangle object.
        """ # extract rectangle parameters # convert RGB to HSL
dictionary with the structure of the rectangle object.
dictionary with the structure of the rectangle object .
rectangle
None