[Insight-users] Re: MRI registration example : How to run it
Luis Ibanez
luis.ibanez@kitware.com
Wed, 24 Apr 2002 14:04:33 -0400
This is a multi-part message in MIME format.
--------------040307020309060109090805
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hi Buu,
The Multiresolution MRI registration example doesn't require
VTK or Tcl it is purely C++ (though it is good that you install
them because they are actually required for some other examples).
Please find attached a parameter.txt file that will allow you
to register two of the BrainWeb images that you download from
the ftp server.
Notice that the code of the example is expecting images of
pixel type = "signed short", while the BrainWeb images are
of pixel type = "unsigned char". So, in order to use these
pair of images you should have to modify the file:
Examples/MultiResMIRegistration/Common/MultiResMIRegistration.cxx
in line 37:
typedef itk::SimpleApp<signed short> AppType;
replace "signed short" by "unsigned char" :
typedef itk::SimpleApp<unsigned char> AppType;
and recompile the example.
Once the example code is rebuilt, put in the same
directory:
1) executable: MultiResMIRegistration
2) the BrainWebImages files:
- brainweb165a10f17.raw
- brainweb1e1a10f20.raw
3) the parameters.txt file attached to this email
and run:
MultiResMIRegistration parameters.txt
That should initiate the registration process.
You may want to play with the parameters of the
file according to the instructions in the ReadMe.pdf
file available with the sources.
Note that using the BrainWeb images is a bit of a null
example becase they are already registered :-)
But at least that will put you in the right track
for testing something closer to a real life problem.
you could use for example the itkResampleImageFilter
and a known transform of your choice in order to
translate & rotate one of the images. Then provide
the rotated&translated image to the example.
Keep in mind that parameter tunning is *very important*
in registration. So, once you start with a real problem
you may want to go progressively without making big
changes on the parameters.
Please let us know if you encounter any further problems.
Thanks
Luis
========================================
Buu Tien Phan wrote:
> Dear Luis,
>
> I got the images, but I don't know how to run the example. I am using VS
> C++ 6.0. I also installed VTK and Tcl in my system. Thank you very much.
> Could you show me how since I am not familiar with Tcl.
>
> Buu Phan
>
>
>
>
>
>
--------------040307020309060109090805
Content-Type: text/plain;
name="parameters.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="parameters.txt"
brainweb165a10f17.raw
1
181 217 181
1.0 1.0 1.0
brainweb1e1a10f20.raw
1
181 217 181
1.0 1.0 1.0
0 1 2
0 0 0
5
4 4 4
4 4 4
2500 2500 2500 2500 2500
1e-4 1e-5 1e-6 1e-6 1e-7
320
myOutputDirectory
--------------040307020309060109090805--