3.1.8. Option digitmed¶
3.1.8.1. Description¶
Medical image related tools (data mainly in DICOM or NIfTI protocol). For DICOM, Operations include regrouping and re-sorting slices, read meta information, link to other type of DICOM files and etc. In addition, measurement for images as feature extraction is also supported. For NIfTI image, the relation between pixel and voxel space requires computation. Dependencies of SimpltITK and pydicom are required.
Namespace of this module is mainly in info.toolbox.digitmed.rebuild. For convenience in practice, use main
entry of info.med. As for the image reconstruction related functions, import the rebuild module from
info.med.
load and re-organize a set of dicom slices in memory. |
|
build 3D image from a dicom series. |
|
parse keywords in dicom headers recursively. |
|
generic attribute loader for dicom file. |
|
rebuild dicom image(s) from a set of dicom slice files. |
|
generate a cache for logging regrouped dicom files. |
|
build 3D image from a NIfTI file. |
|
build 3D image(s) from NIfTI file(s). |
While for other functional units, directly import from info.med.
feature extraction automation. |
|
vascular invasion angle evaluation. |
3.1.8.2. Docstrings¶
- class DcmSetConstructor¶
load and re-organize a set of dicom slices in memory.
- Arguments:
- Parameters:
data (Iterable[str]) – Iterable object composed of paths of dicom slices
loader (Literal['SimpleITK', 'pydicom']) – library as load engine;
'SimpleITK'as defaultseries_k (str) – keyword or tag for determining the same set of dicom slices;
"0020|000e"as defaultinstance_k (str) – keyword or tag for determining the individual dicom slice instance;
"0008|0018"as defaultimage_orientation_k (str) – keyword or tag of Image Orientation (Patient);
"0020|0037"as defaultpixel_spacing_k (str) – keyword or tag of Pixel Spacing;
"0028|0030"as defaultimage_position_k (str) – keyword or tag of Image Position (Patient);
"0020|0032"as defaultspacing_between_slices_k (str) – keyword or tag of Spacing Between Slices;
"0018|0088"as default
- Variables:
~stacking_axis (int) – index of stacking axis; 2 as default
~verbosity (bool) – trigger for prompting message during data loading;
Falseas default~user_defined_io (Callable[[str], ...]) – customized loader to transfer string of file path, to object in memory;
Noneas default to usepydicomorSimpleITKautomatically
- Returns:
a DcmSetConstructor instance
- Return type:
- Property:
- files:
list of original dicom slice paths.
- files_set:
nested lists of re-organized dicom slice paths. paths attributed to the identical series were gathered into the same inner list.
- loader:
engine for loading and meta information. SimpleITK and pydicom are supported.
- headers:
header files using data loading engine mapped from
filesattribute.
- dcm_set:
nested lists of re-organized header files. header files attributed to the identical series were gathered into the same inner list.
- series_k:
keyword or tag for determining the same set of dicom slices. fetched from
settingsattribute.
- instance_k:
keyword or tag for determining the individual dicom slice instance. fetched from
settingsattribute.
- settings:
default settings for re-organizing.
- stacking_axis:
index for stacking axis. determined by internal parameter
~stacking_axis.
- Examples:
from info.med import rebuild as dcm dcm_slices = ['./data/Image0_0.dcm', './data/Image0_1.dcm', ..., './data/Image0_154.dcm', './data/Image1_0.dcm', './data/Image1_1.dcm', ..., './data/Image1_154.dcm'] # two dicom sets res = dcm.DcmSetConstructor(data=dcm_slices) print(res.dcm_set) # [[dicom_set_of_image0], [dicom_set_of_image1]]
- Logs:
Added in version 0.0.2.
Changed in version 0.0.4: support customized file loader via built-in argument
~user_defined_io, to enable dicom construction in distributed file system.– Created by Chen Zhang; Last updated on 01:34, 2025-09-06
- class DcmSeries¶
build 3D image from a dicom series.
- Arguments:
- Parameters:
data (Iterable[str]) – Iterable object composed of paths of dicom slices
loader (Literal['SimpleITK', 'pydicom']) – library as load engine;
'SimpleITK'as defaultseries_k (str) – keyword or tag for determining the same set of dicom slices;
"0020|000e"as defaultinstance_k (str) – keyword or tag for determining the individual dicom slice instance;
"0008|0018"as defaultimage_orientation_k (str) – keyword or tag of Image Orientation (Patient);
"0020|0037"as defaultpixel_spacing_k (str) – keyword or tag of Pixel Spacing;
"0028|0030"as defaultimage_position_k (str) – keyword or tag of Image Position (Patient);
"0020|0032"as defaultspacing_between_slices_k (str) – keyword or tag of Spacing Between Slices;
"0018|0088"as defaultaxis_order (str) – combination of
'x','y'and'z'to specify axis order;'zyx'as defaulttemplate_meta (object) – get a meta information template;
Nonefor default
- Variables:
~is_sorted (bool) – trigger to escape sort step;
Trueas default~stacking_axis (int) – index of stacking axis; 2 as default
~verbosity (bool) – trigger for prompting message during data loading;
Falseas default
- Returns:
a DcmSeries instance
- Return type:
- Property:
- metas:
dict composed of header information for a set of dicom file series.
- affine:
a \(\mathbb{R}^{4 \times 4}\) ndarray of affine matrix. affine describe the transformation from pixel to voxel space (see affine matrix).
- rcs_spacing:
a \(\mathbb{R}^3\) ndarray of voxel spacing in order of
_intrinsic_orderattribute.
- rcs_origin:
a \(\mathbb{R}^3\) ndarray of original location in order of
_intrinsic_orderattribute.
- rcs_coordinates:
tuple composed of ndarray as coordinate in order of
_intrinsic_orderattribute.
- rcs_array:
3-dimensional ndarray of image.
- rcs_suv:
3-dimensional ndarray of standard uptake values built from image. applied exclusively in positron emission tomography (PET) modality.
- affine_matrix:
the same as
affine.
- _intrinsic_order:
a certain combination of
(0, 1, 2), determined by parameteraxis_order. for example, the defaultaxis_orderused'zyx'will result in intrinsic order of(2, 1, 0).
- struct:
acquired attribute after linkage to struct file via
link_struct.
- dose:
acquired attribute after linkage to dose file via
link_dose.
- plan:
acquired attribute after linkage to plan file via
link_plan.
- Methods:
- link_struct:
link object to current dicom series.
- Variables:
data (str) – path-like string for struct file
roi_name_k (list[str]) – attribute keywords to visit roi names;
['StructureSetROISequence', 'ROIName']as defaultroi_number_k (list[str]) – attribute keywords to visit roi numbers;
['StructureSetROISequence', 'ROINumber']as defaultcontour_sequence_k (list[str]) – attribute keywords to visit contour sequence;
['ROIContourSequence', 'ContourSequence']as defaultreferenced_roi_number_k (list[str]) – attribute keywords to visit referenced roi numbers;
['ROIContourSequence', 'ReferencedROINumber']as defaultroi_name_map (Callable[[list[str]], list[ndarray]]) – callable object to map roi from name to ndarray; a
SingleMapinstance generated through previous arguments as default
from info.med import rebuild as dcm dcm_slices = ['./data/Image0_0.dcm', './data/Image0_1.dcm', ..., './data/Image0_154.dcm'] dcm_struct = './data/Image0_struct.dcm' img = dcm.dcm_constructor(data=dcm_slices)[0] # one set only img.link_struct(data=dcm_struct)
- roi_name_map:
acquired method after linking to struct file via
link_struct. obtain the ROI ndarray from names.- Variables:
data (list[str]) – names for desired rois
for roi in img.roi_name_map(['Spinal', 'Liver', 'Lung']): print(roi.shape)
- link_dose:
link object to current dicom dose.
- Variables:
data (str) – path-like string for dose file
grid_frame_offset_vector_k (Union[str, list[str]]) – attribute keywords to visit grid frame offset vector;
"3004|000c"as defaultdose_grid_scaling_k (Union[str, list[str]]) – attribute keywords to visit dose grid scaling;
"3004|000e"as defaultdecomp_method (Literal['cp', 'tucker']) – decomposition method when applying
resizefor resampling;'cp'or'tucker'is available;'tucker'as defaultinterp_method (Literal[...]) – interpolation method when applying
resize; options are'linear','nearest','nearest-up','zero','slinear','quadratic','cubic','previous', and'next';'linear'as defaultlinspace_nums (int) – number of points to be generated for dose volume histogram; 100 as default
dvh_name_map (Callable[[Union[list[str], dict[str, ndarray]]], list[ndarray, ndarray]]) – callable object to map roi from name to dose volume histogram points in (x, y) pairs; before which the
link_structmethod must be activated; aSingleMapinstance generated through previous argument as default
from info.med import rebuild as dcm dcm_slices = ['./data/Image0_0.dcm', './data/Image0_1.dcm', ..., './data/Image0_154.dcm'] dcm_struct = './data/Image0_struct.dcm' dcm_dose = './data/Image0_dose.dcm' img = dcm.dcm_constructor(data=dcm_slices)[0] # one set only img.link_struct(data=dcm_struct) img.link_dose(data=dcm_dose)
- rcs_dose:
acquired attribute to obtain the dose ndarray calibrated via original image
- dvh_name_map:
acquired method after linking to dose file via
link_dose. obtain the DVH ndarray from names.- Variables:
data (list[str]) – names for desired rois
from info.vis import visualization as vis from info.basic.functions import dvh_res_to_vis roi_names = ['CTV', 'Spinal', 'Eye'] dvh = img.dvh_name_map(data=roi_names) vis.Canvas.play(data=dvh_res_to_vis(dvh), fig_configs=vis.FigConfigs.Line.update(name=roi_names, symbol=None, pen=[_ for _ in 'rgb']), cvs_legend=True, cvs_left_label='Volume (%)', cvs_bottom_label='Dose (Gy)', cvs_title='Dose Volume Histogram (DVH)')
the corresponding dose volume histogram plot using
Canvasto visualize will be like:Figure 3.14 dose volume histogram plot¶
- link_plan:
under developing…
- Examples:
from info.med import rebuild as dcm dcm_slices = ['./data/Image0_0.dcm', './data/Image0_1.dcm', ..., './data/Image0_154.dcm', './data/Image1_0.dcm', './data/Image1_1.dcm', ..., './data/Image1_154.dcm'] # two dicom sets res = dcm.DcmSetConstructor(data=dcm_slices) # [[dicom_set_of_image0], [dicom_set_of_image1]] for image_set in res.dcm_set: dcm.DcmSeries(data=image_set)
- See also:
- Logs:
Added in version 0.0.2.
Changed in version 0.0.3: support linkage to struct file, acquired attribute and
roi_name_mapmethod after linkage.– Created by Chen Zhang; Last updated on 01:34, 2025-09-06
- dcm_hierarchical_parser¶
parse keywords in dicom headers recursively.
- Arguments:
- Parameters:
data (Union[str, Any]) – path-like str, the return from
dcm_attr_loader, orSequenceinstance frompydicom- Returns:
the parsed structure of keywords
- Return type:
str
- Examples:
from info.me.rebuild import dcm_hierarchical_parser, dcm_attr_loader file = "path/to/dcm/file.dcm" dcm_hierarchical_parser(data=file) # parse from a dicom file # |--- AccessionNumber # |--- BitsAllocated # ... # |--- ReferencedRTPlanSequence # | |--- ReferencedFractionGroupSequence # | | |--- ReferencedFractionGroupNumber # | |--- ReferencedSOPClassUID # | |--- ReferencedSOPInstanceUID # |--- ReferringPhysicianName # ... # |--- StudyTime plan_seq = dcm_attr_loader(data=file, attr_path="ReferencedRTPlanSequence") dcm_hierarchical_parser(data=plan_seq) # or parse from a dicom sequence # |--- ReferencedFractionGroupSequence # | |--- ReferencedFractionGroupNumber # |--- ReferencedSOPClassUID # |--- ReferencedSOPInstanceUID
- Logs:
Added in version 0.0.3.
– Created by Chen Zhang; Last updated on 01:34, 2025-09-06
- dcm_attr_loader¶
generic attribute loader for dicom file. with attribute keyword, or list of keywords describing the hierarchical relationship, corresponding values can be obtained.
- Arguments:
- Parameters:
data (Union[str, object]) – path-like string for dicom file, or pydicom
DataFilesetobjectattr_path (Union[str, list[str]]) – str for attribute, list of keywords for attribute path, or tuple of path list for multiple attributes reading
- Returns:
values in dicom headers
- Return type:
object
- Raises:
TypeError –
datais not assigned properly
- Examples:
Load attributes starting from a dicom file:
from info.med import rebuild as dcm file = "/path/to/dicom/file.dcm" # get referenced SOP instance UID via str assignment: uid = dcm.dcm_attr_loader(data=file, attr_path='ReferencedSOPInstanceUID') # get referenced fraction group number inside structured sequence, via list of keywords assignment: _path = ['ReferencedRTPlanSequence', 'ReferencedFractionGroupSequence', 'ReferencedFractionGroupNumber'] group_num = dcm.dcm_attr_loader(data=file, attr_path=_path) # get multiple attributes, via tuple composed of keyword paths _paths = (['ReferencedSOPInstanceUID'], ['ReferencedRTPlanSequence', 'ReferencedFractionGroupSequence', 'ReferencedFractionGroupNumber']) uid, group_num = dcm.dcm_attr_loader(data=file, attr_path=_paths)
Or load attributes, from the return of
dcm_attr_loaderself. This property is expected to be used in the circumstance of existing complicated parallel structure in parent attributes._path_parent = ['ReferencedRTPlanSequence', 'ReferencedFractionGroupSequence'] # paralleled sequences here _path_sub = ['ReferencedFractionGroupNumber'] for sequence in dcm.dcm_attr_loader(data=file, attr_path=_path_parent): group_num = dcm.dcm_attr_loader(data=sequence, attr_path=_path_sub)
- Notes:
pydicomstyled attribute path is supported exclusively, due to its stable capability to parse header.
- Logs:
Added in version 0.0.3.
– Created by Chen Zhang; Last updated on 01:34, 2025-09-06
- dcm_constructor¶
rebuild dicom image(s) from a set of dicom slice files.
- Arguments:
- Parameters:
data (Iterable[str]) – Iterable object composed of paths of dicom slices
loader (Literal['SimpleITK', 'pydicom']) – library as load engine;
'SimpleITK'as defaultseries_k (str) – keyword or tag for determining the same set of dicom slices;
"0020|000e"as defaultinstance_k (str) – keyword or tag for determining the individual dicom slice instance;
"0008|0018"as defaultimage_orientation_k (str) – keyword or tag of Image Orientation (Patient);
"0020|0037"as defaultpixel_spacing_k (str) – keyword or tag of Pixel Spacing;
"0028|0030"as defaultimage_position_k (str) – keyword or tag of Image Position (Patient);
"0020|0032"as defaultspacing_between_slices_k (str) – keyword or tag of Spacing Between Slices;
"0018|0088"as defaultaxis_order (str) – combination of
'x','y'and'z'to specify axis order;'zyx'as default
- Variables:
~use_template_meta (bool) – whether save a template meta via
pydicomfor eachDcmSeries;Truewill use headers in the first slice as example meta;Falseas default~user_defined_io (Callable[[str], ...]) – customized loader to transfer string of file path, to object in memory;
Noneas default to usepydicomorSimpleITKautomatically
- Returns:
a list composed of DcmSeries instance
- Return type:
list[DcmSeries]
- Raises:
TypeError –
datais not assigned properly
- Examples:
from info.med import rebuild as dcm dcm_slices = ['./data/Image0_0.dcm', './data/Image0_1.dcm', ..., './data/Image0_154.dcm', './data/Image1_0.dcm', './data/Image1_1.dcm', ..., './data/Image1_154.dcm'] # two dicom sets # use default SimpleITK loader imgs = dcm.dcm_constructor(data=dcm_slices) # or use pydicom loader imgs = dcm.dcm_constructor(data=dcm_slices, **dcm.pydicom_config) for img in imgs: print(img.metas)
- See also:
- Logs:
Added in version 0.0.2.
Changed in version 0.0.4: support customized file loader via built-in argument
~user_defined_io, to enable dicom construction in distributed file system.– Created by Chen Zhang; Last updated on 01:34, 2025-09-06
- dcm_regroup¶
generate a cache for logging regrouped dicom files.
- Arguments:
- Parameters:
data (Generator) – generator for dicom files to be integrated
regroup_reference (list[str]) – list of tags using for regrouping; tag from first to last refers the hierarchical structure from root to leaf in regrouped reference
loader (Literal['SimpleITK', 'pydicom']) – loader engine for dicom files;
'SimpleITK'or'pydicom'is acceptable;'SimpleTIK'as defaultrearrange (bool) – whether rearrange dicom files with pre-defined
loaderengine; ifFalse, regrouped dicom-like files will be rearranged by file names in a simple list, otherwise in a nested list composed of file names rearranged by their stacking axis locations, defined intrinsically in the data loading engine;Trueas defaultdump_as (str) – file name for saving regroup file reference;
'_regroup_refs'as default to generate a_regroup_refs.pypfile in work directory
- Variables:
~verbosity (bool) – trigger for prompting message during data processing and loading;
Falseas default~user_defined_io (Callable[[str], ...]) – customized loader to transfer string of file path, to object in memory;
Noneas default to usepydicomorSimpleITKautomatically
- Returns:
dict composed of basic settings of regrouping, and regroup files reference
- Return type:
dict
- Examples:
from info.med import rebuild as dcm from info.me import io gen = io.search_from_root(data=r"path/to/dicom/folder", search_condition=lambda x: x[-3:] == 'dcm') res = dcm.dcm_regroup(data=gen, regroup_reference=["0020|000e"]) res['regroup_result'] # {'uid_1': [[dicom_series_1, ...]], # 'uid_2': [[dicom_series_2, ...]], # ... # 'uid_n': [[dicom_series_n, ...]]} res = dcm.dcm_regroup(data=gen, regroup_reference=["0010|0010"]) res['regroup_result'] # {'patient_1': [[dicom_series_1, ...]], # 'patient_2': [[dicom_series_2, ...]], # ... # 'patient_n': [[dicom_series_n, ...]]} res = dcm.dcm_regroup(data=gen, regroup_reference=["0010|0010", "0020|000e"]) res['regroup_result'] # {'patient_1': {'uid_1': [[dicom_series_1, ...]], ..., 'uid_m1': [[dicom_series_m1, ...]]}, # 'patient_2': {'uid_1': [[dicom_series_1, ...]], ..., 'uid_m2': [[dicom_series_m2, ...]]}, # ... # 'patient_n': {'uid_1': [[dicom_series_1, ...]], ..., 'uid_mn': [[dicom_series_mn, ...]]}}
- Notes:
When
rearrangeisTrue, this function will callDcmSetConstructorusingloaderas data loading engine. In this condition, arguments can be passed intoDcmSetConstructor(like the~verbositydoes).
- See also:
- Logs:
Added in version 0.0.4.
– Created by Chen Zhang; Last updated on 01:34, 2025-09-06
- class NIfTI¶
build 3D image from a NIfTI file.
- Arguments:
- Parameters:
data (str) – path of nii or nii.gz NIfTI file
preprocess_meta (Optional[Callable[[str, str], Any]]) – callable object to preprocess header information, should be capable to convert keyword and value pairs, into accessible data type in Python; default uses a built-in function
axis_order (str) – combination of
'x','y'and'z'to specify axis order;'zyx'as default
- Returns:
NIfTI image
- Return type:
- Property:
- metas:
dict composed of header information for NIfTI image.
- affine:
a \(\mathbb{R}^{4 \times 4}\) ndarray of affine matrix. affine describe the transformation from pixel to a relative, or absolute voxel space (see NIfTI-1 Data Format).
- rcs_spacing:
a \(\mathbb{R}^3\) ndarray of voxel spacing in order of
_intrinsic_orderattribute.
- rcs_origin:
a \(\mathbb{R}^3\) ndarray of original location in order of
_intrinsic_orderattribute.
- rcs_coordinates:
tuple composed of ndarray as coordinate in order of
_intrinsic_orderattribute.
- rcs_array:
3-dimensional ndarray of image.
- rcs_suv:
3-dimensional ndarray of standard uptake values built from image. applied exclusively in positron emission tomography (PET) modality.
- affine_matrix:
the same as
affine.
- _intrinsic_order:
a certain combination of
(0, 1, 2), determined by parameteraxis_order. for example, the defaultaxis_orderused'zyx'will result in intrinsic order of(2, 1, 0).
- Examples:
from info.med import rebuild as nii nii_file = './data/image.nii' img = nii.NIfTI(data=nii_file) print(img.rcs_array.shape, img.rcs_spacing, img.rcs_origin)
- See also:
- Logs:
Added in version 0.0.5.
– Created by Chen Zhang; Last updated on 01:34, 2025-09-06
- nii_constructor¶
build 3D image(s) from NIfTI file(s).
- Arguments:
- Parameters:
data (Union[str, list[str]]) – path, or list of paths of nii or nii.gz NIfTI file
preprocess_meta (Optional[Callable[[str, str], Any]]) – callable object to preprocess header information, should be capable to convert keyword and value pairs, into accessible data type in Python; default uses a built-in function
axis_order (str) – combination of
'x','y'and'z'to specify axis order;'zyx'as default
- Variables:
~user_defined_io (Callable[[str], ...]) – customized loader to transfer string of file path, to object in memory;
Noneas default to useSimpleITKautomatically- Returns:
NIfTI image(s)
- Return type:
- Examples:
from info.med import rebuild as nii nii_files = ['./data/image0.nii', './data/image1.nii', ..., './data/image100.nii'] img_12 = nii.nii_constructor(data=nii_files[1:3]) # if not too much images imgs = (nii.nii_constructor(data=_) for _ in nii_files) # or mapping for all via generator
- See also:
- Logs:
Added in version 0.0.5.
– Created by Chen Zhang; Last updated on 01:34, 2025-09-06
- radiomics_features¶
feature extraction automation. this function requires the readiness of a configured pyradiomics environment.
- Arguments:
- Parameters:
data (Generator) – generator to yield case name, ndarray image, ndarray segmentation, spacing
extractor_setting (Optional[dict]) – parameters passed on radiomics extractor when initiation; empty dict
{}as default to use default settingerr_file (Optional[str]) – log to note down exceptive case;
Noneas default to use ‘err_case.log’ inplace, if any exceptive case captured during extractionimage_types (Optional[dict[str, dict]]) – parameters use image type as keyword to specify desired modality; value should be extraction setting during extraction, empty dict for using default setting;
Noneas default to apply all image typesfeature_class (Optional[dict[str, Optional[list[str]]]]) – customize selection features from sub feature class; keyword should be valid name of sub feature class, and the value is list composed of desired feature names; value can be
None, or empty list[]to enable all features of that modality;Noneas default, for not applying customized feature selection
- Returns:
table uses case names as indexing, and feature names as column names
- Return type:
DataFrame
- Examples:
from info.med import radiomics_features def gen(): for img in imgs: for roi in img.rois: yield str(img.name+roi.name), img, roi, img.spacing res = radiomics_features(data=gen()) res.to_csv('result.csv', encoding='utf-8-sig')
- Notes:
Default installation might result in no valid export for certain feature classes. If all features are desired, in case, ensure that PyWavelets, trimesh and scikit-image are installed in the environment.
The dependent pyradiomics package raises some unaddressed build issues in Python greater than 3.9 until now Aug 4, 2024. Recreate a downgraded Python (\(\leq\) 3.9) environment if necessary, otherwise await for the bugs-fixing from develop team of pyradiomics.
Incompatibility of some dependencies might raise due to numpy with version greater than 2.0.0.; Further test is required. If unknown error has been raised, try to downgrade numpy.
- Logs:
Added in version 0.0.3.
Changed in version 0.0.4:
remove pyradiomics from dependencies due to its unaddressed issues from source code building and no support for up-to-date Python version among its binary releases.
– Created by Chen Zhang; Last updated on 01:34, 2025-09-06
- vascular_invasion¶
vascular invasion angle evaluation.
- Arguments:
- Parameters:
data (tuple[ndarray, ndarray]) – tuple contained vascular and tumor masks
in_spacing (Iterable[Numeric]) – spacing for each dimension in the unit voxel;
Noneas default for using 1 on each dimensionscope_radius (Numeric) – radius of scope to make constraint on mask of vessel, to determine the center point of vessel;
Noneas default to automatically calculate the vector from the mass center of overlapped region, to the geometric center of tumor as its radius
- Variables:
~differential_tolerance (int) – positive integer used as differential operator to evaluate the status of penetration; 3 as default
- Returns:
1-length dict with boolean keyword as referred to whether was invaded, while value as represented for the spatial distance if no-connection; radian angle if invaded. If a list of numerical numbers was calculated, it is the set of radian angles for multiple invasion regions.
- Return type:
dict[bool, Union[Numeric, list[Numeric]]]
- Examples:
from info.med import vascular_invasion tumor, vessel, spacing = ... res = vascular_invasion(data=(tumor, vessel), in_spacing=spacing)
- Notes:
Implemented via dimension-irrelevant paradigm, with compatibility for tensor in 2-rank or higher.
No warranty in precision and efficiency for calculation on 3-dimensional case currently. This issue will be addressed in next official release.
- Logs:
Added in version 0.0.5: Scheme determination and clinical validation are conducted by Yajiao Zhang and Haoran Zhang.
– Created by Chen Zhang; Last updated on 01:34, 2025-09-06
- Authors:
Chen Zhang
- Version:
0.0.5
- Created on:
Jun 29, 2023