[Insight-users] Which types of meshes canDeformableModelSimplexMesh load?

Leila baghdadi baghdadi at sickkids.ca
Wed Oct 19 10:45:55 EDT 2005


Hello Marcus,

It is amazing what happens when you leave town for a few days!

I am just checking out a fresh cvs copy of InsightApplications to make
sure all that I told you is there, if not I will check them in and let
you know soon,

in any case, I can tell you two things,

1. as you know DeformableModelSimplexMesh uses vtkMarchingCubes which
creatse a huge number of triangles that creates a mesh which makes the
whole program really really slow. Also, as you know the triangle mesh
has to be converted to simplex mesh and if you read through the
reference and see how a simplex cell is created from a triangle cell you
see that the number of points will be "doubled" i.e, triangle mesh with
1000 points results in simplex mesh with 2000 points
so because of the above two reasons I decided to use vtkDecimate to
reduce the number of points in the mesh so as to make the program
usable, so that is why vtkDecimate is there,

2. I suggest you use vtk44 with this as vtkDecimate has significantly
changed in vtk5 and I have not got around to figure out how it works and
what changes need to be done to DeformableModelSimplexMesh

I will make sure the test file is there so you can load and see how it
works


HTH

Leila
On Wed, 2005-10-19 at 14:50 +0200, Marcus Wallin wrote:
> I have, since my previous mail, done some more testing and realised that my
> mesh did not consist of raw images with binary colors (i.e either black or
> white). 
> 
> I've converted my mesh into a truly binary format, which I believe is
> correct, but when I try to load my mesh (which now consists of a mesh.mhd
> and a series of raw images representing a segmented organ in binary format)
> I get an error and the program exits.
> 
> I've pinpointed the error to the file DeformableModelApplication.cxx: row
> 374 where the following call is made
> 
>    m_SimplexMeshViewer.SetSimplexMesh(vgrid);
> 
> Before exiting, the DeformableModelSimplexMesh application prints out these
> numbers in the console
> 
>   Number of points = 1483
>   Number of cells = 2962
>   simplex Number of Points = 2962
>   simplex Number of Points = 5926
> 
> which I assume means that a mesh was indeed created from the loaded images.
> 
> Can anyone give a hint as to why this error occurs?
> 
> Since I get this error, I cannot be certain whether my mesh is correct or
> not with respect to all the parameters to set in the mesh.mhd header file.
> Therefore it would be great if I could try the application with a
> known-to-be-valid 3D-image/3D-mesh. Is there such testing data, and where
> can this be found?
> 
> In a previous posting, regarding DeformableModelSimplexMesh, Leila Baghdadi
> mentions "I believe I do have a little test file as well". Where can this
> test file be found?
> 
> Thanks,
> 
> --
> Marcus Wallin
> Software Engineer
> Chalmers University of Technology, Sweden
> 
> 
> 
> >>Thank you for your answers!
> 
> >>I hadn't realized that I used an old version of ITKApplications (v2.0.1).
> >>Now I have the most recent ITKApp from CVS (since I had compile problems
> >>with 2.2.0) and have also got your help document.
> 
> >>I followed your suggestion and created two 3D-images with a *.mhd header
> >>file that points to a list of *.raw files that are the actual images
> (binary
> >>mask of the mesh and the actual patient images). However, when I follow
> the
> >>step-by-step guide and reach the step where the mesh is loaded, the
> program
> >>tells me the following errors:
> 
> >>"ERROR: In \VTK-4.4-LatestRelease\src\Graphics\vtkDecimatePro.cxx, line
> 148
> >>vtkDecimatePro (046BE708): No data to decimate!"
> 
> >>and
> 
> >>"No points in grid"
> 
> >>Can you please suggest to me what the error might be?
> 
> >>I suspect that the error is in my "mesh.mhd", though I have no idea what
> it
> >>can be.
> 
> 
> >>The contents of my "mesh.mhd" is:
> 
> >>NDims = 3
> >>DimSize = 256 256 78
> >>ElementSpacing = 1 1 1
> >>Position = 0 0 0
> >>ElementByteOrderMSB = False
> >>ElementNumberOfChannels = 3
> >>ElementType = MET_UCHAR
> >>ElementDataFile = mesh.%04d.raw 0 77 1
> 
> >>Thanks,
> 
> >>--
> >>Marcus Wallin
> >>Software Engineer
> >>Chalmers University of Technology, Sweden
> 
> 
> 
> 
> -----Ursprungligt meddelande-----
> >>>Fren: Leila baghdadi [mailto:baghdadi at sickkids.ca] 
> >>>Skickat: den 14 oktober 2005 17:21
> >>>Till: Marcus Wallin
> >>>Kopia: insight-users at itk.org
> >>>Dmne: Re: [Insight-users] Which types of meshes
> >>>canDeformableModelSimplexMesh load?
> 
> >>>Marcus,
> 
> >>>I setup a little help document which you should be able to load and get
> >>>the information you require, but it is probably not as comprehensive as
> >>>one would hope mainly due to lack of time.
> 
> >>>1. currently, there is no support for loading an actual mesh to this
> >>>program although it is in my to do list,
> 
> >>>2. you can read a binary image which is then sent to vtk marching cubes
> >>>filter to create a mesh so that is why itkImageFileReader is used
> >>>because you are supposed to read an image (not a mesh)
> 
> >>>3. you can load your image (i.e, MR or which modality) and then try to
> >>>load your mesh over it (i.e, read the binary image which represents your
> >>>initial model of the mesh)
> 
> >>>4. right now you can load a 3d image (check the itk documentation and I
> >>>believe I do have a little test file as well), your image should have
> >>>two components,
> >>>  -- *.mhd (text file , header containing the name of the raw image)
> >>>  -- *.raw
> 
> >>>5. I suggest you read through the references that help provides and make
> >>>sure you are familiar with the concept of simplex meshes and their
> >>>corresponding deformable models which was originally introduced by
> >>>Herve Delingette of INRIA, France.
> 
> >>>Please let me know of any problems,
> 
> >>>enjoy ITK!
> 
> >>>Leila
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
-- 
Leila baghdadi <baghdadi at sickkids.ca>



More information about the Insight-users mailing list