[Insight-users] MultiResolution registration

Luis Ibanez luis . ibanez at kitware . com
Thu, 30 Oct 2003 19:03:58 -0500


This is a multi-part message in MIME format.
--------------030906080800040001060601
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: 7bit



Hi Jesse

The ITK terminology for registration has changed over time.

In the early days we used to talk about "target" and "source"
image.  Then we switch to "fixed" and "moving" which are the
terms used today, and is how you will find the descriptions
in the software guide.

This application is one of the earliest on the toolkit and
it is therefore making use of the original terminology in
some sections.


If you look at the code of the application
(Ah, the pleasure of open source !), you will see in:


   InsightApplications/MultiResMIRegistration/Common

                    SimpleAppOutput.txx

That the correspondences are:

   "target"    ---->  "fixed"
   "source"    ---->  "moving"
   "register"  ---->  "resampled moving"


Please find attached a modified version of this file
that will save the images as MetaImages instead of
series of PGM files. MetaImage use a text header file
and a binary raw data image file.

Use it to replace the one in your system. In that way
you will not need to go through the extra step of using
Mricro for viewing the images.



Please let us know if you find further problems.


Regards,


  Luis




------------------------
iajesse wrote:
> Hi Luis,
>  
> I have a problem on output of  MultiResMIRegistration ,
>  
> There are three dataset in ourput,
>  
> register000.pgm ....
> source000.pgm,,,
> and target000.pgm ...
>  
> I convert them into raw image using Mricro, but find that the new target 
> image is not the old one, and source is not the old one. I think that 
> the target is the fixed, and source is floating, why target change?
>  
> Best
>  
> Jesse
> 
=========================================



--------------030906080800040001060601
Content-Type: text/plain;
 name="SimpleAppOutput.txx"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="SimpleAppOutput.txx"

Lyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09DQoNCiAgUHJvZ3JhbTogICBJbnNpZ2h0IFNlZ21lbnRh
dGlvbiAmIFJlZ2lzdHJhdGlvbiBUb29sa2l0DQogIE1vZHVsZTogICAgJFJDU2ZpbGU6IFNp
bXBsZUFwcE91dHB1dC50eHgsdiAkDQogIExhbmd1YWdlOiAgQysrDQogIERhd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