18 #ifndef itkImageToImageRegistrationHelper_h 19 #define itkImageToImageRegistrationHelper_h 22 #include "itkCommand.h" 34 template <
class TImage>
57 TImage::ImageDimension );
146 void SaveImage(
const std::string filename,
const TImage * image );
213 ::LINEAR_INTERPOLATION,
const TImage * movingImage = NULL,
220 ::LINEAR_INTERPOLATION );
235 itkSetMacro( BaselineNumberOfFailedPixelsTolerance,
unsigned int );
237 itkSetMacro( BaselineRadiusTolerance,
unsigned int );
246 itkGetMacro( BaselineNumberOfFailedPixels,
unsigned int );
282 itkSetMacro( ExpectedOffsetPixelMagnitude,
double );
412 itkSetMacro( BSplineControlPointPixelSpacing,
double );
431 void PrintSelf( std::ostream & os, Indent indent )
const ITK_OVERRIDE;
438 LandmarkPointContainer;
441 void operator =(
const Self & );
444 typename TImage::ConstPointer m_FixedImage;
445 typename TImage::ConstPointer m_MovingImage;
447 bool m_SampleFromOverlap;
448 double m_SampleIntensityPortion;
450 bool m_UseFixedImageMaskObject;
451 typename MaskObjectType::ConstPointer m_FixedImageMaskObject;
452 bool m_UseMovingImageMaskObject;
453 typename MaskObjectType::ConstPointer m_MovingImageMaskObject;
455 bool m_UseRegionOfInterest;
459 unsigned int m_RandomNumberSeed;
462 bool m_EnableLoadedRegistration;
463 bool m_EnableInitialRegistration;
464 bool m_EnableRigidRegistration;
465 bool m_EnableAffineRegistration;
466 bool m_EnableBSplineRegistration;
468 double m_ExpectedOffsetPixelMagnitude;
469 double m_ExpectedRotationMagnitude;
470 double m_ExpectedScaleMagnitude;
471 double m_ExpectedSkewMagnitude;
473 bool m_CompletedInitialization;
475 bool m_CompletedResampling;
477 typename TImage::ConstPointer m_CurrentMovingImage;
478 typename MatrixTransformType::Pointer m_CurrentMatrixTransform;
479 typename BSplineTransformType::Pointer m_CurrentBSplineTransform;
481 typename TImage::ConstPointer m_LoadedTransformResampledImage;
482 typename TImage::ConstPointer m_MatrixTransformResampledImage;
483 typename TImage::ConstPointer m_BSplineTransformResampledImage;
485 double m_FinalMetricValue;
487 typename TImage::ConstPointer m_BaselineImage;
488 unsigned int m_BaselineNumberOfFailedPixelsTolerance;
490 unsigned int m_BaselineRadiusTolerance;
491 typename TImage::ConstPointer m_BaselineResampledMovingImage;
492 typename TImage::ConstPointer m_BaselineDifferenceImage;
493 unsigned int m_BaselineNumberOfFailedPixels;
494 bool m_BaselineTestPassed;
496 bool m_ReportProgress;
497 bool m_MinimizeMemory;
500 typename MatrixTransformType::Pointer m_LoadedMatrixTransform;
501 typename BSplineTransformType::Pointer m_LoadedBSplineTransform;
505 typename InitialTransformType::Pointer m_InitialTransform;
506 LandmarkPointContainer m_FixedLandmarks;
507 LandmarkPointContainer m_MovingLandmarks;
510 double m_RigidSamplingRatio;
511 double m_RigidTargetError;
512 unsigned int m_RigidMaxIterations;
514 typename RigidTransformType::Pointer m_RigidTransform;
518 double m_RigidMetricValue;
521 double m_AffineSamplingRatio;
522 double m_AffineTargetError;
523 unsigned int m_AffineMaxIterations;
525 typename AffineTransformType::Pointer m_AffineTransform;
529 double m_AffineMetricValue;
532 double m_BSplineSamplingRatio;
533 double m_BSplineTargetError;
534 unsigned int m_BSplineMaxIterations;
535 double m_BSplineControlPointPixelSpacing;
537 typename BSplineTransformType::Pointer m_BSplineTransform;
541 double m_BSplineMetricValue;
547 #ifndef ITK_MANUAL_INSTANTIATION 548 #include "itkImageToImageRegistrationHelper.txx"
AffineTransformType MatrixTransformType
void SetFixedLandmarks(const LandmarkVectorType &fixedLandmarks)
OptimizedImageToImageRegistrationMethod< TImage > OptimizedRegistrationMethodType
void SetLoadedBSplineTransform(const BSplineTransformType &tfm)
void LoadParameters(const std::string filename)
itkGetConstObjectMacro(FixedImage, TImage)
void SaveImage(const std::string filename, const TImage *image)
void ComputeBaselineDifference(void)
RigidRegistrationMethodType::TransformType RigidTransformType
void SaveParameters(const std::string filename)
void SetMovingLandmarks(const LandmarkVectorType &movingLandmarks)
Simplified inverse ITK transforms.
ImageToImageRegistrationHelper Self
itkTypeMacro(ImageToImageRegistrationHelper, Object)
virtual ~ImageToImageRegistrationHelper(void)
RigidTransformType TransformType
BSplineImageToImageRegistrationMethod< TImage > BSplineRegistrationMethodType
TImage::PixelType PixelType
void LoadBaselineImage(const std::string filename)
AffineTransform< double, itkGetStaticConstMacro(ImageDimension)> TransformType
RegistrationMethodType::MaskObjectType MaskObjectType
OptimizedRegistrationMethodType::InterpolationMethodEnumType InterpolationMethodEnumType
OptimizedRegistrationMethodType::MetricMethodEnumType MetricMethodEnumType
std::vector< LandmarkPointType > LandmarkPointContainer
void SetMovingImageMaskObject(const MaskObjectType *mask)
void LoadFixedImage(const std::string filename)
void SetLoadedMatrixTransform(const MatrixTransformType &tfm)
AffineTransformType TransformType
RegistrationStageEnumType
SmartPointer< Self > Pointer
ImageToImageRegistrationHelper(void)
TImage::ConstPointer ResampleImage(InterpolationMethodEnumType interp=OptimizedRegistrationMethodType ::LINEAR_INTERPOLATION, const TImage *movingImage=NULL, const MatrixTransformType *matrixTransform=NULL, const BSplineTransformType *bsplineTransform=NULL, PixelType defaultPixelValue=0)
ImageToImageRegistrationMethod< TImage > RegistrationMethodType
void LoadMovingImage(const std::string filename)
InitialRegistrationMethodType::TransformType InitialTransformType
Point< double, itkGetStaticConstMacro(ImageDimension)> LandmarkPointType
AffineRegistrationMethodType::TransformType AffineTransformType
SmartPointer< const Self > ConstPointer
InterpolationMethodEnumType
itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension)
itkSetConstObjectMacro(FixedImage, TImage)
BSplineTransformType TransformType
void SaveTransform(const std::string filename)
AffineImageToImageRegistrationMethod< TImage > AffineRegistrationMethodType
TImage::ConstPointer GetFinalMovingImage(InterpolationMethodEnumType interp=OptimizedRegistrationMethodType ::LINEAR_INTERPOLATION)
std::vector< std::vector< float > > LandmarkVectorType
itkSetMacro(RandomNumberSeed, unsigned int)
void SetRegionOfInterest(const PointType &point1, const PointType &point2)
SpatialObject< itkGetStaticConstMacro(ImageDimension)> MaskObjectType
itkGetConstMacro(UseFixedImageMaskObject, bool)
void LoadTransform(const std::string filename)
RigidImageToImageRegistrationMethod< TImage > RigidRegistrationMethodType
itkBooleanMacro(UseFixedImageMaskObject)
BSplineRegistrationMethodType::TransformType BSplineTransformType
itkGetMacro(RandomNumberSeed, unsigned int)
void SetFixedImageMaskObject(const MaskObjectType *mask)
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
TImage::PointType PointType
void PrintSelfHelper(std::ostream &os, Indent indent, const std::string basename, MetricMethodEnumType metric, InterpolationMethodEnumType interpolation) const
InitialImageToImageRegistrationMethod< TImage > InitialRegistrationMethodType