[IGSTK-Users] igstk MeshReader Problems

Aswin Mathews aswinjohn at gmail.com
Thu Jun 26 15:05:49 EDT 2008


Hi Sebastian,

Thanks. I had accidently defined another DEBUG constant in another one of my
libraries. That was what was causing the error on all the igstkLogMacro
statements. I figured it out about 2 hrs back.

Thanks for the help.

Aswin John.

On Thu, Jun 26, 2008 at 2:02 PM, sebastian ordas <sebastian.ordas at gmail.com>
wrote:

> 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" )
> }
>
> _______________________________________________
> IGSTK-Users mailing list
> IGSTK-Users at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20080626/3e79bd10/attachment.htm>


More information about the IGSTK-Users mailing list