io_utils moduleΒΆ

class io_utils.FileConfig(cfg, sample: str, pipeline: str = 'fast', origaim_separate: bool = True)[source]

Bases: object

__dict__ = mappingproxy({'__module__': 'io_utils', '__init__': <function FileConfig.__init__>, 'file_bmd': <property object>, 'file_gray': <property object>, 'raw_name': <property object>, 'bmd_name': <property object>, 'boundary_conditions': <property object>, 'file_mask': <property object>, 'mask_name': <property object>, 'file_mask_cort': <property object>, 'file_mask_trab': <property object>, 'file_seg': <property object>, 'cort_mask_name': <property object>, 'trab_mask_name': <property object>, 'seg_name': <property object>, 'inp_name': <property object>, 'vtk_name': <property object>, 'sum_name': <property object>, 'ver_bpv_name': <property object>, 'set_filenames': <function FileConfig.set_filenames>, '__dict__': <attribute '__dict__' of 'FileConfig' objects>, '__weakref__': <attribute '__weakref__' of 'FileConfig' objects>, '__doc__': None, '__annotations__': {}})
__init__(cfg, sample: str, pipeline: str = 'fast', origaim_separate: bool = True)[source]
__module__ = 'io_utils'
__weakref__

list of weak references to the object (if defined)

property bmd_name: Path
property boundary_conditions: str
property cort_mask_name: Path
property file_bmd: Path
property file_gray: Path
property file_mask: Path
property file_mask_cort: Path
property file_mask_trab: Path
property file_seg: Path
property inp_name: Path
property mask_name: Path
property raw_name: Path
property seg_name: Path
set_filenames()[source]
property sum_name: Path
property trab_mask_name: Path
property ver_bpv_name: Path
property vtk_name: Path
io_utils.ext(filename, new_ext)[source]

Changes the file extension.

io_utils.hydra_update_cfg_key(cfg, key, value)[source]
io_utils.log_append_processingtime(filename, time)[source]
io_utils.log_summary(bone, config, filenames, var)[source]
io_utils.print_mem_usage()[source]
io_utils.set_filenames(cfg, sample, pipeline='fast', origaim_separate=True)[source]

Set filenames for each grayscale file. Filenames depend on pipeline (fast/accurate). Always: - native image for header - BMD or Native image croppped to ROI additional for fast pipeline: - periosteal mask additional for accurate pipeline: - trabecular mask - cortical mask - two-phase segmentation

io_utils.timeit(method)[source]
io_utils.write_timing_summary(cfg, sample: str, time: dict)[source]

Writes a summary of processing times for all samples in config to summaries folder. :param path path to store (summaries): :param time dict with full processing time and simulation processing time:

Return type:

writes txt file