18 #ifndef __itkImageRegistrationMethodImageSource_h
19 #define __itkImageRegistrationMethodImageSource_h
40 template<
typename TFixedPixelType,
41 typename TMovingPixelType,
42 unsigned int NDimension >
84 region.SetSize( size );
85 region.SetIndex( index );
104 center[0] = (double)region.GetSize()[0]/2.0;
105 center[1] = (double)region.GetSize()[1]/2.0;
107 const double s = (double)region.GetSize()[0]/2.0;
122 p[0] = ri.GetIndex()[0];
123 p[1] = ri.GetIndex()[1];
126 const double x = d[0];
127 const double y = d[1];
128 const double value = 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) );
129 ri.Set( static_cast<typename MovingImageType::PixelType>(value) );
136 p[0] = ti.GetIndex()[0];
137 p[1] = ti.GetIndex()[1];
139 const double x = d[0];
140 const double y = d[1];
141 const double value = 200.0 * vcl_exp( - ( x*x + y*y )/(s*s) );
142 ti.Set( static_cast<typename FixedImageType::PixelType>(value) );