PartSegCore.analysis.measurement_calculation¶
- class PartSegCore.analysis.measurement_calculation.ColocalizationMeasurement[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
This algorithm has following parameters:
channel_fst (Channel)- Channel 1
channel_scd (Channel)- Channel 2
colocalization (CorrelationEnum)- Colocalization
randomize (bool)- Randomize channel, If randomize orders of pixels in one channel
randomize_repeat (int)- Randomize num, Number of repetitions for mean_calculate
- classmethod calculate_property(area_array, colocalization, randomize=False, randomize_repeat=10, channel_fst=0, channel_scd=1, **kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.Compactness[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(**kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.ComponentBoundingBox[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(bounds_info, _component_num, **kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.ComponentsInfo(roi_components: numpy.ndarray, mask_components: numpy.ndarray, components_translation: Dict[int, List[int]])[source]¶
Bases:
NamedTuple
Class for storage information about relation between roi components and mask components
- Variables
roi_components (numpy.ndarray) – list of roi components
mask_components (numpy.ndarray) – list of mask components
components_translation (Dict[int, List[int]]) – mapping from roi components to mask components base on intersections
- mask_components: numpy.ndarray¶
Alias for field number 1
- roi_components: numpy.ndarray¶
Alias for field number 0
- class PartSegCore.analysis.measurement_calculation.ComponentsNumber[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(area_array, **_)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.Diameter[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
Class for calculate diameter of ROI in fast way. From Malandain, G., & Boissonnat, J. (2002). Computing the diameter of a point set, 12(6), 489-509. https://doi.org/10.1142/S0218195902001006
- static calculate_property(area_array, voxel_size, result_scalar, **_)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.DiameterOld[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
n**2 calculate diameter of ROI
- static calculate_property(area_array, voxel_size, result_scalar, **_)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.DistanceMaskROI[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
This algorithm has following parameters:
distance_from_mask (DistancePoint)- Distance from mask
distance_to_roi (DistancePoint)- Distance to ROI
- static area_type(area)[source]¶
Map chosen area type to proper area type. Allow to correct Area type.
- classmethod calculate_property(channel, area_array, mask, voxel_size, result_scalar, distance_from_mask, distance_to_roi, *args, **kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.DistancePoint(value)[source]¶
Bases:
enum.Enum
An enumeration.
- class PartSegCore.analysis.measurement_calculation.DistanceROIROI[source]¶
Bases:
PartSegCore.analysis.measurement_calculation.DistanceMaskROI
This algorithm has following parameters:
profile (ROIExtractionProfile)- ROI extraction profile
distance_from_new_roi (DistancePoint)- Distance new ROI
distance_to_roi (DistancePoint)- Distance to ROI
- classmethod calculate_property(channel, image, area_array, profile, mask, voxel_size, result_scalar, distance_from_new_roi, distance_to_roi, **kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel (
ndarray
) – main channel selected for measurementchannel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array (
ndarray
) – array representing current area returned byarea_type()
roi – array representing roi
mask (
Optional
[ndarray
]) – array representing mask (upper level roi)voxel_size (
Sequence
[float
]) – size of single voxel in metersresult_scalar (
float
) – scalar to get proper units in resultroi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.FirstPrincipalAxisLength[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(**kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.GetROIAnnotationType[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
This algorithm has following parameters:
name (str)- Name
- static calculate_property(roi_annotation, name, _component_num, **kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.Haralick[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
This algorithm has following parameters:
feature (HaralickEnum)- Feature
distance (ConstrainedIntValue)- Distance
- classmethod calculate_property(area_array, channel, distance, feature, _cache=False, **kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.HaralickEnum(value)[source]¶
Bases:
enum.Enum
An enumeration.
- PartSegCore.analysis.measurement_calculation.MEASUREMENT_DICT¶
Register with all measurements algorithms
Need class methods:
get_description
,is_component
,calculate_property
,get_starting_leaf
,get_units
,need_channel
Default content:
Volume -
Volume
Diameter -
Diameter
Pixel brightness sum -
PixelBrightnessSum
Component Bounding Box -
ComponentBoundingBox
annotation by name -
GetROIAnnotationType
Components number -
ComponentsNumber
Maximum pixel brightness -
MaximumPixelBrightness
Minimum pixel brightness -
MinimumPixelBrightness
Mean pixel brightness -
MeanPixelBrightness
Median pixel brightness -
MedianPixelBrightness
Standard deviation of pixel brightness -
StandardDeviationOfPixelBrightness
Colocalization -
ColocalizationMeasurement
Moment -
Moment
First principal axis length -
FirstPrincipalAxisLength
Second principal axis length -
SecondPrincipalAxisLength
Third principal axis length -
ThirdPrincipalAxisLength
Compactness -
Compactness
Sphericity -
Sphericity
Surface -
Surface
rim volume -
RimVolume
rim pixel brightness sum -
RimPixelBrightnessSum
Neighbourhood new ROI presence -
ROINeighbourhoodROI
ROI distance -
DistanceMaskROI
to new ROI distance -
DistanceROIROI
distance splitting volume -
SplitOnPartVolume
distance splitting pixel brightness sum -
SplitOnPartPixelBrightnessSum
Voxels -
Voxels
Haralick -
Haralick
Voxel size -
VoxelSize
- class PartSegCore.analysis.measurement_calculation.MaximumPixelBrightness[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(area_array, channel, **_)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.MeanPixelBrightness[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(area_array, channel, **_)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.MeasurementResult(components_info)[source]¶
Bases:
MutableMapping
[str
,Tuple
[Union
[float
,List
[float
],str
],str
]]Class for storage measurements info.
- get_component_info(all_components=False)[source]¶
Get information which type of components are in storage.
- get_labels(expand=True, all_components=False)[source]¶
If expand is false return list of keys of this storage. Otherwise return labels for measurement. Base are keys of this storage. If has mask components, or has segmentation_components then add this labels
- class PartSegCore.analysis.measurement_calculation.MedianPixelBrightness[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(area_array, channel, **_)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.MinimumPixelBrightness[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(area_array, channel, **_)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.Moment[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(area_array, channel, voxel_size, **_)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.PixelBrightnessSum[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- class PartSegCore.analysis.measurement_calculation.ROINeighbourhoodROI[source]¶
Bases:
PartSegCore.analysis.measurement_calculation.DistanceMaskROI
This algorithm has following parameters:
profile (ROIExtractionProfile)- ROI extraction profile
distance (ConstrainedFloatValue)- Distance
units (Units)- Units
- classmethod calculate_property(image, area_array, profile, mask, voxel_size, distance, units, **kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array (
ndarray
) – array representing current area returned byarea_type()
roi – array representing roi
mask (
Optional
[ndarray
]) – array representing mask (upper level roi)voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.RimPixelBrightnessSum[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
This algorithm has following parameters:
distance (ConstrainedFloatValue)- Distance
units (Units)- Units
- static area_type(area)[source]¶
Map chosen area type to proper area type. Allow to correct Area type.
- static calculate_property(channel, area_array, **kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.RimVolume[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
This algorithm has following parameters:
distance (ConstrainedFloatValue)- Distance
units (Units)- Units
- static area_type(area)[source]¶
Map chosen area type to proper area type. Allow to correct Area type.
- static calculate_property(area_array, voxel_size, result_scalar, **kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.SecondPrincipalAxisLength[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(**kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.SettingsValue(function, help_message, arguments, is_component, default_area)[source]¶
Bases:
NamedTuple
- default_area: Optional[PartSegCore.analysis.measurement_base.AreaType]¶
Alias for field number 4
- function: Callable¶
Alias for field number 0
- class PartSegCore.analysis.measurement_calculation.Sphericity[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(**kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.SplitOnPartPixelBrightnessSum[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
This algorithm has following parameters:
num_of_parts (ConstrainedIntValue)- Number of Parts
equal_volume (bool)- Equal Volume, If split should be done in respect of parts volume of parts thickness.
part_selection (ConstrainedIntValue)- Which part (from border)
- static area_type(area)[source]¶
Map chosen area type to proper area type. Allow to correct Area type.
- static calculate_property(part_selection, channel, area_array, **kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.SplitOnPartVolume[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
This algorithm has following parameters:
num_of_parts (ConstrainedIntValue)- Number of Parts
equal_volume (bool)- Equal Volume, If split should be done in respect of parts volume of parts thickness.
part_selection (ConstrainedIntValue)- Which part (from border)
- static area_type(area)[source]¶
Map chosen area type to proper area type. Allow to correct Area type.
- static calculate_property(part_selection, area_array, voxel_size, result_scalar, **kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.StandardDeviationOfPixelBrightness[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(area_array, channel, **_)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.Surface[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(area_array, voxel_size, result_scalar, **_)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.ThirdPrincipalAxisLength[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- static calculate_property(**kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.Volume[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- classmethod calculate_property(area_array, voxel_size, result_scalar, **_)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.VoxelSize[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- classmethod calculate_property(voxel_size, result_scalar, **kwargs)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- class PartSegCore.analysis.measurement_calculation.Voxels[source]¶
Bases:
PartSegCore.analysis.measurement_base.MeasurementMethodBase
- classmethod calculate_property(area_array, **_)[source]¶
Main function for calculating measurement
- Parameters
channel – main channel selected for measurement
channel_{i} – for channel requested using
get_fields()
AlgorithmProperty("channel", "Channel", 0, value_type=Channel)
area_array – array representing current area returned by
area_type()
roi – array representing roi
mask – array representing mask (upper level roi)
voxel_size – size of single voxel in meters
result_scalar – scalar to get proper units in result
roi_alternative – dict with alternative roi representation (for plugin specific mapping)
roi_annotation – dict with roi annotations (for plugin specific mapping)
List incomplete.
- PartSegCore.analysis.measurement_calculation.double_normal(point_index, point_positions, points_array)[source]¶
- PartSegCore.analysis.measurement_calculation.empty_fun(_a0=None, _a1=None)[source]¶
This function is being used as dummy reporting function.
- PartSegCore.analysis.measurement_calculation.hash_fun_call_name(fun, arguments, area, per_component, channel, components_num)[source]¶
Calculate string for properly cache measurements result.
- Parameters
fun (
Union
[Callable
,MeasurementMethodBase
]) – method for which hash string should be calculatedarguments (
Dict
) – its additional argumentsarea (
AreaType
) – type of reaper_component (
PerComponent
) – If it is per componentchannel (
Channel
) – channel number on which calculation is performed
- Return type
- Returns
unique string for such set of arguments