<DIV>Thanks Luis,</DIV>
<DIV>Sorry, but If you look again at the code you will see that I dit the initialization of CenteredTransformInitializer with the normalize and smooth images.</DIV>
<DIV>initializer-&gt;SetFixedImage( fixedSmoother-&gt;GetOutput() );<BR>initializer-&gt;SetMovingImage( movingSmoother-&gt;GetOutput() );</DIV>
<DIV>But if I replace these two lines with the orginals images:<BR>initializer-&gt;SetFixedImage( fixedImageReader-&gt;GetOutput() );<BR>initializer-&gt;SetMovingImage( movingImageReader-&gt;GetOutput() );<BR>I do not have an exception but it does not converge correctly.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;And I have to normalize and smooth my images to correctly use the Mutual information has you done in example 2....</DIV>
<DIV>&nbsp;</DIV>
<DIV>Just for information these are the value if I initialize without normalize and smooth the image. with the initial fixed and moving image.</DIV>
<DIV>Initial Transform Parameters<BR>[1, 0, 0, 1, 111.204, 131.591, -12.7911, -12.6914]<BR>0&nbsp;&nbsp; 0.360832&nbsp;&nbsp; [0.993629, -0.00122832, 0.00831941, 1.01269, 111.204, 131.591, -12.7794, -12.5935]<BR>1&nbsp;&nbsp; 0.220862&nbsp;&nbsp; [0.991423, -0.00269869, 0.00381388, 1.00791, 111.204, 131.591, -12.7428, -12.6268]<BR>2&nbsp;&nbsp; 0.458038&nbsp;&nbsp; [0.991053, -0.00423641, 0.00555051, 1.0107, 111.204, 131.591, -12.7455, -12.6022]<BR>3&nbsp;&nbsp; 0.43253&nbsp;&nbsp; [0.98915, -0.00600989, 0.00460683, 1.00976, 111.204, 131.591, -12.7564, -12.6076]<BR>4&nbsp;&nbsp; 0.391366&nbsp;&nbsp; [0.988866, -0.0053906, 0.00362396, 1.0088, 111.204, 131.591, -12.7547, -12.6199]<BR>5&nbsp;&nbsp; 0.255813&nbsp;&nbsp; [0.988056, -0.00601446, 0.00374833, 1.0088, 111.204, 131.591, -12.7609, -12.6203]<BR>6&nbsp;&nbsp; 0.23651&nbsp;&nbsp; [0.987756, -0.00630565, 0.00309831, 1.00838, 111.204, 131.591, -12.7629, -12.6261]<BR>7&nbsp;&nbsp; 0.312396&nbsp;&nbsp; [0.987953, -0.00558894,
 0.00279363, 1.008, 111.204, 131.591, -12.7579, -12.6298]<BR>8&nbsp;&nbsp; 0.157922&nbsp;&nbsp; [0.987289, -0.00548913, 0.00273997, 1.00797, 111.204, 131.591, -12.7529, -12.6261]<BR>9&nbsp;&nbsp; 0.259104&nbsp;&nbsp; [0.986384, -0.0058869, 0.00200088, 1.00744, 111.204, 131.591, -12.7518, -12.6287]<BR>10&nbsp;&nbsp; 0.37124&nbsp;&nbsp; [0.98628, -0.00594178, 0.00209053, 1.00749, 111.204, 131.591, -12.753, -12.6278]<BR>Result =<BR>&nbsp;Center X&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 111.204<BR>&nbsp;Center Y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 131.591<BR>&nbsp;Translation X = -12.753<BR>&nbsp;Translation Y = -12.6278<BR>&nbsp;Iterations&nbsp;&nbsp;&nbsp; = 12<BR>&nbsp;Metric value&nbsp; = 0.520743</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>thanks again for your help</DIV>
<DIV>Lagaffe<BR><BR><B><I>Luis Ibanez &lt;luis.ibanez@kitware.com&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR><BR>Hi Lagaffe,<BR><BR><BR>The error is likely related to the fact that you commented<BR>out the lines where the input images are connected to the <BR>CenteredTransformInitializer<BR><BR>&gt;<BR>&gt; /*<BR>&gt; initializer-&gt;SetFixedImage( fixedImageReader-&gt;GetOutput() );<BR>&gt; initializer-&gt;SetMovingImage( movingImageReader-&gt;GetOutput() );<BR>&gt; */<BR>&gt;<BR><BR><BR>Therefore, the initialization of the Transform is not being<BR>performed correctly and you start your optimization process<BR>with corrupted numerical values such as:<BR><BR><BR>&gt; ---------------<BR>&gt; Initial Transform Parameters<BR>&gt; [1, 0, 0, 1, -1.00276e+008, -4.25387e+008, 4.90708e+007, 3.85172e+008]<BR>&gt;<BR><BR><BR>Also, note that you *MUST* call Update() in the readers before you use<BR>the TransformInitializer object. The reason is that the Initializer is<BR>not a pipeline object and
 therefore it will not trigger an update in its<BR>inputs. This object is similar to the image calculator in this regard.<BR><BR><BR>If you notice that the optimizer is stopping too early without<BR>converging, that indicates that you are using:<BR><BR>A) a value too large for the step length of the optimizer<BR>B) inappropriate values for the parameter scaling<BR><BR><BR>If you continue having problems while fine tunning those parameters<BR>please post to the list the log output of the Command/Observer.<BR>From the plot of the Metric values and the Transform parameters at<BR>every iteration it is usually easier to figure out what parameters<BR>must be changed in your optimization setup.<BR><BR><BR><BR><BR>Please let us know if you have further questions,<BR><BR><BR><BR>Thanks,<BR><BR><BR><BR>Luis<BR><BR><BR><BR>---------------<BR>Mr Gaffe wrote:<BR><BR>&gt; Hi all,<BR>&gt; I try to combine registration example: ImageRegistration2 and 9 to <BR>&gt; perform an
 CenteredAffine+MutualInfo registration.<BR>&gt; The code bellow compile well, but when I try with: <BR>&gt; BrainT1SliceBorder20.png and BrainProtonDensitySliceR10X13Y17S12.png I <BR>&gt; have the following error:<BR>&gt; <BR>&gt; ---------------<BR>&gt; Initial Transform Parameters<BR>&gt; [1, 0, 0, 1, -1.00276e+008, -4.25387e+008, 4.90708e+007, 3.85172e+008]<BR>&gt; ExceptionObject caught !<BR>&gt; itk::ExceptionObject (00FCFD30)<BR>&gt; Location: "Unknown"<BR>&gt; File: <BR>&gt; D:\InsightToolkit-1.8.1\Code\Algorithms\itkMutualInformationImageToImageMetric.txx<BR>&gt; Line: 155<BR>&gt; Description: itk::ERROR: MutualInformationImageToImageMetric(012F4780): <BR>&gt; All the sampled point mapped to outside of the moving image<BR>&gt; -----------------<BR>&gt; <BR>&gt; -&gt;The Typedef is set to float since Images are unsigned chart is it the <BR>&gt; problem ?<BR>&gt; If I change the initialisation of the CenteredTransformInitializer as:<BR>&gt; initializer-&gt;SetFixedImage(
 fixedImageReader-&gt;GetOutput() );<BR>&gt; initializer-&gt;SetMovingImage( movingImageReader-&gt;GetOutput() );<BR>&gt; There is no error, but the after 9 iterations it stop with a wrong image <BR>&gt; results....<BR>&gt; <BR>&gt; Is it just a problem of initial typeddef for my fixed and moved image ?<BR>&gt; <BR>&gt; thanks,<BR>&gt; <BR>&gt; lagaffe<BR>&gt; <BR>&gt; ---------------------------------------------------------------------------------------------------------------------<BR>&gt; /*<BR>&gt; * Code from ImageRegistration2 and ImageRegistration9<BR>&gt; */<BR>&gt; #include "itkImageRegistrationMethod.h"<BR>&gt; //#include "itkMeanSquaresImageToImageMetric.h"<BR>&gt; #include "itkMutualInformationImageToImageMetric.h"<BR>&gt; #include "itkNormalizeImageFilter.h"<BR>&gt; #include "itkDiscreteGaussianImageFilter.h"<BR>&gt; #include "itkLinearInterpolateImageFunction.h"<BR>&gt; #include "itkRegularStepGradientDescentOptimizer.h"<BR>&gt; #include "itkImage.h"<BR>&gt; <BR>&gt;
 #include "itkCenteredTransformInitializer.h"<BR>&gt; #include "itkCenteredAffineTransform.h"<BR>&gt; #include "itkImageFileReader.h"<BR>&gt; #include "itkImageFileWriter.h"<BR>&gt; #include "itkResampleImageFilter.h"<BR>&gt; #include "itkCastImageFilter.h"<BR>&gt; #include "itkSquaredDifferenceImageFilter.h"<BR>&gt; #include "itkCommand.h"<BR>&gt; class CommandIterationUpdate : public itk::Command<BR>&gt; {<BR>&gt; public:<BR>&gt; typedef CommandIterationUpdate Self;<BR>&gt; typedef itk::Command Superclass;<BR>&gt; typedef itk::SmartPointer<SELF> Pointer;<BR>&gt; itkNewMacro( Self );<BR>&gt; protected:<BR>&gt; CommandIterationUpdate() {};<BR>&gt; public:<BR>&gt; typedef itk::RegularStepGradientDescentOptimizer OptimizerType;<BR>&gt; typedef const OptimizerType * OptimizerPointer;<BR>&gt; void Execute(itk::Object *caller, const itk::EventObject &amp; event)<BR>&gt; {<BR>&gt; Execute( (const itk::Object *)caller, event);<BR>&gt; }<BR>&gt; void Execute(const itk::Object * object, const
 itk::EventObject &amp; event)<BR>&gt; {<BR>&gt; OptimizerPointer optimizer =<BR>&gt; dynamic_cast&lt; OptimizerPointer &gt;( object );<BR>&gt; if( typeid( event ) != typeid( itk::IterationEvent ) )<BR>&gt; {<BR>&gt; return;<BR>&gt; }<BR>&gt; std::cout &lt;&lt; optimizer-&gt;GetCurrentIteration() &lt;&lt; " ";<BR>&gt; std::cout &lt;&lt; optimizer-&gt;GetValue() &lt;&lt; " ";<BR>&gt; std::cout &lt;&lt; optimizer-&gt;GetCurrentPosition() &lt;&lt; std::endl;<BR>&gt; }<BR>&gt; };<BR>&gt; <BR>&gt; int main( int argc, char *argv[] )<BR>&gt; {<BR>&gt; if( argc &lt; 4 )<BR>&gt; {<BR>&gt; std::cerr &lt;&lt; "Missing Parameters " &lt;&lt; std::endl;<BR>&gt; std::cerr &lt;&lt; "Usage: " &lt;&lt; argv[0];<BR>&gt; std::cerr &lt;&lt; " fixedImageFile movingImageFile " &lt;&lt; std::endl;<BR>&gt; std::cerr &lt;&lt; " outputImagefile [differenceOutputfile] <BR>&gt; [differenceBeforeRegistration] " &lt;&lt; std::endl;<BR>&gt; std::cerr &lt;&lt; " [stepLength] [maxNumberOfIterations] "&lt;&lt;
 std::endl;<BR>&gt; return 1;<BR>&gt; }<BR>&gt; const unsigned int Dimension = 2;<BR>&gt; typedef float PixelType;<BR>&gt; typedef float InternalPixelType;<BR>&gt; typedef itk::Image&lt; InternalPixelType, Dimension &gt; InternalImageType;<BR>&gt; typedef itk::Image&lt; PixelType, Dimension &gt; FixedImageType;<BR>&gt; typedef itk::Image&lt; PixelType, Dimension &gt; MovingImageType;<BR>&gt; <BR>&gt; typedef itk::CenteredAffineTransform&lt;<BR>&gt; double,<BR>&gt; Dimension &gt; TransformType;<BR>&gt; typedef itk::RegularStepGradientDescentOptimizer OptimizerType;<BR>&gt; /*<BR>&gt; typedef itk::MeanSquaresImageToImageMetric&lt;<BR>&gt; FixedImageType,<BR>&gt; MovingImageType &gt; MetricType;<BR>&gt; */<BR>&gt; typedef itk::MutualInformationImageToImageMetric&lt;<BR>&gt; InternalImageType,<BR>&gt; InternalImageType &gt; MetricType;<BR>&gt; typedef itk:: LinearInterpolateImageFunction&lt;<BR>&gt; MovingImageType,<BR>&gt; double &gt; InterpolatorType;<BR>&gt; typedef
 itk::ImageRegistrationMethod&lt;<BR>&gt; FixedImageType,<BR>&gt; MovingImageType &gt; RegistrationType;<BR>&gt; MetricType::Pointer metric = MetricType::New();<BR>&gt; OptimizerType::Pointer optimizer = OptimizerType::New();<BR>&gt; InterpolatorType::Pointer interpolator = InterpolatorType::New();<BR>&gt; RegistrationType::Pointer registration = RegistrationType::New();<BR>&gt; TransformType::Pointer transform = TransformType::New();<BR>&gt; <BR>&gt; registration-&gt;SetMetric( metric );<BR>&gt; registration-&gt;SetOptimizer( optimizer );<BR>&gt; registration-&gt;SetInterpolator( interpolator );<BR>&gt; registration-&gt;SetTransform( transform );<BR>&gt; metric-&gt;SetFixedImageStandardDeviation( 0.4 );<BR>&gt; metric-&gt;SetMovingImageStandardDeviation( 0.4 );<BR>&gt; metric-&gt;SetNumberOfSpatialSamples( 50 );<BR>&gt; typedef itk::ImageFileReader&lt; FixedImageType &gt; FixedImageReaderType;<BR>&gt; typedef itk::ImageFileReader&lt; MovingImageType &gt;
 MovingImageReaderType;<BR>&gt; FixedImageReaderType::Pointer fixedImageReader = <BR>&gt; FixedImageReaderType::New();<BR>&gt; MovingImageReaderType::Pointer movingImageReader = <BR>&gt; MovingImageReaderType::New();<BR>&gt; fixedImageReader-&gt;SetFileName( argv[1] );<BR>&gt; movingImageReader-&gt;SetFileName( argv[2] );<BR>&gt; typedef itk::NormalizeImageFilter&lt;<BR>&gt; FixedImageType,<BR>&gt; InternalImageType<BR>&gt; &gt; FixedNormalizeFilterType;<BR>&gt; typedef itk::NormalizeImageFilter&lt;<BR>&gt; MovingImageType,<BR>&gt; InternalImageType<BR>&gt; &gt; MovingNormalizeFilterType;<BR>&gt; FixedNormalizeFilterType::Pointer fixedNormalizer =<BR>&gt; FixedNormalizeFilterType::New();<BR>&gt; MovingNormalizeFilterType::Pointer movingNormalizer =<BR>&gt; <BR>&gt; MovingNormalizeFilterType::New();<BR>&gt; <BR>&gt; typedef itk::DiscreteGaussianImageFilter&lt;<BR>&gt; InternalImageType,<BR>&gt; InternalImageType<BR>&gt; &gt; GaussianFilterType;<BR>&gt; <BR>&gt;
 GaussianFilterType::Pointer fixedSmoother = GaussianFilterType::New();<BR>&gt; GaussianFilterType::Pointer movingSmoother = GaussianFilterType::New();<BR>&gt; fixedSmoother-&gt;SetVariance( 2.0 );<BR>&gt; movingSmoother-&gt;SetVariance( 2.0 );<BR>&gt; <BR>&gt; fixedNormalizer-&gt;SetInput( fixedImageReader-&gt;GetOutput() );<BR>&gt; movingNormalizer-&gt;SetInput( movingImageReader-&gt;GetOutput() );<BR>&gt; fixedSmoother-&gt;SetInput( fixedNormalizer-&gt;GetOutput() );<BR>&gt; movingSmoother-&gt;SetInput( movingNormalizer-&gt;GetOutput() );<BR>&gt; registration-&gt;SetFixedImage( fixedSmoother-&gt;GetOutput() );<BR>&gt; registration-&gt;SetMovingImage( movingSmoother-&gt;GetOutput() );<BR>&gt; <BR>&gt; fixedNormalizer-&gt;Update();<BR>&gt; registration-&gt;SetFixedImageRegion(<BR>&gt; fixedNormalizer-&gt;GetOutput()-&gt;GetBufferedRegion() );<BR>&gt; <BR>&gt; typedef itk::CenteredTransformInitializer&lt;<BR>&gt; TransformType,<BR>&gt; FixedImageType,<BR>&gt; MovingImageType &gt;
 <BR>&gt; TransformInitializerType;<BR>&gt; TransformInitializerType::Pointer initializer = <BR>&gt; TransformInitializerType::New();<BR>&gt; initializer-&gt;SetTransform( transform );<BR>&gt; /*<BR>&gt; initializer-&gt;SetFixedImage( fixedImageReader-&gt;GetOutput() );<BR>&gt; initializer-&gt;SetMovingImage( movingImageReader-&gt;GetOutput() );<BR>&gt; */<BR>&gt; <BR>&gt; initializer-&gt;SetFixedImage( fixedSmoother-&gt;GetOutput() );<BR>&gt; initializer-&gt;SetMovingImage( movingSmoother-&gt;GetOutput() );<BR>&gt; initializer-&gt;MomentsOn();<BR>&gt; initializer-&gt;InitializeTransform();<BR>&gt; std::cout &lt;&lt; "Initial Transform Parameters " &lt;&lt; std::endl;<BR>&gt; std::cout &lt;&lt; transform-&gt;GetParameters() &lt;&lt; std::endl;<BR>&gt; <BR>&gt; // -----------------------<BR>&gt; registration-&gt;SetInitialTransformParameters(<BR>&gt; transform-&gt;GetParameters() );<BR>&gt; <BR>&gt; double translationScale = 1.0 / 1000.0;<BR>&gt; if( argc &gt; 8 )<BR>&gt; {<BR>&gt;
 translationScale = atof( argv[8] );<BR>&gt; }<BR>&gt; typedef OptimizerType::ScalesType OptimizerScalesType;<BR>&gt; OptimizerScalesType optimizerScales( transform-&gt;GetNumberOfParameters() );<BR>&gt; optimizerScales[0] = 1.0;<BR>&gt; optimizerScales[1] = 1.0;<BR>&gt; optimizerScales[2] = 1.0;<BR>&gt; optimizerScales[3] = 1.0;<BR>&gt; optimizerScales[4] = translationScale;<BR>&gt; optimizerScales[5] = translationScale;<BR>&gt; optimizerScales[6] = translationScale;<BR>&gt; optimizerScales[7] = translationScale;<BR>&gt; optimizer-&gt;SetScales( optimizerScales );<BR>&gt; double steplength = 0.1;<BR>&gt; if( argc &gt; 6 )<BR>&gt; {<BR>&gt; steplength = atof( argv[6] );<BR>&gt; }<BR>&gt; <BR>&gt; unsigned int maxNumberOfIterations = 300;<BR>&gt; if( argc &gt; 7 )<BR>&gt; {<BR>&gt; maxNumberOfIterations = atoi( argv[7] );<BR>&gt; }<BR>&gt; optimizer-&gt;SetMaximumStepLength( steplength );<BR>&gt; optimizer-&gt;SetMinimumStepLength( 0.001 );<BR>&gt; optimizer-&gt;SetNumberOfIterations(
 maxNumberOfIterations );<BR>&gt; optimizer-&gt;MinimizeOn();<BR>&gt; CommandIterationUpdate::Pointer observer = CommandIterationUpdate::New();<BR>&gt; optimizer-&gt;AddObserver( itk::IterationEvent(), observer );<BR>&gt; try<BR>&gt; {<BR>&gt; registration-&gt;StartRegistration();<BR>&gt; }<BR>&gt; catch( itk::ExceptionObject &amp; err )<BR>&gt; {<BR>&gt; std::cerr &lt;&lt; "ExceptionObject caught !" &lt;&lt; std::endl;<BR>&gt; std::cerr &lt;&lt; err &lt;&lt; std::endl;<BR>&gt; return -1;<BR>&gt; }<BR>&gt; OptimizerType::ParametersType finalParameters =<BR>&gt; registration-&gt;GetLastTransformParameters();<BR>&gt; const double finalRotationCenterX = finalParameters[4];<BR>&gt; const double finalRotationCenterY = finalParameters[5];<BR>&gt; const double finalTranslationX = finalParameters[6];<BR>&gt; const double finalTranslationY = finalParameters[7];<BR>&gt; const unsigned int numberOfIterations = optimizer-&gt;GetCurrentIteration();<BR>&gt; const double bestValue =
 optimizer-&gt;GetValue();<BR>&gt; // Software Guide : EndCodeSnippet<BR>&gt; <BR>&gt; // Print out results<BR>&gt; //<BR>&gt; std::cout &lt;&lt; "Result = " &lt;&lt; std::endl;<BR>&gt; std::cout &lt;&lt; " Center X = " &lt;&lt; finalRotationCenterX &lt;&lt; std::endl;<BR>&gt; std::cout &lt;&lt; " Center Y = " &lt;&lt; finalRotationCenterY &lt;&lt; std::endl;<BR>&gt; std::cout &lt;&lt; " Translation X = " &lt;&lt; finalTranslationX &lt;&lt; std::endl;<BR>&gt; std::cout &lt;&lt; " Translation Y = " &lt;&lt; finalTranslationY &lt;&lt; std::endl;<BR>&gt; std::cout &lt;&lt; " Iterations = " &lt;&lt; numberOfIterations &lt;&lt; std::endl;<BR>&gt; std::cout &lt;&lt; " Metric value = " &lt;&lt; bestValue &lt;&lt; std::endl;<BR>&gt; typedef itk::ResampleImageFilter&lt;<BR>&gt; MovingImageType,<BR>&gt; FixedImageType &gt; ResampleFilterType;<BR>&gt; TransformType::Pointer finalTransform = TransformType::New();<BR>&gt; finalTransform-&gt;SetParameters( finalParameters );<BR>&gt;
 ResampleFilterType::Pointer resample = ResampleFilterType::New();<BR>&gt; resample-&gt;SetTransform( finalTransform );<BR>&gt; resample-&gt;SetInput( movingImageReader-&gt;GetOutput() );<BR>&gt; FixedImageType::Pointer fixedImage = fixedImageReader-&gt;GetOutput();<BR>&gt; resample-&gt;SetSize( fixedImage-&gt;GetLargestPossibleRegion().GetSize() );<BR>&gt; resample-&gt;SetOutputOrigin( fixedImage-&gt;GetOrigin() );<BR>&gt; resample-&gt;SetOutputSpacing( fixedImage-&gt;GetSpacing() );<BR>&gt; resample-&gt;SetDefaultPixelValue( 100 );<BR>&gt; <BR>&gt; typedef unsigned char OutputPixelType;<BR>&gt; typedef itk::Image&lt; OutputPixelType, Dimension &gt; OutputImageType;<BR>&gt; <BR>&gt; typedef itk::CastImageFilter&lt;<BR>&gt; FixedImageType,<BR>&gt; OutputImageType &gt; CastFilterType;<BR>&gt; <BR>&gt; typedef itk::ImageFileWriter&lt; OutputImageType &gt; WriterType;<BR>&gt; <BR>&gt; WriterType::Pointer writer = WriterType::New();<BR>&gt; CastFilterType::Pointer caster =
 CastFilterType::New();<BR>&gt; <BR>&gt; writer-&gt;SetFileName( argv[3] );<BR>&gt; <BR>&gt; caster-&gt;SetInput( resample-&gt;GetOutput() );<BR>&gt; writer-&gt;SetInput( caster-&gt;GetOutput() );<BR>&gt; writer-&gt;Update();<BR>&gt; <BR>&gt; typedef itk::SquaredDifferenceImageFilter&lt;<BR>&gt; FixedImageType,<BR>&gt; FixedImageType,<BR>&gt; OutputImageType &gt; DifferenceFilterType;<BR>&gt; DifferenceFilterType::Pointer difference = DifferenceFilterType::New();<BR>&gt; WriterType::Pointer writer2 = WriterType::New();<BR>&gt; writer2-&gt;SetInput( difference-&gt;GetOutput() ); <BR>&gt; <BR>&gt; if( argc &gt; 4 )<BR>&gt; {<BR>&gt; difference-&gt;SetInput1( fixedImageReader-&gt;GetOutput() );<BR>&gt; difference-&gt;SetInput2( resample-&gt;GetOutput() );<BR>&gt; writer2-&gt;SetFileName( argv[4] );<BR>&gt; writer2-&gt;Update();<BR>&gt; }<BR>&gt; <BR>&gt; if( argc &gt; 5 )<BR>&gt; {<BR>&gt; writer2-&gt;SetFileName( argv[5] );<BR>&gt; difference-&gt;SetInput1(
 fixedImageReader-&gt;GetOutput() );<BR>&gt; difference-&gt;SetInput2( movingImageReader-&gt;GetOutput() );<BR>&gt; writer2-&gt;Update();<BR>&gt; }<BR>&gt; <BR>&gt; return 0;<BR>&gt; }<BR>&gt; <BR>&gt; <BR>&gt; ------------------------------------------------------------------------<BR>&gt; Créez gratuitement votre Yahoo! Mail avec *100 Mo de stockage !*<BR>&gt; Créez votre Yahoo! Mail <BR>&gt; <HTTP: evt="25917/*http://fr.rd.yahoo.com/mail/mail_taglines_100/default/*http://fr.benefits.yahoo.com/" fr.rd.yahoo.com *http: taglines mail><BR>&gt; <BR>&gt; *Le nouveau Yahoo! Messenger est arrivé !* Découvrez toutes les <BR>&gt; nouveautés pour dialoguer instantanément avec vos amis. Téléchargez <BR>&gt; GRATUITEMENT ici ! <BR>&gt; <HTTP: evt="26111/*http://fr.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com" fr.rd.yahoo.com *http: taglines mail><BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; ------------------------------------------------------------------------<BR>&gt;
 <BR>&gt; _______________________________________________<BR>&gt; Insight-users mailing list<BR>&gt; Insight-users@itk.org<BR>&gt; http://www.itk.org/mailman/listinfo/insight-users<BR><BR><BR><BR><BR></BLOCKQUOTE><p>
                <hr size=1>
Créez gratuitement votre Yahoo! Mail avec <font color="red"><b>100 Mo de stockage !</b></font>
<br><a href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/evt=25917/*http://fr.rd.yahoo.com/mail/mail_taglines_100/default/*http://fr.benefits.yahoo.com/">Créez votre Yahoo! Mail</a><br><br>
<font color="red"><b>Le nouveau Yahoo! Messenger est arrivé !</b></font> Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis.
<a href="http://fr.rd.yahoo.com/mail/taglines/*http://fr.rd.yahoo.com/evt=26111/*http://fr.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com">Téléchargez GRATUITEMENT ici !</a>