Bill I use the simplex mesh class for my deformable model. Simplex mesh --> triangle mesh --> vtkpolydata and back. once of things I noticed when I was setting up my meshes is sometimes the order of points change when you rewrite them in another format and as a result the normal of each cell is pointing in the wrong direction and that will mess up the deformable model class. (i.e, the mesh becomes inside out). so my advice to you is create a simple mesh with very few points and cells and write the mesh at each stage or at least print the points and cells to make sure everything is going through your pipeline in correct order. HTH Leila On Tue, 2008-12-02 at 17:44 -0500, zod16@aol.com wrote: > Hello > I am triying to deform an itk::Mesh using itk::DeformableMesh3DFilter > and am having a problem. > If I generate my itk::Mesh using itk::SphereMeshSource then the > DeformableMesh 3DFilter runs fine. > > If I write the mesh generated by itk::SphereMeshSource to vtkPolyData > Format using itk::VTKPolyDataWriter and then read it in using > itk::VTKPolyDataReader then > the DeformableMesh3DFilter throws an exception. The exception is > due to CellDataContainer being a null pointer and the CellData being > empty. > > If i then try to assign CellData to the itk::Mesh myself by iterating > over the number of cells and using ->SetCellData, then > at some point in the running of itk::DeformableMesh3DFilter the > filter deletes the CellData and the program crashes. > > This will become important for me since i would eventually like to > take triangle meshes in .vtk format and use them as input to the > itk::DeformableMesh3DFilter. > > So my questions are: > 1) What is the CellData that is assigned when a mesh is generated > using itk::SphereMeshSource? The documentation states:" More > parameters are added to make the sphere mesh have global and local > deform ability." but > fails to explain what those parameters are and how they are > set. > > 2) Any ideas why the CellData that i manually set is being deleted > by the itk::DeformableMesh3DFilter? Even if i know the answer to 1) > and manually set the CellData, it is going to be deleted by the > itk::DeformableMesh3DFilter > Is there other data or flags being set? > > Thank you for all the work on itk and making it freely abailable and > Thank you for any help you can give me on this problem > bill > > > ______________________________________________________________________ > Tis the season to save your money! Get the new AOL Holiday Toolbar for > money saving offers and gift ideas. > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users