<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> <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>
<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><itkImage.h><BR></FONT><FONT color=#0000ff size=2>
#include</FONT><FONT color=#000000 size=2> </FONT><FONT color=#a31515 size=2><itkImageFileReader.h></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><itkSmartPointer.h><BR></FONT><FONT color=#0000ff size=2>
#include</FONT><FONT color=#000000 size=2> </FONT><FONT color=#a31515 size=2><itkApproximateSignedDistanceMapImageFilter.h><BR></FONT><FONT color=#0000ff size=2>
#include</FONT><FONT color=#000000 size=2> </FONT><FONT color=#a31515 size=2><itkSignedDanielssonDistanceMapImageFilter.h></FONT><BR><FONT color=#0000ff size=2>
#include</FONT><FONT color=#000000 size=2> </FONT><FONT color=#a31515 size=2><iostream><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< unsigned char, 3> SGInputImageType ;<BR>typedef itk::ImageFileReader< SGInputImageType> SGImgReaderType ;<BR>typedef itk::Image< float, 3> SGDTImageType ;<BR>typedef itk::ApproximateSignedDistanceMapImageFilter DTFilter ;<BR>//typedef itk::SignedDanielssonDistanceMapImageFilter DTFilter ;<BR> <BR>SGImgReaderType::Pointer reader = SGImgReaderType::New() ;<BR>reader->SetFileName( argv[1] ) ; // This is a 100x100x100 8-bit binary analyze volume<BR>
try{<BR> reader->Update() ;<BR>}<BR>catch( itk::ExceptionObject & err ){<BR> cerr << "Error reading file" << endl ;<BR>return -1 ;<BR>}<BR>cerr << "Read file OK" << endl ; // File is read ok, as this is printed<BR><BR>DTFilter::Pointer dt_obj= DTFilter::New() ;<BR> <BR>dt_obj->SetInput(reader->GetOutput()) ;<BR>dt_obj->SetInsideValue(255);<BR>dt_obj->SetOutsideValue(0);<BR> <BR>try{<BR>dt_obj->Update() ;<BR>}<BR>catch( itk::ExceptionObject & err ){<BR>cerr << "Error calculating distance transform: " << err << endl ;<BR>return -1;<BR>}<BR>cerr << "Done calculating distance transform" << 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>