[Insight-users] from vtk to msh
Luca Ramundo
luca.ramundo at hotmail.it
Thu Mar 12 11:00:18 EDT 2009
Hi everybody..
i'm writing code to convert vtk file in msh file.. this is my snippet of code:
#include <itkVTKPolyDataReader.h>
...
typedef igstk::MeshObject MeshObjectType;
typedef MeshObjectType::MeshType MeshType;
typedef ::itk::VTKPolyDataReader< MeshType > VtkPolyDataReaderType;
...
VtkPolyDataReaderType::Pointer m_VtkPolyDataReader;
m_VtkPolyDataReader = VtkPolyDataReaderType::New();
m_VtkPolyDataReader->SetFileName( fileName);
m_VtkPolyDataReader->Update();
MeshType::Pointer m_Mesh;
m_Mesh= m_VtkPolyDataReader->GetOutput();
MeshObjectObserver::Pointer observer = MeshObjectObserver::New();
m_Mesh->AddObserver( igstk::MeshReader::MeshModifiedEvent(), observer);
but id doesn't work.. i receive an error on this row:
m_Mesh= m_VtkPolyDataReader->GetOutput();
error C2679: binary '=' : no operator found which takes a right-hand operand of type 'itk::Mesh *' (or there is no acceptable conversion)
with
[
TPixelType=float,
VDimension=3,
TMeshTraits=igstk::MeshObject::MeshTrait
]
c:\users\luca\documents\progettotesi\src\insighttoolkit\code\common\itkSmartPointer.h(112): could be 'itk::SmartPointer &itk::SmartPointer::operator =(const itk::SmartPointer &)'
with
[
TObjectType=igstk::MeshObject::Self
]
c:\users\luca\documents\progettotesi\src\insighttoolkit\code\common\itkSmartPointer.h(116): or 'itk::SmartPointer &itk::SmartPointer::operator =(igstk::MeshObject *)'
with
[
TObjectType=igstk::MeshObject::Self
]
while trying to match the argument list '(igstk::MeshObject::Pointer, itk::Mesh *)'
with
[
TPixelType=float,
VDimension=3,
TMeshTraits=igstk::MeshObject::MeshTrait
]
Who can help me, please?
La tua immagine personale dinamica per Messenger? Creala gratis con Avatar Studio!
_________________________________________________________________
25 GB di spazio gratis online: attiva SkyDrive!
http://clk.atdmt.com/GBL/go/136430529/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090312/7dcff786/attachment.htm>
More information about the Insight-users
mailing list