18 #ifndef itkImageRegistrationMethodImageSource_h
19 #define itkImageRegistrationMethodImageSource_h
40 template<
typename TFixedPixelType,
41 typename TMovingPixelType,
42 unsigned int NDimension >
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) );
void SetSize(const SizeType &size)
itk::Image< TMovingPixelType, NDimension > MovingImageType
OptimizerParameters< double > ParametersType
Light weight base class for most itk classes.
Represent the size (bounds) of a n-dimensional image.
MovingImageType::Pointer m_MovingImage
ImageRegistrationMethodImageSource Self
An image region represents a structured region of data.
const FixedImageType * GetFixedImage(void) const
ObjectType * GetPointer() const
const ParametersType & GetActualParameters(void) const
void GenerateImages(const typename MovingImageType::SizeType &size)
A templated class holding a n-Dimensional vector.
SmartPointer< Self > Pointer
itk::Image< TFixedPixelType, NDimension > FixedImageType
A multi-dimensional iterator templated over image type that walks pixels within a region and is speci...
const MovingImageType * GetMovingImage(void) const
void Fill(IndexValueType value)
const SizeType & GetSize() const
SmartPointer< const Self > ConstPointer
ImageRegistrationMethodImageSource()
Base class for most ITK classes.
FixedImageType::Pointer m_FixedImage
ParametersType m_Parameters
void SetIndex(const IndexType &index)
Templated n-dimensional image class.