slitflow.loc.mask module
- class Value(info_path=None)[source]
Bases:
TableCreate mask value column at the coordinate position of each X and Y.
Caution
The mask image should be split into a single frame image. In other words, the shape of reqs[1] in
process()should be (1, height, width).- Parameters:
reqs[0] (Table) – Table including X,Y-coordinates. Required params;
length_unit,pitch.reqs[1] (Image) – Image stack to pick up intensity.
param["add_cols"] (list of str, optional) – Additional columns to copy from required table. If this param is not defined, index columns are copied.
param["split_depth"] (int) – File split depth number.
- Returns:
Table containing mask value column
- Return type:
- static process(reqs, param)[source]
Create mask value column at the coordinate position of each X and Y.
- Parameters:
reqs[0] (pandas.DataFrame) – Table including X,Y-coordinate.
reqs[1] (numpy.ndarray) – Numpy 3D array with the shape of (1, height, width).
param["calc_cols"] (list of str) – Column names for X,Y-coordinate.
param["pitch"] (float) – Length per pixel.
param["index_cols"] (list of str) – Column names to keep in the result table.
- Returns:
Table containing mask value column
- Return type:
- class BinaryImage(info_path=None)[source]
Bases:
TableSelect table rows that have coordinates inside the binary mask.
Caution
The mask image should be split into a single frame image. In other words, the shape of reqs[1] in
process()should be (1, height, width).- Parameters:
- Returns:
Table with rows located inside mask image
- Return type:
- static process(reqs, param)[source]
Select table rows that have coordinates inside the binary mask.
- Parameters:
reqs[0] (pandas.DataFrame) – Table including X,Y-coordinate.
reqs[1] (numpy.ndarray) – Numpy 3D array with the shape of (1, height, width).
param["calc_cols"] (list of str) – Column names for X,Y-coordinate.
param["pitch"] (float) – Length per pixel.
- Returns:
Table rows located inside mask image
- Return type: