<html><div style='background-color:'><DIV class=RTE>
<P>I am developing an aplication for endoscopy test of cancer. I am trying to use BSplineTransform, BSplineInterpolate, LBFGSBOptimizer and <FONT size=2>MeanSquaresImageToImageMetric ok.</FONT></P>
<P><FONT size=2>Why I am using that (BSplineTransform, BSplineInterpolate, LBFGSBOptimizer and <FONT size=2>MeanSquaresImageToImageMetric </FONT>)? because I need DEFORMABLEREGISTRATION and the SoftwareGuide says that to do DeformableRegistration&nbsp;they (BSplineTransform, BSplineInterpolate, LBFGSBOptimizer and <FONT size=2>MeanSquaresImageToImageMetric </FONT>) are the way.</P>
<P></FONT>I am working with images *.bmp and *.tif 537X418 pixels and 222KB.</P>
<P>when I saw the DeformableRegistration4,5,6,7,8 (InsightToolkit-2.0.0\Examples\Registration) they say me the way to use BSplineTransform so I change DeformableRegistration7 to 2D images, but the OutPutImage was like MovingImage always. I send my question and you tell me the reason was I did not help the metric (<FONT size=2>MeanSquaresImageToImageMetric</FONT>) so I said you How can I help <FONT size=2>MeanSquaresImageToImageMetric?.</FONT></P>
<P><FONT size=2>Again I send the code but yesterday I find a instruction SetComputeGradient() and the OutPutImage is like FixedImage but is not very well.</FONT></P>
<P><FONT size=2>Ha I do not remeber sometime you say me if I was using MutualInformationImageToImageMetric and I would like to know how to use but I know the answer SoftwareGuide so I saw the Guide and ImageRegistration2.cxx and tell me if I want to use it (MutualInformationImageToImageMetric) alwas do&nbsp;i need <FONT face=Courier size=1>itkGradientDescentOptimizer.h, itkNormalizeImageFilter.h itkDiscreteGaussianImageFilter.h ??</P></FONT></FONT>Thank you for you Help.<BR><BR><BR>&gt;From: Luis Ibanez &lt;luis.ibanez@kitware.com&gt;<BR>&gt;To: javier silva bravo &lt;javier_silva_bravo@hotmail.com&gt;<BR>&gt;CC: insight-users@itk.org<BR>&gt;Subject: Re: [Insight-users] Where I can find examples or paper about<BR>&gt;Date: Wed, 18 May 2005 21:37:28 -0400<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;Hi Javier,<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;Please be more specific.<BR>&gt;<BR>&gt;Our divinatory skills 
are quite limited and<BR>&gt;tend to fade as we are rapidly aging.<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;When you say:<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"It does not work"<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;Do you mean:<BR>&gt;<BR>&gt;<BR>&gt;1) It doesn't compile&nbsp;&nbsp;?<BR>&gt;2) It compiles but does not link ?<BR>&gt;3) It links but produces segmentation faults at run time ?<BR>&gt;4) It throws exceptions at run time ?<BR>&gt;5) It runs without crashing but the registration result<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;does not aligns the images as expected&nbsp;&nbsp;?<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;We will be more than happy to help you, but we need your<BR>&gt;help in providing enough information about your problem.<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;BTW, note that *ALL* the code shown in the software guide<BR>&gt;is 
available in the directory Insight/Examples<BR>&gt;<BR>&gt;In particular... the image registration examples are available<BR>&gt;in<BR>&gt;<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Insight/Examples/Registration<BR>&gt;<BR>&gt;<BR>&gt;You could happily go straight for the files:<BR>&gt;<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ImageRegistration14.cxx<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ImageRegistration15.cxx<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ImageRegistration16.cxx<BR>&gt;<BR>&gt;<BR>&gt;where that metric is used.<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;These examples are compiled and executed every night in 55<BR>&gt;different platforms ranging from cygwin, to Linux, to 
IRIX.<BR>&gt;<BR>&gt;http://www.itk.org/Testing/Dashboard/20050517-0500-Nightly/TestDetail/__Examples_Registration_ImageRegistration14Test.html<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;Regards,<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Luis<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;---------------------------<BR>&gt;javier silva bravo wrote:<BR>&gt;<BR>&gt;&gt;Yes Luis but I don undertand why it does not work.<BR>&gt;&gt;<BR>&gt;&gt;In the guide says:<BR>&gt;&gt;<BR>&gt;&gt;typedef itk::MutualInformationImageToImageMetric&lt;<BR>&gt;&gt;<BR>&gt;&gt;InternalImageType,<BR>&gt;&gt;<BR>&gt;&gt;InternalImageType &gt; MetricType;<BR>&gt;&gt;<BR>&gt;&gt;MetricType::Pointer metric = MetricType::New();<BR>&gt;&gt;registration-&gt;SetMetric( metric );<BR>&gt;&gt;<BR>&gt;&gt;metric-&gt;SetFixedImageStandardDeviation( 0.4 );<BR>&gt;&gt;metric-&gt;SetMovingImageStandardDeviation( 0.4 
);<BR>&gt;&gt;metric-&gt;SetNumberOfSpatialSamples( 50 );<BR>&gt;&gt;<BR>&gt;&gt;typedef itk::NormalizeImageFilter&lt;<BR>&gt;&gt;FixedImageType,<BR>&gt;&gt;InternalImageType<BR>&gt;&gt;&nbsp;&nbsp;&gt; FixedNormalizeFilterType;<BR>&gt;&gt;typedef itk::NormalizeImageFilter&lt;<BR>&gt;&gt;MovingImageType,<BR>&gt;&gt;InternalImageType<BR>&gt;&gt;&nbsp;&nbsp;&gt; MovingNormalizeFilterType;<BR>&gt;&gt;FixedNormalizeFilterType::Pointer fixedNormalizer =<BR>&gt;&gt;FixedNormalizeFilterType::New();<BR>&gt;&gt;MovingNormalizeFilterType::Pointer movingNormalizer =<BR>&gt;&gt;MovingNormalizeFilterType::New();<BR>&gt;&gt;<BR>&gt;&gt;fixedNormalizer-&gt;SetInput( fixedImageReader-&gt;GetOutput() );<BR>&gt;&gt;<BR>&gt;&gt;movingNormalizer-&gt;SetInput( movingImageReader-&gt;GetOutput() );<BR>&gt;&gt;<BR>&gt;&gt;Now tell me what am i doing wrong?<BR>&gt;&gt;<BR>&gt;&gt;typedef 
itk::MutualInformationImageToImageMetric&lt;<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FixedImageType,<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MovingImageType&gt; MetricType;<BR>&gt;&gt;&nbsp;&nbsp; typedef itk::NormalizeImageFilter&lt;<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
FixedImageType,<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InternalImageType&gt; <BR>&gt;&gt;FixedNormalizeFilterType;<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;typedef itk::NormalizeImageFilter&lt;<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MovingImageType,<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InternalImageType&gt; 
<BR>&gt;&gt;MovingNormalizeFilterType;<BR>&gt;&gt;<BR>&gt;&gt;FixedNormalizeFilterType::Pointer fixedNormalizer = <BR>&gt;&gt;FixedNormalizeFilterType::New();<BR>&gt;&gt;&nbsp;&nbsp; MovingNormalizeFilterType::Pointer movingNormalizer = <BR>&gt;&gt;MovingNormalizeFilterType::New();<BR>&gt;&gt;<BR>&gt;&gt;&nbsp;&nbsp; MetricType::Pointer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; metric&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= MetricType::New();<BR>&gt;&gt;<BR>&gt;&gt;&nbsp;&nbsp; fixedNormalizer-&gt;SetInput( fixedImage );<BR>&gt;&gt;&nbsp;&nbsp; movingNormalizer-&gt;SetInput( movingImageReader-&gt;GetOutput() );<BR>&gt;&gt;<BR>&gt;&gt;&nbsp;&nbsp; registration-&gt;SetFixedImage(&nbsp;&nbsp;fixedNormalizer-&gt;GetOutput()&nbsp;&nbsp; );<BR>&gt;&gt;&nbsp;&nbsp; registration-&gt;SetMovingImage(&nbsp;&nbsp; movingNormalizer-&gt;GetOutput() );<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp; 
metric-&gt;SetFixedImage(&nbsp;&nbsp; fixedNormalizer-&gt;GetOutput()&nbsp;&nbsp;);<BR>&gt;&gt;&nbsp;&nbsp; metric-&gt;SetMovingImage(&nbsp;&nbsp; movingNormalizer-&gt;GetOutput()&nbsp;&nbsp; );<BR>&gt;&gt;&nbsp;&nbsp; interpolator-&gt;SetInputImage(movingImageReader-&gt;GetOutput());<BR>&gt;&gt;<BR>&gt;&gt;&nbsp;&nbsp;FixedImageType::RegionType fixedRegion = <BR>&gt;&gt;fixedImage-&gt;GetBufferedRegion();<BR>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;registration-&gt;SetFixedImageRegion( fixedRegion );<BR>&gt;&gt;&nbsp;&nbsp; metric-&gt;SetFixedImageRegion(fixedRegion);<BR>&gt;&gt;<BR>&gt;&gt;metric-&gt;SetTransformParameters( transform-&gt;GetParameters() );<BR>&gt;&gt;<BR>&gt;&gt;metric-&gt;SetInterpolator( interpolator 
);<BR>&gt;&gt;<BR>&gt;&gt;metric-&gt;SetFixedImageStandardDeviation(0.49);<BR>&gt;&gt;<BR>&gt;&gt;metric-&gt;SetMovingImageStandardDeviation(0.49);<BR>&gt;&gt;<BR>&gt;&gt;metric-&gt;SetNumberOfSpatialSamples( 50 );<BR>&gt;&gt;<BR>&gt;&gt;metric-&gt;SetComputeGradient(1);<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;From: Luis Ibanez &lt;luis.ibanez@kitware.com&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;To: javier silva bravo &lt;javier_silva_bravo@hotmail.com&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;CC: insight-users@itk.org<BR>&gt;&gt;&nbsp;&nbsp;&gt;Subject: Re: [Insight-users] Where I can find examples or paper <BR>&gt;&gt;about<BR>&gt;&gt;&nbsp;&nbsp;&gt;Date: Wed, 18 May 2005 17:51:51 -0400<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;Hi 
Javier,<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;You will find detailed information about both of your<BR>&gt;&gt;&nbsp;&nbsp;&gt;questions in the ITK Software Guide:<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http://www.itk.org/ItkSoftwareGuide.pdf<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;The guide describe examples on how to use the ImageSeries<BR>&gt;&gt;&nbsp;&nbsp;&gt;and how to do multi-modality registration.<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;The code for this examples is avalable in the directory<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Insight/Examples<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;Regards,<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Luis<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;--------------------------<BR>&gt;&gt;&nbsp;&nbsp;&gt;javier silva bravo wrote:<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;itk::NumericSeriesFileNames<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;I need read and write a secuence of Images.<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;and where i can find too information about<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;MuttualInformationImagetoImageMetric? because I dont know how <BR>&gt;&gt;to<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;use 
them.<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;&nbsp;&nbsp;Thank you.<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;<BR>&gt;&gt;&nbsp;&nbsp;<BR>&gt;&gt; &gt;&gt;------------------------------------------------------------------------<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;MSN Premium. Protégete, Comunícate y Diviértete Haz clic aquí<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;&lt;http://g.msn.com/8HMBESMX/2743??PS=47575&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;<BR>&gt;&gt;&nbsp;&nbsp;<BR>&gt;&gt; &gt;&gt;------------------------------------------------------------------------<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;_______________________________________________<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;Insight-users mailing 
list<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;Insight-users@itk.org<BR>&gt;&gt;&nbsp;&nbsp;&gt;&gt;http://www.itk.org/mailman/listinfo/insight-users<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;&nbsp;&nbsp;&gt;<BR>&gt;&gt;<BR>&gt;&gt;------------------------------------------------------------------------<BR>&gt;&gt;T1msn Hotmail Plus. Más espacio, más funcional Haz clic aquí <BR>&gt;&gt;&lt;http://g.msn.com/8HMBESMX/2755??PS=47575&gt;<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt;------------------------------------------------------------------------<BR>&gt;&gt;<BR>&gt;&gt;_______________________________________________<BR>&gt;&gt;Insight-users mailing list<BR>&gt;&gt;Insight-users@itk.org<BR>&gt;&gt;http://www.itk.org/mailman/listinfo/insight-users<BR>&gt;<BR>&gt;<BR>&gt;<BR></DIV></div><br clear=all><hr>T1msn Search. Todo lo que buscas ahora más rápido <a href="http://g.msn.com/8HMBESMX/2728??PS=47575" target="_top">Haz clic aquí </a> </html>