<div>Hi, </div> <div>I copied DeformableRegistration8.cxx to my directory, compiled and ran it. The inputs were two Analyze format images. The program crashed, and gave me a Microsoft OS related error message: </div> <div>"DefomableReg.exe has encounterd a problem and needs to close.... Please tell Microsoft about this problem..." </div> <div>I didn't modify the program much. I ran it as follows: </div> <div>DeformableReg.exe c:\data\input1.hdr c:\data\input2.hdr c:\data\output.hdr c:\data\diff1.hdr c:\data\diff2.hdr c:\data\deformField.vtk </div> <div>I put print statements (Check 1 and Check 2) to locate where it crashed. It is at this point: </div> <div>========================================<FONT color=#008000 size=2> </div> <div>typedef signed short OutputPixelType;</FONT><FONT size=2> </div></FONT><FONT color=#0000ff size=2> <div>typedef</FONT><FONT size=2> itk::Image< OutputPixelType, ImageDimension > OutputImageType; </div></FONT><FONT color=#0000ff
size=2> <div>typedef</FONT><FONT size=2> itk::CastImageFilter< </div> <div>FixedImageType, </div> <div>OutputImageType > CastFilterType; </div></FONT><FONT color=#0000ff size=2> <div>typedef</FONT><FONT size=2> itk::ImageFileWriter< OutputImageType > WriterType; </div> <div>WriterType::Pointer writer = WriterType::New(); </div> <div>CastFilterType::Pointer caster = CastFilterType::New(); </div> <div>writer->SetFileName( argv[3] ); </div> <div>caster->SetInput( resample->GetOutput() ); </div> <div>writer->SetInput( caster->GetOutput() ); </div></FONT><FONT color=#0000ff size=2> <div>try</FONT><FONT size=2> </div> <div>{ </div> <div>std::cout << std::endl << </FONT><FONT color=#800000 size=2>"Check 1"</FONT><FONT size=2> << std::endl; // Crashed at this point...</div> <div>writer->Update(); </div> <div>std::cout << std::endl << </FONT><FONT color=#800000 size=2>"Check 2"</FONT><FONT size=2> <<
std::endl; </div> <div>} </div></FONT><FONT color=#0000ff size=2> <div>catch</FONT><FONT size=2>( itk::ExceptionObject & err ) </div> <div>{ </div> <div>std::cerr << </FONT><FONT color=#800000 size=2>"ExceptionObject caught !"</FONT><FONT size=2> << std::endl; </div> <div>std::cerr << err << std::endl; </div></FONT><FONT color=#0000ff size=2> <div>return</FONT><FONT size=2> -1; </div> <div>} </div></FONT> <div>======================================== </div> <div>Before the crash, I got the following output in the terminal window:<FONT size=2> </div> <div>Starting Registration </div> <div>Probe Tag Starts Stops Time </div> <div>Registration 1 1 109.249 </div> <div>Check 1 </div> <div> </div> <div>As you can see it crashes at the point between 'Check 1' and 'Check 2'. That is at </div> <div>writer->Update(); </div> <div>As my input files are of type float, I changed the InputPixelType from 'signed short' to 'float'.
Likewise I changed the the OutputPixelType too. </div> <div> </div> <div>Could anyone please advise me on this? </div> <div>Thank you very much. </div> <div> </div> <div>Regards, </div> <div>Vijay</div></FONT><p> 
<hr size=1>Ahhh...imagining that irresistible "new car" smell?<br> Check out
<a href="http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM-">new cars at Yahoo! Autos.</a>