Module classes

Classes have been documented using sphinx.ext.autodoc and the docstring style extension ‘sphinx.ext.napoleon’:

class Modules.classes.AFMimg(xvalues, yvalues, zvalues, filename, directory)

A class that contains the x-, y-, z-values, filename and directory of the raw AFM file

xvalues

N dimensional array with type float that contains the x-values of the igor pro height trace data

Type

ndarray

yvalues

N dimensional array with type float that contains the y-values of the igor pro height trace data

Type

ndarray

zvalues

N dimensional array with type float that contains the z-values of the igor pro height trace data

Type

ndarray

filename

String that contains the name of the .txt file

Type

str

directory

String that contains the directory of the .txt file

Type

str

create_directory(directory, name)

Creates a new directory

Parameters
  • directory (str) – The directory of the new folder

  • name (str) – The name of the new folder

Returns

new_dir – The directory and name of the new folder

Return type

str

set_directory(new_dir)

Adds a new directory to the class

Parameters

new_dir (str) – The new directory

class Modules.classes.contAFMimg(xvalues, yvalues, zvalues, filename, directory, propAFMimg, rect_del, rect2_del, rect_exp, cnt_all, cnt_del, img_cnt, img_gr, img_rgb, coord, cdrawn)

A class which inherits from AFMimg and contains the contour and the rectangles covering the objects in the image

rect_del

1 dimensional array with type rectangle that contains rectangles around contours

Type

ndarray

rect2_del

1 dimensional array with type int, rectangle that contains rectangles around clicked coordinates

Type

ndarray

rect_exp

1 dimensional array with type rectangle that contains the not selected expanded rectangles

Type

ndarray

cnt_all

1 dimensional array with type contours that were not selected manually

Type

ndarray

cnt_del

1 dimensional array with type contours that contains all not selected contours in the loop

Type

ndarray

img_cnt

N dimensional array with type int that contains all not selected contours

Type

image

img_gr

N dimensional array with type float that contains a greyscale image of the original image

Type

ndarray

img_rgb

N dimensional array with type float that contains img_gr as rgb image with detected contours

Type

ndarray

coord

N dimensional array with type float that contains the coordinates of points inside manually selected rectangles/contours

Type

ndarray

cdrawn

1 dimensional array with type int, int, float, float that contains the index of a rectangle with corresponding contour, the x- and y-coordinate of the contour

Type

ndarray

class Modules.classes.propAFMimg(xvalues, yvalues, zvalues, filename, directory, imgh, imgw, imgrh, imgrw, thr)

A class which inherits from AFMimg and contains size, threshold value and the expansion factor of the rectangles covering the objects in the image

imgh

The height of the image in µm

Type

float

imgw

The width of the image in µm

Type

float

imgrh

The resolution of the yvalues

Type

int

imgrw

The resolution of the xvalues

Type

int

thr

Manually chosen threshold value for grayscale images

Type

int

class Modules.classes.LMimg(orig, values, val_enh, filename, directory)

A class that contains the x-, y-, z-values, filename and directory of the raw LM file

orig

N dimensional array with type int that contains the colour values of the LM image

Type

ndarray

values

N dimensional array with type int that contains the greyscale values of the LM image

Type

ndarray

val_enh

N dimensional array with type int that contains the enhanced LM image

Type

ndarray

filename

String that contains the name of the .txt file

Type

str

directory

String that contains the directory of the .txt file

Type

str

create_directory(directory, name)

Creates a new directory

Parameters
  • directory (str) – The directory of the new folder

  • name (str) – The name of the new folder

Returns

new_dir – The directory and name of the new folder

Return type

str

set_directory(new_dir)

Adds a new directory to the class

Parameters

new_dir (str) – The new directory

class Modules.classes.contLMimg(orig, values, val_enh, filename, directory, propLMimg, rect_del, rect2_del, rect_exp, cnt_all, cnt_del, img_cnt, img_gr, img_rgb, coord, cdrawn)

A class which inherits from LMimg and contains the contour and the rectangles covering the objects in the image

rect_del

1 dimensional array with type rectangle that contains rectangles around contours

Type

ndarray

rect2_del

1 dimensional array with type int, rectangle that contains rectangles around clicked coordinates

Type

ndarray

rect_exp

1 dimensional array with type rectangle that contains the not selected expanded rectangles

Type

ndarray

cnt_all

1 dimensional array with type contours that were not selected manually

Type

ndarray

cnt_del

1 dimensional array with type contours that contains all not selected contours in the loop

Type

ndarray

img_cnt

N dimensional array with type int that contains all not selected contours

Type

image

img_gr

N dimensional array with type float that contains a greyscale image of the original image

Type

ndarray

img_rgb

N dimensional array with type float that contains img_gr as rgb image with detected contours

Type

ndarray

coord

N dimensional array with type float that contains the coordinates of points inside manually selected rectangles/contours

Type

ndarray

cdrawn

1 dimensional array with type int, int, float, float that contains the index of a rectangle with corresponding contour, the x- and y-coordinate of the contour

Type

ndarray

class Modules.classes.propLMimg(orig, values, val_enh, filename, directory, imgh, imgw, imgrh, imgrw, thr)

A class which inherits from LMimg and contains size, threshold value of the LM image

imgh

The height of the image in µm

Type

float

imgw

The width of the image in µm

Type

float

imgrh

The resolution of the yvalues

Type

int

imgrw

The resolution of the xvalues

Type

int

thr

Manually chosen threshold value for grayscale images

Type

int

class Modules.classes.Cell(img, gfimg, zcut2, label, cntCell, centre, mcentre, radius, rectChange, offset)

A class that contains the geometric properties of a cell

img

N x N x N dimensional array that contains the extracted cell images

Type

ndarray

gfimg

N x N x N dimensional array that contains the gaussian filtered images

Type

ndarray

zcut2

N x 2 dimensional array with type float that contains two extracted cuts

Type

ndarray

label

N dimensional array with type str that contains the labels of the images

Type

ndarray

cntCell

N x N X (1, 1) dimensional array with type (int, int) that contains the contour of the cells

Type

ndarray

centre

N x (1, 1) dimensional array with type (float, float) that contains the centre of the cell

Type

ndarray

mcentre

N x (1, 1) dimensional array with type (float, float) that contains the centre of mass of the cell

Type

ndarray

radius

N dimensional array with type float that contains the radius of the detected circle

Type

ndarray

rectChange

N x (1, 1, 1, 1, 1, 1, 1) dimensional array with type float that contains the bounding coordinates of the bounding rectangle around a cell

Type

ndarray

offset

N x (1, 1) dimensional array with type float that contains the x and y offset of the cropped image

Type

ndarray

calc_cellCnt(circle_found, img_hc, directory)

Calculates the coordinates of the cell contour

Parameters
  • circle_found (ndarray) – N x (1, 1, 1) dimensional array with type float that contains the centre and the radius of the detected circle

  • img_hc (ndarray) – N x N dimensional array that contains the normalised zvalues

calc_geomP()

Calculates the coordinates inside the cell, its centre, and its centre of mass

extract_cut(circle_found, imgh, imgw, imgrh, imgrw)

Extracts cut from cell image

Parameters
  • circle_found (ndarray) – N x (1, 1, 1) dimensional array with type float that contains the centre and the radius of the detected circle

  • imgh (float) – The height of the image in µm

  • imgw (float) – The width of the image in µm

  • imgrh (int) – The resolution of the yvalues

  • imgrw (int) – The resolution of the xvalues

class Modules.classes.ToolTip(widget, text)

Class that defines a window upon hovering mouse event

hideTooltip()

Hides a window, when previously shown by hovering above an icon

showTooltip()

Shows a window, when hovering above an icon