[IGSTK-Users] [Insight-users] FW: from vtk to msh : Mising itk::Mesh with igstk::MeshObject

Luca Ramundo luca.ramundo at hotmail.it
Thu Mar 12 13:55:20 EDT 2009



No, thanks, Luis.. only for this moment I'm resolving in this way:     :-)) 

VtkPolyDataReaderType::Pointer  m_VtkPolyDataReader;
m_VtkPolyDataReader = VtkPolyDataReaderType::New();
m_VtkPolyDataReader->SetFileName( fileName);
m_VtkPolyDataReader->Update();
igstk::MeshObject::MeshType::Pointer m_Mesh = igstk::MeshObject::MeshType::New();
 MeshObjectObserver::Pointer observer = MeshObjectObserver::New();
m_Mesh= m_VtkPolyDataReader->GetOutput();
m_Mesh->AddObserver( igstk::MeshReader::MeshModifiedEvent(), observer);

now.. look at this last row.. what do you think about? Is possible use an observer in this way? 

Otherwhise do I have to use

VTK reader -> mesh object -> mesh writer (to file) -> mesh reader (from file) -> observer ??? This way is more difficult but then I can use this snippet of code:

typedef igstk::MeshReader MeshReaderType;
typedef MeshReaderType::MeshObjectType MeshObjectType;

// in the header file

igstkObserverObjectMacro( MeshObject, igstk::MeshReader::MeshModifiedEvent,
igstk::MeshObject);

MeshReaderType::Pointer m_MeshReader;
MeshObjectType::Pointer m_ToolSpatialObject;
m_MeshReader->RequestSetFileName( fileName );
m_MeshReader->RequestReadObject();
MeshObjectObserver::Pointer observer = MeshObjectObserver::New();
m_MeshReader->AddObserver( igstk::MeshReader::MeshModifiedEvent(),
observer);
m_MeshReader->RequestGetOutput();

What do you suggest me?




_________________________________________________________________
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://public.kitware.com/pipermail/igstk-users/attachments/20090312/8c3fc061/attachment-0001.html>


More information about the IGSTK-Users mailing list