[Insight-users] seg fault
Christos Panagiotou
C.Panagiotou at cs.ucl.ac.uk
Mon, 12 Apr 2004 03:39:04 +0100
dear luis
to remind: i am trying to alter the MultiResMIRegistration application
to work with affine transformation
as i ve told i have problems of achieving the desired results so i ve
added an observer to the optimizer using
the CommandIterationUpdate class found in the examples/registration/ *.cxx
imediately when the iterations start, i receive a seg fault
i used the ddd debugger as you ve proposed in a similar problem and got
the following output:
-------------------------
Fixed image filename: mr1.mha
Big Endian: 0
Image Size: [256, 256, 136]
Image Spacing: [1, 1, 1]Moving image filename: ot_100x120x138.mha
Big Endian: 0
Image Size: [100, 120, 138]
Image Spacing: [1, 1, 1]Permute order: [1, 2, 0]Flip axes: [1, 0,
0]Number of levels: 4
Fixed image shrink factors: [4, 4, 1]Moving image shrink factors: [2, 2,
1]Number of iterations: [500, 500, 500, 500]Learning rates: [1e-04,
1e-05, 5e-06, 1e-06]Translation scale: 350
PGM directory: pettopd
Preprocess the images ...
Need to permute: [1, 2, 0]Need to flip: [1, 0, 0]Register the images ...
--- Starting level 0
No. Iterations: 500 Learning rate: 1e-04
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1084448096 (LWP 3010)]
0x0029051a in itk::SubjectImplementation::InvokeEvent(itk::EventObject
const&, itk::Object*) () from /usr/local/lib/InsightToolkit/libITKCommon.so
(gdb)
----------------------------
i ve seen in a similar post that i need two instances of the optimizer
if i want to modify the cost function during the optimization procedure
in the MultiResMIRegistration application i use the
gradientdescentoptimizer and the learning rates change through the
following code:
typedef SimpleMemberCommand<Self> CommandType;
typename CommandType::Pointer command = CommandType::New();
command->SetCallbackFunction( this, &Self::StartNewLevel );
where the StartNewLevel method changes the learning rates
i am not sure if this has something to do about it, but i am stack with
the seg fault and i am not sure why i am getting it...
any help would be appreciated
thanks
christos