Guillaume, I rechecked the code with the recent modifications and can not see the problem you are reporting. can you run the test examples Testing/Code/BasicFilters/itkTriangleMeshToBinaryImageFilterTest.cxx Testing/Code/BasicFilters/itkTriangleMeshToBinaryImageFilterTest2.cxx one thing I suggest is to make sure that the image is big enough that it can cover the mesh. Leila On Mon, 2008-10-27 at 19:06 +0100, Guillaume CAZOULAT wrote: > Hi! > > I had no problem to compile (gcc-4.2) and execute the following code with itk 3.2: > > typedef float PixelType; > const unsigned int Dimension = 3; > > vtkPolyDataToitkMesh* converter = new vtkPolyDataToitkMesh; > converter->SetInput(input); > > typedef itk::Image< unsigned short, 3 > ImageType; > ImageType::SizeType size; > size[0] = Dim[0]; > size[1] = Dim[1]; > size[2] = Dim[2]; > ImageType::IndexType start; > start[0] = 0; > start[1] = 0; > start[2] = 0; > > typedef itk::DefaultDynamicMeshTraits TriangleMeshTraits; > typedef itk::Mesh TriangleMeshType; > > itk::TriangleMeshToBinaryImageFilter::Pointer filter = > itk::TriangleMeshToBinaryImageFilter::New(); > filter->SetInput(converter->GetOutput()); > filter->SetOrigin(Origin); > filter->SetSpacing(Spacing); > filter->SetSize(size); > filter->SetTolerance(0.0); > filter->UpdateOutputInformation(); > filter->Update(); > > > but since I updated to 3.8 the following error occurs at execution : > > terminate called after throwing an instance of 'itk::ExceptionObject' > what(): /usr/local/include/InsightToolkit/BasicFilters/itkTriangleMeshToBinaryImageFilter.txx:484: > itk::ERROR: TriangleMeshToBinaryImageFilter(0x35e76b0): Point with id 12884901889 does not exist in the new pointset > Aborted > > Would you know how to solve the problem? > > Thanks > > Guillaume > > _______________________________________________ > Insight-users mailing list > Insight-users@itk.org > http://www.itk.org/mailman/listinfo/insight-users