[Insight-users] itkTriangleMeshToImageBinaryFilter error
Guillaume CAZOULAT
guillaume.cazoulat at wanadoo.fr
Mon Oct 27 14:06:25 EDT 2008
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<double, 3, 3,double,double> TriangleMeshTraits;
typedef itk::Mesh<double,3, TriangleMeshTraits> TriangleMeshType;
itk::TriangleMeshToBinaryImageFilter<TriangleMeshType, ImageType>::Pointer filter =
itk::TriangleMeshToBinaryImageFilter<TriangleMeshType, ImageType>::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
More information about the Insight-users
mailing list