slitflow.img.create module
- class Black(info_path=None)[source]
Bases:
ImageCreate black Image using an Index table.
- Parameters:
reqs[0] (Table) – The Index table.
param["pitch"] (float) – The pixel size in length_unit/pix.
param["interval"] (float, optional) – The time interval in seconds.
param["img_size"] (list of int) – The width and height of each image (pixels).
param["type"] (str, optional) – The value type of intensity. Defaults to “uint8”.
param["length_unit"] (str) – The unit string for image size, such as “um”, “nm”, “pix”.
param["split_depth"] (int) – The file split depth number.
- Returns:
The black image.
- Return type:
- static process(reqs, param)[source]
Create black Image using an Index table.
- Parameters:
reqs[0] (pandas.DataFrame) – The Index table.
param["img_size"] (list of int) – The width and height of each image (pixels).
- Returns:
The black image.
- Return type:
- class RandomRGB(info_path=None)[source]
Bases:
RGBCreate random RGB image using Index table.
- Parameters:
reqs[0] (Table) – Index table.
param["pitch"] (float) – Pitch size in length_unit/pix.
param["interval"] (float, optional) – Time interval in second.
param["img_size"] (list of int) – Width and height of each image in pixel.
param["split_depth"] (int) – File split depth number.
param["length_unit"] (str) – Unit string for column names such as “um”, “nm”, “pix”.
param["seed"] (int, optional) – Random seed.
- Returns:
RGB Image
- Return type:
- set_info(param={})[source]
Convert input information to Info object.
This method creates columns and parameters information. The columns information is used to handle data structure. The parameter dictionaries are set as param of
process(). This method is called beforerun(). Implemented in subclass.- Parameters:
param (dict, optional) – Parameters for columns or params.
- static process(reqs, param)[source]
Create random RGB image.
- Parameters:
reqs[0] (pandas.DataFrame) – Index table.
param["img_size"] (list of int) – Width and height of each image (pix).
- Returns:
RGB image
- Return type:
- class CheckerBoard(info_path=None)[source]
Bases:
ImageCreate a checkerboard image using an index table.
- Parameters:
reqs[0] (Table) – The index table.
param["pitch"] (float) – The pixel size in length_unit/pixel.
param["interval"] (float, optional) – The time interval in seconds.
param["img_size"] (list of int) – The width and height of each image in pixels.
param["box_size"] (list of int) – The width and height of each checkerboard box in pixels.
param["type"] (str, optional) – The value type of intensity. Defaults to “uint8”.
param["length_unit"] (str) – The unit string for column names such as “um”, “nm”, or “pix”.
param["intensity" (int or str) – The degree of whiteness in each frame. If “ascend” is specified, the degree of whiteness increases by one in each subsequent frame.
param["split_depth"] (int) – File split depth number.
- Returns:
Checkerboard image stack.
- Return type:
- static process(reqs, param)[source]
Create checkerboard Image using Index table.
- Parameters:
reqs[0] (pandas.DataFrame) – Index table.
param["img_size"] (list of int) – Width and height of each image (pix).
param["box_size"] (list of int) – The width and height of each checkerboard box in pixels.
param["type"] (str) – The value type of intensity.
param["intensity" (int or str) – The degree of whiteness in each frame. If “ascend” is specified, the degree of whiteness increases by one in each subsequent frame.
- Returns:
Checkerboard image stack.
- Return type: