<html>
<body>
<br>
Hi Luis, <br>
Thank you very much for your useful comments. Actually I hadn't
understood very well the role of the 'maximum step' parameter, and of
course I have already tried this correction. However, it looked not to be
enough, since <b>the error persists</b>... <br>
Answering to your questions:<br><br>
1) None. Actually I checked that it failed just when beginning the
registration process. That's why I guess that it was due to
initialization...<br><br>
2) No, but how could I reflect them on the scales? In this particular
case (but I use to work with different images), the characteristics
are:<br>
<br>
<x-tab> </x-tab>Size of
every volume in the series = 512 x 512 x 24<br>
<x-tab> </x-tab>
ElementSpacing = 0.742188 x 0.742188 x 6.6<br>
<br>
3) I had chosen MomentsOn(), but actually I'd like to know which
would be more recommendable and which criteria should I
consider?<br><br>
4) I got it now. But then I have another question. Wouldn't be equivalent
to change the scales and then allow a larger step? So for example (just
like an approximation):<br><br>
<font face="Arial, Helvetica" color="#0000FF"><i>typedef</font>
<font face="Arial, Helvetica">
OptimizerType::ScalesType
OptimizerScalesType;<br>
OptimizerScalesType optimizerScales(
transform->GetNumberOfParameters() );<br>
</font><font face="Arial, Helvetica" color="#0000FF">const</font>
<font face="Arial, Helvetica">
</font><font face="Arial, Helvetica" color="#0000FF">double</font>
<font face="Arial, Helvetica"> translationScale = 1.0 / 1000.0; <br>
</font><font face="Arial, Helvetica" color="#0000FF">const</font>
<font face="Arial, Helvetica">
</font><font face="Arial, Helvetica" color="#0000FF">double</font>
<font face="Arial, Helvetica"> rotationScale = 1.0 / 60.0; <br><br>
optimizerScales[0] = rotationScale ;<br>
optimizerScales[1] = rotationScale ;<br>
optimizerScales[2] = rotationScale ;<br>
optimizerScales[3] = translationScale;<br>
optimizerScales[4] = translationScale;<br>
optimizerScales[5] = translationScale;<br><br>
<br><br>
<br>
</i></font>I have another 2 comments:<br><br>
5) What about the <b>rotation description?</b> I didn't change nothing in
this piece of code, but maybe that's the clue...<br><br>
<font face="Arial, Helvetica" color="#0000FF"><i>typedef</font>
<font face="Arial, Helvetica"> TransformType::VersorType
VersorType;<br>
</font><font face="Arial, Helvetica" color="#0000FF">typedef</font>
<font face="Arial, Helvetica">
VersorType::VectorType VectorType;<br><br>
VersorType rotation;<br>
VectorType axis;<br>
<br>
axis[0] = 0.0; <br>
axis[1] = 0.0; <br>
axis[2] = 1.0; <br><br>
</font><font face="Arial, Helvetica" color="#0000FF">const</font>
<font face="Arial, Helvetica">
</font><font face="Arial, Helvetica" color="#0000FF">double</font>
<font face="Arial, Helvetica"> angle = 0;<br><br>
rotation.Set( axis, angle );<br>
transform->SetRotation( rotation );<br><br>
</i></font>6) Which could be a good size for the
<b>'<font face="Arial, Helvetica">numberOfHistogramBins' </b>defined for
the metric? I am working with unsigned short format, and the images have
intensities about the range min = 0.000000, max = 660.000000. I guess
that depending on that parameter the computational cost will change, but
would you give me a suggestion? 32, 64, 128,... would be any of them
ok?<br><br>
<br>
</font>I'm looking forward to your answer.<br>
Thanks,<br>
Rosario<br><br>
<br>
At 03:19 13/06/2007, Luis Ibanez wrote:<br><br>
<blockquote type=cite class=cite cite="">Hi Rosario,<br><br>
Thanks for the detailed description of your problem.<br><br>
The combination of registration components that you<br>
are using looks fine.<br><br>
You are also guessing correctly that the problem is<br>
probably related to the initialization.<br><br>
<br>
A couple of questions:<br><br>
<br>
1) How many iterations of the optimizer do you see<br>
with the Observer before the Exception is thrown ?<br><br>
<br>
2) I see that in the translation scales you are not<br>
taking into account the spacing and number of<br>
pixels of your images. It is usually wise to do<br>
so because in that way you can be sure that the<br>
translation scaling really correspond to the<br>
physical extent of your images.<br><br>
What are the number of pixels of your images,<br>
and what are their pixel spacings ?<br><br>
<br>
3) What mode of the CenteredTransformInitializer are<br>
you using: Geometry ? or Moments ?<br><br>
<br>
4) The value 0.2 as initial maximum step is a bit<br>
large. Note that since the parameter scaling<br>
for the Versor (unit quaternion) components of<br>
the transform is 1.0, that means that your first<br>
jump in the parametric space is going to be of<br>
11 degrees in rotation. You may want to start<br>
with a smaller amount, maybe something like just<br>
1 degree or rotation, which should be a step of<br>
0.02.<br><br>
<br><br>
Please let us know,<br><br>
<br>
Thanks<br><br>
<br>
Luis<br><br>
<br><br>
<br>
=====================<br>
Rosario Sance wrote:<br>
<blockquote type=cite class=cite cite="">Hi all,<br>
My question is regarding to a particular implementation of a Registration
algorithm I have just tried without success.<br>
Firstly I checked the example " ImageRegistration8.cxx", in
which the use of the " itkVersorRigid3DTransform" is
illustrated, and it worked.<br>
Then I did the same with the example "
ImageRegistrationHistogramPlotter.cxx", which deals with the "
MutualInformationHistogramImageToImageMetric", and also worked
properly with my images. (Since they are 3D volumes I did the required
changes and I had no problems at all).<br>
However, when I tried to create a new algorithm with the elements:<br>
TRANSFORM: itkVersorRigid3DTransform (with the
itkCenteredTransformInitializer)<br>
OPTIMIZER: itkVersorRigid3DTransformOptimizer<br>
METRIC: MutualInformationHistogramImageToImageMetric<br>
INTERPOLATOR: itkLinearInterpolateImageFunction<br>
The code was properly built but I achieved a permanent error in
execution:<br>
/ExceptionObject caught !<br>
itk::ExceptionObject (013CF7FC)<br>
Location: "void __thiscall itk::HistogramImageToImageMetric<class
itk::Image<float,3>,class itk::Image<float,3>
>::ComputeHistogram(const class itk::Array<double> &,class
itk::Statistics::Histogram<double,2,class
itk::Statistics::DenseFrequencyContainer> &) const"<br>
File:
c:\itk\insighttoolkit-3.2.0\code\algorithms\itkHistogramImageToImageMetric.txx<br>
Line: 303<br>
Description: itk::ERROR:
MutualInformationHistogramImageToImageMetric(018A50D8): All the points
mapped to outside of the moving image<br>
/I guessed that the problem came from the initialization of the
Optimizer:<br>
/typedef/ /
OptimizerType::ScalesType
OptimizerScalesType;<br>
OptimizerScalesType optimizerScales(
transform->GetNumberOfParameters() );<br>
const double translationScale = 1.0 / 1000.0;<br>
optimizerScales[0] = 1.0;<br>
optimizerScales[1] = 1.0;<br>
optimizerScales[2] = 1.0;<br>
optimizerScales[3] = translationScale;<br>
optimizerScales[4] = translationScale;<br>
optimizerScales[5] = translationScale;<br>
optimizer->SetScales( optimizerScales );<br>
optimizer->SetMaximumStepLength( 0.2000 );<br>
optimizer->SetMinimumStepLength( 0.0001 );<br>
optimizer->SetNumberOfIterations( 200 );<br><br>
/but I was playing with it and I couldn't avoid the fail... The same with
the initialization of the transform:<br>
/ / /typedef itk::CenteredTransformInitializer< TransformType,<br>
FixedImageType,<br>
MovingImageType<br>
> <br>
TransformInitializerType;<br>
TransformInitializerType::Pointer initializer =<br>
TransformInitializerType::New();<br>
(/...)<br>
I have tried it with different images (different sizes and resolution).
All of them are MRI dynamic studies of the abdominal region (3D volumes
on time). I'd really like to know what's happening with my piece of code.
*Is there any specific limitation for mixing those elements in a new
algorithm?<br>
*Thank you very much in advance.<br>
Rosario<br>
___________________________________________________<br>
Rosario Sance Garzón<br>
Grupo de Tecnologías de Imagen Biomédica<br>
Dpto. Ingeniería Electrónica<br>
E.T.S.I. Telecomunicación - UPM<br>
Ciudad Universitaria<br>
28040 - Madrid<br>
Teléfono: 91 549 57 00 (Ext. 4220)
Fax: 91 336 73 23<br>
Web:
<a href="http://www.die.upm.es/im" eudora="autourl">
http://www.die.upm.es/im</a><br>
___________________________________________________<br>
/Rosario Sance Garzón<br>
Biomedical Image Techologies<br>
Electronic Engineering Department<br>
E.T.S.I. Telecomunicación - UPM<br>
Ciudad Universitaria<br>
E-28040 - Madrid (SPAIN)<br>
//Telephone: +34 91 549 57 00 (Ext. 4220)
Fax: +34 91 336 73 23<br>
Web:
<a href="http://www.die.upm.es/im" eudora="autourl">
http://www.die.upm.es/im</a><br>
/ ___________________________________________________<br><br>
------------------------------------------------------------------------<br>
_______________________________________________<br>
Insight-users mailing list<br>
Insight-users@itk.org<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" eudora="autourl">
http://www.itk.org/mailman/listinfo/insight-users</a></blockquote><br><br>
-- <br>
No virus found in this incoming message.<br>
Checked by AVG Free Edition. Version: 7.5.472 / Virus Database:
269.8.15/847 - Release Date: 12/06/2007 21:42<br>
</blockquote>
<x-sigsep><p></x-sigsep>
<font face="Eras Medium ITC">
___________________________________________________</font> <br><br>
<font face="Arial TUR, Helvetica">Rosario Sance Garzón<br>
Grupo de Tecnologías de Imagen Biomédica<br>
Dpto. Ingeniería Electrónica<br>
E.T.S.I. Telecomunicación - UPM<br>
Ciudad Universitaria<br>
28040 - Madrid <br><br>
</font>Teléfono: 91 549 57 00 (Ext. 4220) <br>
Fax: 91 336 73 23<br>
Web:
<a href="http://www.die.upm.es/im" eudora="autourl">
http://www.die.upm.es/im<br>
</a><font face="Eras Medium ITC">
___________________________________________________</font> <br><br>
<font face="Arial TUR, Helvetica"><i>Rosario Sance Garzón<br>
Biomedical Image Techologies<br>
Electronic Engineering Department<br>
E.T.S.I. Telecomunicación - UPM<br>
Ciudad Universitaria<br>
E-28040 - Madrid (SPAIN)<br><br>
</font>Telephone: +34 91 549 57 00 (Ext. 4220) <br>
Fax: +34 91 336 73 23<br>
Web:
<a href="http://www.die.upm.es/im" eudora="autourl">
http://www.die.upm.es/im<br>
</a></i><font face="Eras Medium ITC">
___________________________________________________</font> <br>
</body>
</html>