[Insight-users] ::UpdateOutputData() when running the image registration process.

motes motes mort.motes at gmail.com
Mon Nov 2 14:57:09 EST 2009


In an application I call Update() on the image registration method
multiple times:


    for (int i=0; i<runs; i++) {
      itkProbesStart("Registration");
      run();
      itkProbesStop("Registration");
      itkProbesReport( std::cout );

}



  int run() {
    std::cout << std::endl << "[INFO]::Starting Registration" << std::endl;
    try {
      registration->Update();
    }
    catch( itk::ExceptionObject & err ) {
      std::cerr << "ExceptionObject caught !" << std::endl;
      std::cerr << err << std::endl;
      return EXIT_FAILURE;
    }
    return EXIT_SUCCESS;
  }


But the second time run() is called the Update() method returns before
the image registration process is even started. I have narrowed the
"error" down to:

DataObject
::UpdateOutputData()
{
  // If we need to update due to PipelineMTime, or the fact that our
  // data was released, then propagate the UpdateOutputData to the source
  // if there is one.
  if ( m_UpdateMTime < m_PipelineMTime || m_DataReleased ||
       this->RequestedRegionIsOutsideOfTheBufferedRegion() )
    {
    if ( m_Source )
      {
      m_Source->UpdateOutputData(this);
      }
    }
}



The if-statement:

  if ( m_UpdateMTime < m_PipelineMTime || m_DataReleased ||
       this->RequestedRegionIsOutsideOfTheBufferedRegion() )


 never evals to true the second time and therefore the image
registration method is never started.


Any ideas on why I cannot run Update() on the image registration
method multiple times?


More information about the Insight-users mailing list