Post New Message


Name:Jan Valdman
Email
Institution:UTIA Prague
Message:
Hi,

can I take a cube [-1,1] x [-1,1] x [-1,1], subtract a smaller cube [0,1] x [0,1] x [0,1] from it and create a volume mesh for the remaining geometry? It there any simple construction to obtain it?

Many thanks and best wishes, Jan Valdman


Time:: Thu Jun 23 2016 06:26:47 GMT+0200 (Central Europe Daylight Time)</timestamp>

Name:Hamza
Email
Institution:Missouri S&T
Message:
I downloaded Iso2Mesh, but have been able to locate the registration example of metch. Moreover, I wanted to know the procedure to start the GUI of metch.
Time:: Thu Jan 07 2016 20:04:23 GMT-0600 (Central Standard Time)</timestamp>

Name:h agh
Email
Institution:
Message:
Hi, I found your website recently, the toolbox is really helpful and amazing.

I created a spherical volumetric mesh: [node,face,elem]=meshasphere([0,0,0],80,3,20); How can I find out, which nodes exactly belong to the exterior layer of the volume? In other word, I want to divide the nodes into two groups: external and internal.

Thank you.


Time:: Thu Jun 25 2015 18:05:32 GMT-0500 (Central Daylight Time)</timestamp>

Name:Efrat
Email
Institution:WiseImage
Message:
Hello

I am using iso2mesh for meshing T1 weighted MRI.

The problem is I get too many elements (~3.5 milion elements)

I would like to reduce it to 300,000

I am using v2m but changing the size of the element and max vol doesn't change the number of elements.

Where can I control this important factor?

Thanks, Efrat


Time:: Tue May 12 2015 22:43:39 GMT+0300 (Jerusalem Daylight Time)</timestamp>

Name:Hind
Email
Institution:
Message:
Hi Qianqian,

I have some issues with surfboolean function, actually i generated nodes, faces and elems from 2 stl files then i tried to merge these stl with surfboolean, but i couldn't because i have this error :

Error using surfboolean (line 122) surface boolean command failed: cd "C:\Users\user\AppData\Local\Temp\iso2mesh-user\" && "C:\Users\user\Desktop\STLRead\iso2mesh\bin\gtsset.exe" diff "C:\Users\user\AppData\Local\Temp\iso2mesh-user\pre_surfbool1.gts" "C:\Users\user\AppData\Local\Temp\iso2mesh-user\pre_surfbool2.gts" -v > "C:\Users\user\AppData\Local\Temp\iso2mesh-user\post_surfbool.off" ERROR: (gtsset.exe:11320): Gts-examples-WARNING **: cannot set locale to POSIX set: surface `C:\Users\user\AppData\Local\Temp\iso2mesh-user\pre_surfbool1.gts' is not an orientable manifold

Can you help me please ?

Thank you, you've done a great work !


Time:: Sat Nov 29 2014 01:00:58 GMT+0100</timestamp>

Name:NIKHIL SASIDHARAN PILLAI
Email
Institution:University at Buffalo
Message:
Hi I have matlab code for generating meshed image from mri scan files of brain, i used iso2mesh to generate that image,i want to import it into ansys or abaqus so that i could do a better meshing. So how can i import it into ansys/abaqus. thanks Nikhil
Time:: Tue Nov 25 2014 17:32:19 GMT-0500 (Eastern Standard Time)</timestamp>

Name:Robert Hommes
Email
Institution:MGH
Message:
Hi,

I have a question regarding the meshing of a volume metric image, but also a little more general about the node numbering. I use iso2mesh to mesh a dicom file that i have imported about a small cube in a large cube (looks like demo_refine_spherebox_mesh). I made the dicom example file with Plastimatch. When I try to implement the material property of cell swelling in the meshed system I get a lot of errors from FEBio (v2.0.1) stating:

                                        • E R R O R ****************************
Negative jacobian detected at integration point 1 of element 1537 Jacobian = -5.13534e+010 Did you use the right node numbering? Nodes:2588,2018,2014,388
. . .
                                        • E R R O R ****************************
 Found 450 initially inverted elements.
 Run will be aborted.

As you see this makes the system crash, I did the same with implementing cell growth in the spherebox_mesh system and it also gave these errors. Does anybody have a idea why the mesh has so many defaults? I did some looking at where the wrong elements are and they are always in the inner (cube/sphere) of the system. Is this a bug that the node numbering of a certain inner object is other then the normal numbering?


Time:: Tue Oct 28 2014 14:32:30 GMT-0400 (Eastern Daylight Time)</timestamp>

Name:Josje van Houwelingen
Email
Institution:University of Technology, Eindhoven
Message:
First of all many thanks for this Matlab code and all related work. This is the first program that seems to work, after trying out lots of things. I need to remesh a 3D model of a hand, for the use in a simulation, the mesh must be triangular and uniform. This seems to work quit well, there is just one mistake in the resultating mesh. At one position in the mesh the cells are much and much smaller. (I would like to add a photo, but don't know how...) How to solve this?

Thank you in advance.


Time:: Thu Aug 07 2014 14:25:06 GMT+0200 (W. Europe Daylight Time)</timestamp>

Name:DaiTao
Email
Institution:CUMT
Message:
Dear Doctor Fang: I have downlaoded your amazing work and the demo script woked very well.Because I didn't got any sense about 3d reconstuction before and a *.stl file is needed in my study, before a further study on it, i want to know if the result model that the iso2mesh generated can save as a *.stl file. And i wonder if there is some kind of user's guide documents about iso2mesh for the freshman. Best regards. Dai


Time:: Tue Oct 15 2013 10:40:05 GMT+0800 (中国标准时间)</timestamp>

Name:Qianqian Fang
Email
Institution:
Message:
`strel' is part of matlab image processing toolbox, and is not part of the standard installation. Unfortunately, this function is not implemented for Octave, therefore, you can not run this demo.
Time:: Tue Nov 15 2011 23:27:44 GMT-0500 (EST)</timestamp>

Name:Stephen Recchia
Email
Institution:Rutgers
Message:
Thank you that worked great. I have checked most of the demos and they work except I get an error with demo_vol2mesh_ex3.m. error: `strel' undefined near line 22 column 24 error: evaluating argument list element number 2 error: called from: error: C:\Users\Steve\Downloads\iso2mesh\fillholes3d.m at line 22, column 10 error: C:\Users\Steve\Documents\oct_work\isomesh\iso2mesh\sample\demo_vol2mesh_ex3.m at line 23, column 9

when I start octave I get these warnings. warning: C:\Octave\Octave3.4.3_gcc4.5.2\share\octave\packages\integration-1.0.7\PKG_ADD: possible Matlab-style short-circuit operator at line 9, column 32 io PKG_ADD: java classes has been found and added in C:\Octave\Octave3.4.3_gcc4.5.2\bin io PKG_ADD: run chk_spreadsheet_support([],3) to view io support warning: gmsh does not seem to be present some functionalities will be disabled warning: dx does not seem to be present some functionalities will be disabled warning: function C:\Octave\Octave3.4.3_gcc4.5.2\share\octave\packages\statistics-1.0.10\fstat.m shadows a core library function.

Any suggestions?

Thanks again for your help with octave. -Steve


Time:: Tue Nov 15 2011 19:15:18 GMT-0500 (Eastern Standard Time)</timestamp>

Name:Qianqian Fang
Email
Institution:
Message:
hi Steve

 I'm currently running the demos but when I go to plot the mesh I get a figure 
 that looks completely flat and I can't rotate it. Is this a gnu plot error 
 or something that I'm doing wrong?

plotting meshes in octave is a pain. I strongly recommend you upgrading your octave to 3.4 or newer to use the FLTK graphics backend. You need to run

  graphics_toolkit('fltk');

at the beginning of your session. With fltk, mesh plotting is much faster and nicer. (I only tried it on Linux, not sure if it works on Windows).

Qianqian


Time:: Tue Nov 15 2011 10:37:00 GMT-0500 (EST)</timestamp>

Name:Stephen Recchia
Email
Institution:Rutgers Universty
Message:
Hi,

I just downloaded octave with all the available packages and the iso2mesh toolbox. I'm currently running the demos but when I go to plot the mesh I get a figure that looks completely flat and I can't rotate it. Is this a gnu plot error or something that I'm doing wrong?

-Steve


Time:: Mon Nov 14 2011 21:46:48 GMT-0500 (Eastern Standard Time)</timestamp>

Name:Du Xinlong
Email
Institution:SWPU, China
Message:
hi Qianqian

1. The example i mean is not the demo_surf2mesh_ex1.m, please open

     (i don't konw how to upload photos)
2. i tried binsurface(),but it created a bad surface which looked different from the images i inputed, i don't know why?

if you want, i can give you a email attached the images


Time:: Sat Oct 15 16:06:50 UTC+0800 2011</timestamp>

Name:Qianqian Fang
Email
Institution:MGH
Message:
hi Xinlong

the example is already included in iso2mesh. You can find it in sample/demo_surf2mesh_ex1.m

The requirement for this to work is your input surface mesh must be an open surface, with the edges aligned inside the bounding box faces. In the past, I used binsurface() to extract such surfaces, and meshresample() to make it coarser.

Qianqian


Time:: Fri Oct 14 2011 12:28:45 GMT-0400 (EDT)</timestamp>

Name:Du Xinlong
Email
Institution:SWPU, China
Message:
Hi Qianqian thank you for your reply. now i have a problem about bounding box. i can't and a bounding box, because i have internal interfaces intersecting the bounding box. i find someone else also have the same question in the FAQs. your 3D vessel structures case is similar with my work,so could you show me your code and data of this case!

thank you


Time:: Fri Oct 14 22:35:34 UTC+0800 2011</timestamp>

Name:Qianqian Fang
Email
Institution:
Message:
hi Xinlong

see my replies below:

 1 how to calculate the area of the surface triangles I selected? 

use elemvolume(). if your elem has 3 columns, it will return the area instead of volume.

 2 Is there any function to get the normal vector of the surface triangles,to save surface mesh as *.stl,need this information。

iso2mesh doesn't have this function, but another toolbox of mine, metch, does include this, see the source code

hope this helps.

Qianqian


Time:: Mon Oct 03 2011 11:27:30 GMT-0400 (EDT)</timestamp>

Name:Du Xinlong
Email
Institution:SWPU, China
Message:
Doctor Fang: 1 how to calculate the area of the surface triangles I selected? 2 Is there any function to get the normal vector of the surface triangles,to save surface mesh as *.stl,need this information。

thank you


Time:: Mon Oct 03 2011 10:13:29 GMT+0800 (LONT)</timestamp>

Name:Qianqian Fang
Email
Institution:
Message:
hi Stefan

For your first question, my answer has two parts, part 1: my recommended way to do it, and part 2: why you got the error.

Part 1. Iso2mesh inherites the mesh-quality-based termination criteria from CGAL and tetgen and is capable of generating feature-adaptive meshes without explicitly setting mesh sizes, unless you want to do it manually. For v2m and v2s, the input parameter opt has two fields to control the mesh sizes relative o the features: opt.radbound and opt.distbound. The first one controls the overall size of the surface triangles, the second one controls the adaptivity to small and sharp features. You can compare the meshes on slides 14 and 15 in a presentation of mine to see the effect. The demo script can be found in the iso2mesh/sample folder.

Part 2. The error you have encountered is indeed a bug from tetgen. I had seen the same error when running sample/demo_refine_spherebox_mesh.m on a 64bit Ubuntu box. It worked OK on a 64bit CentOS 5.x and 32bit Ubuntu/CentOS. I traced the error to a subroutine in tetgen's source code and reported it back to Hang Si, the author of tetgen, but nothing has happened since. If you want to continue your approach, please try a different machine and you may get around this issue.

For the second question, it depends on how bad do the spikes look. If the spikes are huge, and the mesh is messed up, then you must have used the extra label column in the surface when you call smoothsurf/sms/meshconn. If your face array has 4 columns, only use the first 3 columns for mesh smoothing. If the spikes are small, and only appears around some small & sharp features, they are results of Laplacian-like smoothing. You can try using the 'lowpass' option. It works similarly to 'laplacianhc', and both are better than 'laplacian'. Reducing smoothing iteration number will also help.

Let me know if this helps. I am CCing your email and iso2mesh-users mailing list to achieve this Q&A. I hope you don't mind.

Qianqian


Time:: Tue May 10 2011 14:26:13 GMT-0400 (EDT)</timestamp>

Name:Stefan Jagsch
Email
Institution:
Message:
Hello Qianqian,

I am currently working on meshing a nanoporous goldstructure (like this: ) that hes been reproduced from cross-sectional images, giving me a volumetric binary image. I am trying to implement an adaptive meshing algorithm that places additional nodes in the narrow ligament regions where I want to refine the mesh using the surf2mesh refining option. Placing the nodes is already working, but when I try to also set the local mesh density (edge size) I get the following error:

creating volumetric mesh from a surface mesh ... Opening /tmp/iso2mesh-comsol/post_vmesh.poly. Opening /tmp/iso2mesh-comsol/post_vmesh.mtr. Opening /tmp/iso2mesh-comsol/post_vmesh.b.node. File I/O Error: Cannot access file /tmp/iso2mesh-comsol/post_vmesh.b.node. Constructing Delaunay tetrahedralization. Delaunay seconds: 0.73 Duplicating background mesh. Internalerror in findedge(): Unable to find an edge in subface.

  Please report this bug to sihang<at>mail.berlios.de. Include the
    message above, your input data set, and the exact command
    line you used to run this program, thank you.
volume mesh generation is complete Finished meshing.

and the mesh is not refined. Any idea why this happens?

A second problem that I have is the following: Once meshed the model has some steps on the surface, which I guess is a relict of the layered images I use for the reconstruction, but is bad for the finite element analysis I want to carry out later. To improve the model I thought of using the smoothsurf function. But when I do so there appear spikes on the surface. How can I get rid of them (or why do they show up)?

kind regards, Stefan Jagsch


Time:: Tue May 10 2011 16:54:07 GMT+0200 (CEST)</timestamp>

Name:Qianqian Fang
Email
Institution:
Message:
hi Andrea

there is a function called "savedxf" source code which can export a surface to the DXF format, which can be imported by autodesk products. However, this was only tested with an open-source modeling software, Blender. I am not sure if this works fine with AutoCAD etc. Please give it a try and let me know.

Qianqian


Time:: Thu Oct 21 2010 13:22:05 GMT-0400 (EST)</timestamp>

Name:Andrea Ferrero
Email
Institution:University of California, Davis
Message:
Hi Qianqian,

thanks for the heads up. My problem is how to export those surfaces, after I computed them, into a format readable by a 3D design software like AutoDesk. I computed the surfaces and they look like what I wanted, but now I need to export it from Matlaband this is the step I am still missing. I couldn't find any reference in the documentation that addressed it, though I believe it must be trivial.

Thanks for the quick reply.

Andrea


Time:: Wed Oct 20 2010 20:50:58 GMT-0700 (PST)</timestamp>

Name:Qianqian Fang
Email
Institution:
Message:
hi Andrea

yes, iso2mesh does produce surfaces. Please check out the Doc/Workflow page to find out the general workflow. Typically, you should use v2s to extract surfaces from a volumetric image. Sometimes, you can also use v2m to produce surfaces too. Please also read my slides to find out other utilities, including surface smoothing, upsampling/downsampling etc.

Qianqian


Time:: Mon Oct 18 2010 21:45:55 GMT-0400 (EST)</timestamp>

Name:Andrea Ferrero
Email
Institution:University of California, Davis
Message:
HI guys,

I just discovered iso2mesh today and it looks a great tool for a research project I am working on, where I need to take a 3D CT image and convert it into a solid mold with AutoDesk. It is not clear to me though how I save the mesh after I run the vol2mesh script on my 3D image data. I am interested into the surface only of my object, to create a mold that is empty inside and full outside. Do I save the face variable? if so how?

Thank you very much for the attention,

Andrea


Time:: Mon Oct 18 2010 17:24:37 GMT-0700 (PST)</timestamp>

Name:Qianqian Fang
Email
Institution:
Message:
hi Sanket

For the maxvol parameter, please see this page for details. It simply sets the maximum volume of all the elements. All of your input surface nodes will be preserved in the final volumetric mesh. It will add new nodes on the surface or volume to ensure the quality constraint.

Qianqian


Time:: Tue Jul 27 2010 18:42:02 GMT-0400 (EST)</timestamp>

Name:Sanket Jain
Email
Institution:
Message:
Thank you Dr. Fang for your reply. On looking again, I realised the fresurfer surface mesh are pretty dense. I might end up using only 30-40% of the total mesh points as you suggested. Instead of using the meshresample, I tried the surf2mesh command with keepratio of 0.3/0.4 and the mesh was successfully created. I believe this function calls the meshresample function. But still, I had one question about surf2mesh function.

As I decreased the maxvol parameter, I got mesh with smaller elements. Not really surprised with that but, is there any units associated with that parameter? Is there any way to calculate the optimum maxvol based on the size of the geometry to be meshed?

Also, I will revisit meshing after I complete my current projects. I was looking for a meshing tools for future use and I think I found one :) Thank You for all your inputs.


Time:: Tue Jul 27 2010 15:47:59 GMT-0500 (CST)</timestamp>

Name:Qianqian Fang
Email
Institution:
Message:
hi Sanket

do a "help remeshsurf" see the possible options. For simplicity, you can set opt as a scalar, which will be the desired maximum element diameter of the resulting mesh; in that case, the grid-size will be set to opt/4 automatically.

Please do a meshresample first to reduce the mesh density and then do a remeshsurf; this can save a lot of memory for you.

By the way, do you have to keep the original surface more than 50%? FreeSurfer produces very dense surface mesh, for me, I usually keep only 5~10% of the elements. If you have a very dense surface mesh, tetgen will take a long time to make tetrahedral mesh.

You can also try MeshLab to manually select and correct these bad elements in the original mesh, but generally speaking, this is pretty difficult. I've chatted with the FreeSurfer developers in our building, but at this point, there is nothing we can do about it.


Time:: Tue Jul 27 2010 13:03:21 GMT-0400 (EST)</timestamp>

Name:Sanket Jain
Email
Institution:
Message:
What is the opt structure in remeshsurf function? I am not sure what the values for its opt.gridsize and others would be in my case. Is there any way I use the same gridsize and elemsize as my original surface mesh? or Does it nullify the whole objective of performing the resurfmehs.
Time:: Tue Jul 27 2010 10:45:21 GMT-0500 (Central Daylight Time)</timestamp>

Name:FangQ
Email
Institution:
Message:
hi Sanket

this the most frequently encountered error with iso2mesh (or tetgen). It is very likely that your original mesh contains self-intersecting elements, and mesh simplification (decimation) usually won't fix it (If you are using FreeSurfer, the pial surface it produced usually have this type of issue).

There is a work-around, but you might have to play with the options to get it to work. Please look into the sample script sample/demo_remesh_surface.m. It calls a function named remeshsurf in the toolbox. What this function does is to first convert a closed surface into a binary image, and then re-extract a surface from the volume, and the extraction script guarantees that the produced mesh is self-intersection free.

If your mesh is complex, you may have to use a large volume to re-voxelize your surface. Give it a try and let me know if it works.

Qianqian


Time:: Mon Jul 26 2010 19:54:04 GMT-0400 (EST)</timestamp>

Name:Sanket Jain
Email
Institution:Medical College of Wisconsin
Message:
I used a cortical surface and created a volumetric mesh using the surf2mesh function. If I use the keepratio value <=0.5; the mesher works really well. But if I use the keepratio value>0.5, I get the following message.

Error: Invalid PLC.

  Two subfaces (17561, 18027, 83603) and (83474, 83572, 18027) 
  are found intersecting each other. 
  Hint:  Use -d switch to find all intersecting facets. 
volume mesh generation is complete

I am not sure the reason for this message and also if there is any potential work around it.

Thanks, Sanket


Time:: Mon Jul 26 2010 16:05:00 GMT-0500 (Central Daylight Time)</timestamp>

Name:Qianqian Fang
Email

Name:Edouard Oudet
Email
Powered by Habitat