PartSegCore.analysis.calculation_plan¶
- class PartSegCore.analysis.calculation_plan.BaseCalculation(base_prefix, result_prefix, measurement_file_path, sheet_name, calculation_plan, voxel_size, overwrite_voxel_size=False)[source]¶
Bases:
objectBase description of calculation needed for single file
- Variables:
~.base_prefix (str) – path prefix which should be used to calculate relative path of processed files
~.result_prefix (str) – path prefix for saving structure
~.measurement_file_path (str) – path to file in which result of measurement should be saved
~.sheet_name (str) – name of sheet in excel file
~.calculation_plan (CalculationPlan) – plan of calculation
uuid (str) – ~.uuid of whole calculation
~.voxel_size – default voxel size (for files which do not contains this information in metadata
- class PartSegCore.analysis.calculation_plan.Calculation(file_list, base_prefix, result_prefix, measurement_file_path, sheet_name, calculation_plan, voxel_size, overwrite_voxel_size=False)[source]¶
Bases:
BaseCalculationDescription of whole calculation. Extended with list of all files to proceed
- Variables:
~.base_prefix (str) – path prefix which should be used to calculate relative path of processed files
~.result_prefix (str) – path prefix for saving structure
~.measurement_file_path (str) – path to file in which result of measurement should be saved
~.sheet_name (str) – name of sheet in excel file
~.calculation_plan (CalculationPlan) – plan of calculation
uuid (str) – ~.uuid of whole calculation
~.voxel_size – default voxel size (for files which do not contains this information in metadata
- class PartSegCore.analysis.calculation_plan.CalculationPlan(tree=None, name='')[source]¶
Bases:
objectClean description Calculation plan.
- get_mask_names(node=None)[source]¶
- Parameters:
node (CalculationTree)
- Returns:
set[str]
- get_measurements(node=None)[source]¶
Get all measurement Calculation below given node
- Parameters:
node (
Optional[CalculationTree]) – Node for start, if absent then start from plan root- Return type:
- Returns:
list of measurements
- class PartSegCore.analysis.calculation_plan.CalculationTree(operation, children)[source]¶
Bases:
objectStructure for describe calculation structure
- class PartSegCore.analysis.calculation_plan.FileCalculation(file_path, calculation)[source]¶
Bases:
objectDescription of single file calculation
- property base_prefix¶
path prefix which should be used to calculate relative path of processed files
- property calculation_plan¶
plan of calculation
- property overwrite_voxel_size¶
overwrite voxel size
- property result_prefix¶
path prefix for saving structure
- property uuid¶
uuid of whole calculation
- property voxel_size¶
default voxel size (for files which do not contains this information in metadata
- class PartSegCore.analysis.calculation_plan.MaskBase(**data)[source]¶
Bases:
BaseModelBase class for mask in calculation plan.
- Variables:
~.name (str) – name of mask
- class PartSegCore.analysis.calculation_plan.MaskCreate(**data)[source]¶
Bases:
MaskBaseDescription of mask creation in calculation plan.
- Variables:
~.name (str) – name of mask
~.mask_property (str) – instance of
MaskProperty
- class PartSegCore.analysis.calculation_plan.MaskFile(**data)[source]¶
Bases:
MaskMapper
- class PartSegCore.analysis.calculation_plan.MaskIntersection(**data)[source]¶
Bases:
MaskBaseDescription of AND operation on mask
- Variables:
- class PartSegCore.analysis.calculation_plan.MaskMapper(**data)[source]¶
Bases:
BaseModelBase class for obtaining mask from computer disc
- Variables:
~.name – mask name
- class PartSegCore.analysis.calculation_plan.MaskSub(**data)[source]¶
Bases:
MaskMapperDescription of mask form file obtained by substitution
- Variables:
- class PartSegCore.analysis.calculation_plan.MaskSuffix(**data)[source]¶
Bases:
MaskMapperDescription of mask form file obtained by adding suffix to image file path
- class PartSegCore.analysis.calculation_plan.MaskSum(**data)[source]¶
Bases:
MaskBaseDescription of OR operation on mask
- Variables:
- class PartSegCore.analysis.calculation_plan.MaskUse(**data)[source]¶
Bases:
MaskBaseReuse of already defined mask Will be deprecated in short time
- class PartSegCore.analysis.calculation_plan.MeasurementCalculate(**data)[source]¶
Bases:
BaseModelMeasurement calculation description
- Variables:
~.channel (int) – on which channel measurements should be calculated
~.units (Units) – Type of units in which results of measurements should be represented
~.statistic_profile (MeasurementProfile) – description of measurements
name_prefix (str) – prefix of column names
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property name¶
name of used MeasurementProfile
- class PartSegCore.analysis.calculation_plan.NodeType(*values)[source]¶
Bases:
EnumType of node in calculation
- file_mask = 7¶
mask load
- mask = 2¶
mask creation
- measurement = 3¶
measurement calculation
- none = 6¶
other, like description
- root = 4¶
root of calculation
- save = 5¶
save operation
- segment = 1¶
segmentation
- class PartSegCore.analysis.calculation_plan.Operations(*values)[source]¶
Bases:
EnumGlobal operations
- class PartSegCore.analysis.calculation_plan.PlanChanges(*values)[source]¶
Bases:
EnumHistory elements
- add_node = 1¶
- remove_node = 2¶
- replace_node = 3¶
- class PartSegCore.analysis.calculation_plan.RootType(*values)[source]¶
Bases:
EnumDefines root type which changes of data available on begin of calculation
- Image = 0¶
raw image
- Mask_project = 2¶
Project from mask segmentation. It contains multiple elements.
- Project = 1¶
PartSeg project with defined segmentation
- class PartSegCore.analysis.calculation_plan.Save(**data)[source]¶
Bases:
BaseModelSave operation description
- Variables:
- PartSegCore.analysis.calculation_plan.get_save_path(op, calculation)[source]¶
Calculate save path base on proceeded file path and save operation parameters. It assume that save algorithm is registered in
PartSegCore.analysis.save_functions.save_dict- Parameters:
op (
Save) – operation to docalculation (
FileCalculation) – information about calculation
- Return type:
- Returns:
save path