[Insight-users] ImageRegistration8 takes 2 hours 45 menit!

Tanya S tanya_lll at yahoo.com
Tue Oct 4 07:36:17 EDT 2005


Thank you Xiaodong, Junyi and Luis,
 
I change the metric of imageRegistration8 from MeanSquareImageToImageMetric to MattesMutualInformationImageToImageMetric and it runs no more than 2 minutes! Thank you very much!
 
However, I have other problem :(.
I would like to know how to convert VersorRigid3DTransform to vtkTransform.
I have displayed the Fixed and the Moving Image using VTK. Now, what I want to do is I would send all the versors and translations from VersorRigid3DTransform to vtkTransform from each iteration of the registration process, so that the Moving Image is moved showing the registration process from each iteration.
 
I have one class that inherits itk::Command and has Execute method. Inside this method, I call:
 
pTransform->RotateX(optimizer->GetCurrentPosition()[0])
pTransform->RotateY(optimizer->GetCurrentPosition()[1])
pTransform->RotateZ(optimizer->GetCurrentPosition()[2])
pTransform->Translate(optimizer->GetCurrentPosition()[3],
optimizer->GetCurrentPosition()[4],
optimizer->GetCurrentPosition()[5])
 
pTransform is of type vtkTransform*.
But this code give wrong transformation.
 
I have also tried to set the optimizer->GetCurrentPosition() values to vtkMatrix4x4 and then call :
pTransform->SetMatrix(theMatrix) 
but this gives me also wrong transformation. "theMatrix" is of type vtkMatrix4x4.
 
Any hint would be really appreciated.
 
Best regards,
.Tanya.


Tao, Xiaodong (Research)" <taox at research.ge.com> wrote:
Tanya,
 
ImageRegistration8 uses MeanSquaresImageToImageMetric and VersorRigid3DTransform for registration. This combination may work well for images acquired for the same subject using the same modality, in which case, two images can be aligned using a rigid transform (same subject), and corresponding points in the moving image and  the fixed image have same intensity (same modality). For your application, you are registering a PET image with an MRI image. You may want to try one of the mutual information based image to image metric to get more accurate result, such as 
itkNormalizedMutualInformationHistogramImageToImageMetric or itkMattesMutualInformationImageToImageMetric

There are a few examples showing how to used these metrics.

The MeanSquaresImageToImageMetric is also one of the reasons that the program takes long time to run, since at each iterattion, it transforms and interpolates ALL points in the Fixed image region in order to compute the metric. When you use itkNormalizedMutualInformationHistogramImageToImageMetric or MattesMutualInformationImageToImageMetric, you can always control the running time by setting the number of samples in the fixed image region for metric computation.

If you still want to use ImageRegistration8, you can use the PET image (which has fewer voxels than the MRI image) as the fixed image to cut down the running time.

Xiaodong
-----Original Message-----
From: insight-users-bounces+taox=research.ge.com at itk.org [mailto:insight-users-bounces+taox=research.ge.com at itk.org]On Behalf Of Tanya S
Sent: Thursday, September 29, 2005 11:34 PM
To: Luis Ibanez; insight-users at itk.org
Subject: Re: [Insight-users] ImageRegistration8 takes 2 hours 45 menit!


Hi Luis,
 
I have tried to run imageRegistration8 for Release version and it took 21 minutes :((. My machine spesification and the image size are the same as what I wrote on my last email (email attached). 
 
Thanks beforehand for your answer.
 
Best regards,
.Tanya.

Tanya S <tanya_lll at yahoo.com> wrote:


Hi Luis, thanks a lot for answering my question.

Below are the detail of my machine:

1) In what type of machine did you run this code ?

Intel Pentium 4 2.4 GHz
2) What operating system ?

Windows 2000
3) What compiler ?

Microsoft Visual C++ 6.0

4) Did you build it for "Release" ?

No, it was Debug version.


The size of the images are :
- MRI image

Dimension:256, 256, 168

Voxel size(mm): 0.86,0.86, 1.5

The .img file is 21,500 KB


- PET image

Dimension: 128, 128, 94

Voxel size(mm): 2.0, 2.0, 3.0

the .img file is 3,000 KB


Maybe I should try for Release. I ll tell you how it works in Release version.


Thanks again,

.Tanya.

-----------------
Tanya S wrote:
> Dear all,
> 
> I would like to start doing registration using ITK. I run the sample: 
> ImageRegistration8 for registering two Analyze head images, i.e:
> - MRI image(Dimension:256, 256, 168 and Voxel size(mm): 0.86,0.86, 1.5)
> - PET image(Dimension: 128, 128, 94 and Voxel size(mm): 2.0, 2.0, 3.0)
> 
> The registration process takes around 2 hours and 45 minutes with 
> non-accurate result :(.
> 
> I would like to ask why does it take so long and how to make it faster?
> 
> Any hint would be really appreciated.
> 
> Best regards,
> .Tanya.
> 





---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. _______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users


---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort. _______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users

		
---------------------------------
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20051004/4862c137/attachment.html


More information about the Insight-users mailing list