|
25 | 25 | from CHAP.models import CHAPBaseModel
|
26 | 26 |
|
27 | 27 |
|
| 28 | +class BinarizeProcessorConfig(CHAPBaseModel): |
| 29 | + """Configuration class to binarize a dataset in a 2D or 3D |
| 30 | + array-like object or a NeXus NXdata or NXfield object. |
| 31 | +
|
| 32 | + :param method: Binarization method, defaults to `'CHAP'` |
| 33 | + (CHAP's internal implementation of Otzu's method). |
| 34 | + :type method: Literal['CHAP', 'isodata', 'minimum', 'otsu', 'yen'] |
| 35 | + :param num_bin: The number of bins used to calculate the |
| 36 | + histogram in the binarization algorithms, defaults to `256`. |
| 37 | + :type num_bin: int, optional |
| 38 | + :param nxpath: The path to a specific NeXus NXdata or NXfield |
| 39 | + object in the NeXus file tree to read the input data from |
| 40 | + (ignored for non-NeXus input objects). |
| 41 | + :type nxpath: str, optional |
| 42 | + :param remove_original_data: Removes the original data field |
| 43 | + (ignored for non-NeXus input objects), defaults to `False`. |
| 44 | + :type remove_original_data: bool, optional |
| 45 | + """ |
| 46 | + method: Optional[Literal[ |
| 47 | + 'CHAP', 'isodata', 'minimum', 'otsu', 'yen']] = 'CHAP' |
| 48 | + num_bin: Optional[conint(ge=0)] = 256 |
| 49 | + nxpath: Optional[str] = None |
| 50 | + remove_original_data: Optional[bool] = False |
| 51 | + |
| 52 | + |
28 | 53 | class ImageProcessorConfig(CHAPBaseModel):
|
29 | 54 | """Class representing the configuration of various image selection
|
30 | 55 | and visualization types of processors.
|
|
0 commit comments