[Insight-users] Re: seg fault 2

Christos Panagiotou C.Panagiotou at cs.ucl.ac.uk
Mon, 12 Apr 2004 17:10:36 +0100


dear luis

as i said in my first post in the MultiResMIRegistration there is an 
other observer that changes the learning rates and the
number of iterations at every resolution level... this was working 
normaly before i added the observer

it is called by:

 typedef SimpleMemberCommand<Self> CommandType;
 typename CommandType::Pointer command = CommandType::New();
 command->SetCallbackFunction( this, &Self::StartNewLevel );

where startNewLevel method alters the iteration number and the learning 
rates for the optimizer.

what i did was to comment the 3 lines of code above and this made the 
observer to work...

however when i have both observers the observer that monitors the 
optimizer in each iteration

  CommandIterationUpdate::Pointer observer = CommandIterationUpdate::New();
 m_Optimizer->AddObserver( itk::IterationEvent(), m_Observer );

reports the segmentation fault.

does this have to do with the fact that both observers attempt to access 
the optimizer and alter it?

i just thoght this would help a little more in understanding my problem
thanks again
christos