[IGSTK-Users] igstk MeshReader Problems
sebastian ordas
sebastian.ordas at gmail.com
Thu Jun 26 15:02:38 EDT 2008
Hi Aswin, try something like this.
best regards,
sebastian
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();
if(!observer->GotMeshObject())
{
igstkLogMacro( DEBUG, "Could not read mesh spatial object\n" )
igstkLogMacro2( m_Logger, DEBUG, "Could not read mesh spatial object\n" )
return;
}
m_ToolSpatialObject = observer->GetMeshObject();
if (m_ToolSpatialObject.IsNull())
{
igstkLogMacro( DEBUG, "Could not read mesh spatial object\n" )
igstkLogMacro2( m_Logger, DEBUG, "Could not read mesh spatial object\n" )
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20080626/9c8a13b9/attachment-0001.html>
More information about the IGSTK-Users
mailing list