slitflow.img.proc module
This process module includes classes that change image structure such as frm_no and image width and height.
- class SelectParam(info_path=None)[source]
Bases:
ImageSelect image frames based on parameter values.
This class creates a mask column based on explicit param values using
slitflow.tbl.filter.MaskFromParamand selects rows using the mask column.- Parameters:
reqs[0] (Image) – Image for selection.
reqs[1] (Table) – Index Table that includes all indices corresponding to the image. The index table should be split into the same depth as the image.
param["index"] (list of tuple) – List of image index numbers to select. The tuple should be (index of depth=1, index of depth=2, …). If index is None, all indices of the depth is selected.
param["split_depth"] (int) – File split depth number.
- Returns:
Selected Image.
- Return type:
- Raises:
Exception – If the split depths of the image and index table are not the
same. –
- static process(reqs, param)[source]
Select image frames based on parameter values.
- Parameters:
reqs[0] (numpy.ndarray) – Image for selection.
reqs[1] (Table) – Index Table that includes all indices corresponding to the image. The index table should be split into the same depth as the image.
param["index"] (list of tuple) – List of tuple of index numbers to select. The tuple should be (index of depth=1, index of depth=2, …). If index is None, all indices of the depth is selected.
param["mask_col"] (str, optional) – The name of the mask column. Defaults to “mask”.
- Returns:
Selected Table.
- Return type:
- set_index()[source]
Create index structure of this analysis data.
This step strongly depends on the analysis type. Frequently used processes are in
slitflow.setindex.