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 * std::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 * std::exp( - ( x*x + y*y )/(s*s) );
142 ti.Set( static_cast<typename FixedImageType::PixelType>(value) );
Light weight base class for most itk classes.
const MovingImageType * GetMovingImage() const
const ParametersType & GetActualParameters() const
MovingImageType::Pointer m_MovingImage
const FixedImageType * GetFixedImage() const
ObjectType * GetPointer() const noexcept
void GenerateImages(const typename MovingImageType::SizeType &size)
A templated class holding a n-Dimensional vector.
OptimizerParameters< double > ParametersType
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
typename Superclass::RegionType RegionType
typename Superclass::SizeType SizeType
typename Superclass::IndexType IndexType
ImageRegistrationMethodImageSource()
Base class for most ITK classes.
FixedImageType::Pointer m_FixedImage
ParametersType m_Parameters
Templated n-dimensional image class.