[Insight-users] problems running deformable registration

vijay kumar desivij at yahoo.com
Tue May 8 14:19:14 EDT 2007


Hi, 
  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: 
  "DefomableReg.exe has encounterd a problem and needs to close.... Please tell Microsoft about this problem..." 
  I didn't modify the program much. I ran it as follows: 
  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 
  I put print statements (Check 1 and Check 2) to locate where it crashed. It is at this point: 
  ======================================== 
  typedef signed short OutputPixelType; 
  typedef itk::Image< OutputPixelType, ImageDimension > OutputImageType; 
  typedef itk::CastImageFilter< 
  FixedImageType, 
  OutputImageType > CastFilterType; 
  typedef itk::ImageFileWriter< OutputImageType > WriterType; 
  WriterType::Pointer writer = WriterType::New(); 
  CastFilterType::Pointer caster = CastFilterType::New(); 
  writer->SetFileName( argv[3] ); 
  caster->SetInput( resample->GetOutput() ); 
  writer->SetInput( caster->GetOutput() ); 
  try 
  { 
  std::cout << std::endl << "Check 1" << std::endl; // Crashed at this point...
  writer->Update(); 
  std::cout << std::endl << "Check 2" << std::endl; 
  } 
  catch( itk::ExceptionObject & err ) 
  { 
  std::cerr << "ExceptionObject caught !" << std::endl; 
  std::cerr << err << std::endl; 
  return -1; 
  } 
  ======================================== 
  Before the crash, I got the following output in the terminal window: 
  Starting Registration 
  Probe Tag Starts Stops Time 
  Registration 1 1 109.249 
  Check 1 
   
  As you can see it crashes at the point between 'Check 1' and 'Check 2'. That is at 
  writer->Update(); 
  As my input files are of type float, I changed the InputPixelType from 'signed short' to 'float'. Likewise I changed the the OutputPixelType too. 
   
  Could anyone please advise me on this? 
  Thank you very much. 
   
  Regards, 
  Vijay

       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070508/55b2b5b1/attachment.html


More information about the Insight-users mailing list