read_3mf#

medicalimageanalysis.read_3mf(file, roi_name=None)[source]

Load a 3MF mesh file using ThreeMfReader.

Parameters:
  • file (str) – Path to the 3MF file.

  • roi_name (str | None) – Optional ROI name to associate with the mesh.

Return type:

None

Examples

Load a 3MF implant mesh:

>>> read_3mf('C:/Data/implant.3mf')

Load a 3MF file and assign an ROI name:

>>> read_3mf(
...     file='C:/Data/pelvis_model.3mf',
...     roi_name='Pelvis',
... )