[Insight-users] a vtkPolyData structure into an itk::Mesh

tony hakki tony2007vtk at yahoo.com
Sun Jan 21 05:44:01 EST 2007


hi all;
I met an interesting and strange error, I haven't solved it,please help me. I just want to use vtkPolyDataToITKMesh.cxx which is in the itk>auxilary>vtk>vtkPolyDataToITKMesh.cxx folder. When I try to modify this programme ,that line "TriangleCellType * tcell = new TriangleCellType;" gives error like that :


------ Build started: Project: nfinity, Configuration: Debug Win32 ------
1>Compiling...
1>nfinityDoc.cpp
1>c:\programme\itk\itk-src-windows\code\common\itkvertexcell.txx(205) : error C2143: syntax error : missing ';' before 'constant'
1> c:\programme\itk\itk-src-windows\code\common\itkvertexcell.txx(204) : while compiling class template member function 'bool itk::VertexCell<TCellInterface>::EvaluatePosition(double *,itk::VectorContainer<TElementIdentifier,TElement> *,double *,double [],double *,double *)'
1> with
1> [
1> TCellInterface=CellType,
1> TElementIdentifier=itk::DefaultStaticMeshTraits<vtkFloatingPointType,3,2,vtkFloatingPointType,vtkFloatingPointType>::PointIdentifier,
1> TElement=itk::Point<double,3>
1> ]
1> c:\programme\itk\itk-src-windows\code\common\itktrianglecell.h(55) : see reference to class template instantiation 'itk::VertexCell<TCellInterface>' being compiled
1> with
1> [
1> TCellInterface=CellType
1> ]
1> c:\documents and settings\aydemir\desktop\nfinity_basic\nfinity\nfinitydoc.cpp(576) : see reference to class template instantiation 'itk::TriangleCell<TCellInterface>' being compiled
1> with
1> [
1> TCellInterface=CellType
1> ]
1>c:\programme\itk\itk-src-windows\code\common\itkvertexcell.txx(205) : error C2440: '=' : cannot convert from 'itk::Point<TCoordRep,NPointDimension>' to 'int'
1> with
1> [
1> TCoordRep=double,
1> NPointDimension=3
1> ]
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>c:\programme\itk\itk-src-windows\code\common\itkvertexcell.txx(211) : error C2109: subscript requires array or pointer type
1>c:\programme\itk\itk-src-windows\code\common\itkvertexcell.txx(219) : error C2109: subscript requires array or pointer type
1>c:\programme\itk\itk-src-windows\code\common\itkvertexcell.txx(219) : error C2109: subscript requires array or pointer type
1>Build log was saved at "file://c:\Documents and Settings\aydemir\Desktop\nfinity_basic\nfinity\Win32\Debug\BuildLog.htm"
1>nfinity - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What might the wrong? Please help me
.
.
.
.
for( unsigned int t=0; t < numberOfTrianglesInStrip; t++ )
{
MeshType::CellAutoPointer c;
TriangleCellType * tcell = new TriangleCellType;  Dear ITK users this line gives error!!!!
tcell->SetPointIds( pointIds );
c.TakeOwnership( tcell );
mesh->SetCell( cellId, c );
cellId++;
pointIds[0] = pointIds[1];
pointIds[1] = pointIds[2];
pointIds[2] = cellPoints[t+3];
}


 
____________________________________________________________________________________
Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070121/5a7a972d/attachment.html


More information about the Insight-users mailing list