SCIRun User Mailing List

Text archives Help

[SCIRUN-USERS] Error with BioMesh3D

Chronological Thread 
  • From: Trevor Aguirre <>
  • To:
  • Subject: [SCIRUN-USERS] Error with BioMesh3D
  • Date: Sat, 23 Dec 2017 13:42:34 -0700


I have a question about using BioMesh3D

I am trying to run through the tutorial for the tooth. I have modified the file to reflect the correct directory for the tooth-seg-unorient.nrrd file as well as modified the for the correct output directory. The tooth-seg-unorient.nrrd and the are in the same folder on my desktop. When trying to run this from cmd.exe I encounter the errors below and in the attached image. 

The first steps are me changing my working directory to reflect the directory where the file is on my computer and then me entering the file path to where tooth-seg-unorient.nrrd and the files are located on my PC. 

It says invalid syntax was encountered in the file at line 262. Do you have any insight on this issue? I am not sure what I have done incorrectly so any insight would be much appreciated. I have attached my file if it is need. 

Begin error message

C:\>cd Program Files\SCIRun 4.7\bin\FEMesher
C:\Program Files\SCIRun 4.7\bin\FEMesher>
default binary_dir = C:\Program Files\SCIRun 4.7\bin
Model configuration file is needed to run meshing pipeline.
Which model configuration file to use?  C:\Users\aguirret\Desktop\Tooth\
Traceback (most recent call last):
  File "C:\Program Files\SCIRun 4.7\bin\FEMesher\", line 262, in <module>
  File "<string>", line 77
    ags available in this option are the same as the previous variable. It
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\SCIRun 4.7\bin\FEMesher\", line 265, in <module>
  File "C:\Program Files\SCIRun 4.7\bin\FEMesher\", line 87, in write_error
    txt_file = open(stage_path, 'w')
PermissionError: [Errno 13] Permission denied: '.\\mesh_state.txt'

End error message

Best regards and looking forward to your reply,

Trevor G. Aguirre
PhD Student, Mechanical Engineering, Colorado State University
Graduate Research Assistant, Orthopaedic Bioengineering Research Laboratory
National Graduate Representative, Society of Hispanic Professional Engineers

# The model config:py setup file needs to be edited to fit your machine and
# It is suggested that a model file be made for each dataset run in
# There are several variables in the model config:py that need to be set.
# 1) model_input_file, 2) model_output_path, 3) mats, 4) mat_names, 5)
# 6) refinement_levels, 7) max_sizing_field, 8) SIZING_SCALE_VAR, 9)
# 10) tetgen)_joined_vol_flags, and 11) max_procs.

# The path for the mesh that will be input into the pipeline; in
# our case, the segmentation of the tooth (.../tooth.nrrd).


# Original model_input_file definition from example.

# The path for the output files that will be generated by BioMesh3D


# The mask or data values of the materials in the input fields. In the case
# of our tooth segmentation, there are four materials: the three di erent
# that we segmented, and the air around it. These are all assigned a value by
# Seg3D, beginning with 0. With the tooth file that we are using, we will
# this variable (0,1,2,3).

mats = (0, 1, 2, 3)

# The names of the materials labeled in the segmentation. Each
# material labeled in the mats variable needs to have unique name. For
# we will assign the mat names variable (`air', `mat1', `mat2', `mat3').

mat_names = ('air', 'mat1', 'mat2', 'mat3')

# This variable is a parameter for the tightening that is performed in
# the second stage to make the meshes smoother. To turn on tightening, such as
# for very thin (one or two voxels thick) meshes, set this parameter to 0.
For the
# tooth file that we are using, we can leave the default value 0.8.

mat_radii = 0.8

# This will modify the generation and refinement of the medial
# axis points. A higher value will allow for more refinement, and thus medial
# points will be closer together. This variable can be set higher if the
# is very small or narrow.


# Modifies the sizing field algorithm. A lower number generates
# more final elements on the tetrahedral mesh.


# A lower number generates more final elements on the
# tetrahedral mesh.


# The number of iterations used in the particle system in
# stage 6 of the pipeline. The particle system generates equally spaced
points to
# generate tetrahedra. For the tooth.nrrd le, set the variable to 500.

num_particle_iters = 500

# This variable is similar to the previous, except it applies
# to the tetrahedral models generated for all the materials combined into a
# file. The
ags available in this option are the same as the previous variable. It
# can be left as \zpAAqa10".
tetgen_joined_vol_flags = "zpAAqa10"

# Caps the number of processes used by the particle system (stage 6).

# This variable came with the orginal file for the tooth.
# It wasn't defined in "Meshing Pipeline User Guide"

Attachment: BioMesh3d_cmddotexe_error.PNG
Description: PNG image

Archive powered by MHonArc 2.6.18.

Top of page