VirtualEmbryo / foambryo

Python package to infer tensions and pressures from 3D microscopy images of embryos and tissues
https://www.turlierlab.com
Other
9 stars 2 forks source link

Issue with importing some functions #2

Open parsazarei1 opened 6 months ago

parsazarei1 commented 6 months ago

Hi, This is an amazing tool and thanks for making it available! Could you help me identify the problem with importing the some of the functions?

After using pip to install foambryo and foambryo[viewing], I am able to import and use the following:

  1. from foambryo import plot_force_inference, plot_tension_inference
  2. from foambryo import infer_forces

However, the following imports do not work and I get a similar error for each one:

Error: ImportError: cannot import name 'dcel_mesh_from_segmentation_mask' from 'foambryo' (C:\ProgramData\anaconda3\Lib\site-packages\foambryo__init__.py)

Functions that cause the error above:

  1. from foambryo import dcel_mesh_from_segmentation_mask
  2. from foambryo.viewing import plot_force_inference, plot_tension_inference
  3. from foambryo import infer_pressures, infer_tensions
  4. from foambryo import PressureComputationMethod, TensionComputationMethod

Since the dcel_mesh_from_segmentation_mask cannot be imported, I am using the following method to build the mesh from the segmentation mask and use plot_force_interface:

Load the labels

import skimage.io as io Segmentation = io.imread('E:/ablation/ABTZL-cftr-hsp-h2a-tdtom-col8a1a-gfpCaax-2dpf/fish1/T_-1/closed_stack.tif')

Reconstruct a multimaterial mesh from the labels

DW = geometry_reconstruction_3d(Segmentation,min_dist = 3) Verts, Faces_multimaterial = DW.return_mesh() Mesh = DCEL_Data(Verts,Faces_multimaterial)