Hi Sebastian,<br><br>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. <br><br>
Thanks for the help.<br><br>Aswin John.<br><br><div class="gmail_quote">On Thu, Jun 26, 2008 at 2:02 PM, sebastian ordas <<a href="mailto:sebastian.ordas@gmail.com">sebastian.ordas@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<font size="2">
<div>Hi Aswin, try something like this.</div>
<div> </div>
<div>best regards,</div>
<div>sebastian</div>
<div><font size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2">
<p> </p>
<p>typedef</p></font></font><font size="2"> igstk::MeshReader MeshReaderType;</font><font size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2">
<p>typedef</p></font></font><font size="2"> MeshReaderType::MeshObjectType MeshObjectType;</font><font size="2"><font size="2">
<p>// in the header file</p>
<p>igstkObserverObjectMacro( MeshObject, igstk::MeshReader::MeshModifiedEvent, igstk::MeshObject);</p></font></font></font>
<p>MeshReaderType::Pointer m_MeshReader;</p></font></div>
<div><font size="2">
<p>MeshObjectType::Pointer m_ToolSpatialObject;</p></font></div>
<div> </div>
<div>m_MeshReader->RequestSetFileName( fileName );</div>
<div> </div>
<div>m_MeshReader->RequestReadObject();</div>
<p>MeshObjectObserver::Pointer observer = MeshObjectObserver::New();</p>
<p>m_MeshReader->AddObserver( igstk::MeshReader::MeshModifiedEvent(), observer);</p>
<p>m_MeshReader->RequestGetOutput();</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">if</font></font><font size="2">(!observer->GotMeshObject())
<p>{</p>
<p>igstkLogMacro( DEBUG, </p></font><font color="#a31515" size="2"><font color="#a31515" size="2">"Could not read mesh spatial object\n"</font></font><font size="2"> )
<p>igstkLogMacro2( m_Logger, DEBUG, </p></font><font color="#a31515" size="2"><font color="#a31515" size="2">"Could not read mesh spatial object\n"</font></font><font size="2"> )
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">return</font></font><font size="2">;
<p>}</p>
<p>m_ToolSpatialObject = observer->GetMeshObject();</p>
<p></p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">if</font></font><font size="2"> (m_ToolSpatialObject.IsNull())
<p>{</p>
<p>igstkLogMacro( DEBUG, </p></font><font color="#a31515" size="2"><font color="#a31515" size="2">"Could not read mesh spatial object\n"</font></font><font size="2"> )
<div>igstkLogMacro2( m_Logger, DEBUG, </div></font><font color="#a31515" size="2"><font color="#a31515" size="2">"Could not read mesh spatial object\n"</font></font><font size="2"> ) </font>
<div> </div>
<div>}<font size="2"></font></div>
<br>_______________________________________________<br>
IGSTK-Users mailing list<br>
<a href="mailto:IGSTK-Users@public.kitware.com">IGSTK-Users@public.kitware.com</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users</a><br></blockquote></div><br>