<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
<BR><BR>This problem has been raised a couple of times before on the list, but I can't find any solution posted. I'm getting an error with ApproximateSignedDistanceMapImageFilter of the form:<BR><BR>
itk::ExceptionObject (0012FC44)<BR>Location: "void __thiscall itk::MultiThreader::SingleMethodExecute(void)"<BR>File: .\itkMultiThreader.cxx<BR>Line: 368<BR>Description: itk::ERROR: MultiThreader(00BBD508): Exception occurred during SingleMethodExecute<BR>&nbsp;<BR>I'm using msvc2005 and ITK 3.0.1. Code is below (NB replacing ApproximateSignedDistanceMapImageFilter with<BR>SignedDanielssonDistanceMapImageFilter makes everything work ok). The volume is simply a synthetic 100x100x100 8-bit binary analyze volume with a single connected component.<BR><BR>Any clues?<BR>
&nbsp;<BR>
Thanks<BR>Derek Magee<BR><BR><FONT color=#0000ff size=2>
#include</FONT><FONT color=#000000 size=2> </FONT><FONT color=#a31515 size=2>&lt;itkImage.h&gt;<BR></FONT><FONT color=#0000ff size=2>
#include</FONT><FONT color=#000000 size=2> </FONT><FONT color=#a31515 size=2>&lt;itkImageFileReader.h&gt;</FONT><FONT color=#a31515 size=2><BR></FONT><FONT color=#0000ff size=2>
#include</FONT><FONT color=#000000 size=2> </FONT><FONT color=#a31515 size=2>&lt;itkSmartPointer.h&gt;<BR></FONT><FONT color=#0000ff size=2>
#include</FONT><FONT color=#000000 size=2> </FONT><FONT color=#a31515 size=2>&lt;itkApproximateSignedDistanceMapImageFilter.h&gt;<BR></FONT><FONT color=#0000ff size=2>
#include</FONT><FONT color=#000000 size=2> </FONT><FONT color=#a31515 size=2>&lt;itkSignedDanielssonDistanceMapImageFilter.h&gt;</FONT><BR><FONT color=#0000ff size=2>
#include</FONT><FONT color=#000000 size=2> </FONT><FONT color=#a31515 size=2>&lt;iostream&gt;<BR></FONT><FONT color=#0000ff size=2>
using</FONT><FONT color=#000000 size=2> </FONT><FONT color=#0000ff size=2>namespace</FONT><FONT size=2><FONT color=#000000> std;</FONT><BR>
</FONT><BR>typedef itk::Image&lt; unsigned char, 3&gt; SGInputImageType ;<BR>typedef itk::ImageFileReader&lt; SGInputImageType&gt; SGImgReaderType ;<BR>typedef itk::Image&lt; float, 3&gt; SGDTImageType ;<BR>typedef itk::ApproximateSignedDistanceMapImageFilter DTFilter ;<BR>//typedef itk::SignedDanielssonDistanceMapImageFilter DTFilter ;<BR>&nbsp;<BR>SGImgReaderType::Pointer reader = SGImgReaderType::New() ;<BR>reader-&gt;SetFileName( argv[1] ) ; // This is a 100x100x100 8-bit binary analyze volume<BR>
try{<BR>&nbsp;&nbsp;&nbsp; reader-&gt;Update() ;<BR>}<BR>catch( itk::ExceptionObject &amp; err ){<BR>&nbsp;&nbsp;&nbsp; cerr &lt;&lt; "Error reading file" &lt;&lt; endl ;<BR>return -1 ;<BR>}<BR>cerr &lt;&lt; "Read file OK" &lt;&lt; endl ; // File is read ok, as this is printed<BR><BR>DTFilter::Pointer dt_obj= DTFilter::New() ;<BR>&nbsp;<BR>dt_obj-&gt;SetInput(reader-&gt;GetOutput()) ;<BR>dt_obj-&gt;SetInsideValue(255);<BR>dt_obj-&gt;SetOutsideValue(0);<BR>&nbsp;<BR>try{<BR>dt_obj-&gt;Update() ;<BR>}<BR>catch( itk::ExceptionObject &amp; err ){<BR>cerr &lt;&lt; "Error calculating distance transform: " &lt;&lt; err &lt;&lt; endl ;<BR>return -1;<BR>}<BR>cerr &lt;&lt; "Done calculating distance transform" &lt;&lt; endl ;<BR><BR><br /><hr />Messenger on the move. <a href='http://mobile.uk.msn.com/pc/messenger.aspx ' target='_new'>Text MSN to 63463 now!</a></body>
</html>