[Insight-users] Text output problems in MultiResMIRegistration

Vicente Grau vicente at robots.ox.ac.uk
Thu Nov 18 12:36:05 EST 2004


Luis,

thank you very much for your help. I am sorry I didn't explain my 
problem well enough. The fact is that I don't get any messages from the 
Command/Observer at all. The text output I get from the program is:

MultiResMIRegistration.exe BrainWebT1toT2b.txt
Parsing input ...
Fixed image filename: brainweb165a10f17.mha
brainweb1e5a10f17Rot10Tx15.mha
Permute order: [0, 1, 2]
Flip axes: [0, 0, 0]
Number of levels: 5
Fixed image shrink factors: [4, 4, 1]
Moving image shrink factors: [8, 8, 1]
Number of iterations: [2500, 2500, 2500, 2500, 2500]
Learning rates: [0.0001, 1e-05, 5e-06, 1e-06, 5e-07]
Translation scale: 320
Output filename: t1tot2.mha
Preprocess the images ...

and that's all. There are other std::cout<< lines that should be 
executed (in MIMApplicationBase::Execute(), std::cout << "Register the 
images ... ") that don't seem to work (I have checked on gdb if the 
program went through them, and it did so but with no effect.) I also 
added other cout << lines myself, not related to the Command/ Observer, 
but directly in the function MIMPreprocessor::Execute(), and I found 
that  they stopped working right after the normalizer->Update(); line. 
That's why I thought this could be interfering with the std output. I 
don't know what else it could be; any ideas?

Thank you very much.

Vicente


Luis Ibanez wrote:

>
> Hi Vicente,
>
>
> Thanks for your detailed report.
>
> The MultiResMIRegistration application only have one
> Observer connected to the registration algorithm.
>
> This observer is only intended to react to the changes
> in resolution level. In other words, since this is a
> multi-resolution registration, IterationEvents are triggered
> *at the end* of the registration process of each level
> of the pyramid.
>
> What the Command/Observer does at that point is to invoke
> the StartNewLevel() method of the MIMRegistrator. In lines
> 180-202. This method *only* prints out the number of iterations
> and the learning rate that is going to be used for the *next*
> level of the pyramid.
>
> In summary:  In this application you should only expect *one*
> printed line per change in level of the pyramid. Since you are
> setting your registration to use 5 levels, you will only get
> 4 messages.
>
> If you want to get trace output from the registration process
> inside each one of the pyramid level, you may want to add
> another Command/Observer and connect it to the optimizer.
>
> You will find multiple examples on how to do this in the
> ITK Software Guide
>
>        http://www.itk.org/ItkSoftwareGuide.pdf
>
>
> in the registration chapter.
>
>
>
>   Please let us konw if you have further questions,
>
>
>
>      Thanks
>
>
>
>         Luis
>
>
>
> -----------------------
> Vicente Grau wrote:
>
>> Hi everybody,
>>
>> I have recently installed ITK Release 1.8.1 on a Windows XP platform 
>> using cygwin. Running MultiResMIRegistration on two sample images 
>> (brainweb165a10f17.mha and brainweb1e5a10f17Rot10Tx15.mha, both in 
>> the ftp server), the program returns a reasonable registered image. 
>> However, I can see no text output from the Observer. Adding some 
>> cout<< lines to check where it fails, I have tracked the problem down 
>> to MIMPreprocessor.txx: in function Execute(), it stops printing 
>> anything right after the line:
>> normalizer->Update();
>>
>> Is it possible that this command somehow interferes with text 
>> printing in my window?
>> I have debugged the program with gdb and it runs correctly past this 
>> line, only it doesn't react to cout<<  lines anymore.
>> I have gone through the pdfs and the list, but I couldn't find 
>> anything related. Any help will be much appreciated!
>>
>> This is the parameters file I am using as input to the program.
>>
>> brainweb165a10f17.img
>> brainweb1e5a10f17Rot10Tx15.img
>> 0 1 2
>> 0 0 0
>> 5
>> 4 4 1
>> 8 8 1
>> 2500 2500 2500 2500 2500
>> 1e-4 1e-5 5e-6 1e-6 5e-7
>> 320
>> t1tot2.mha
>>
>>
>> Vicente Grau
>>
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>
>
>


More information about the Insight-users mailing list