00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __freClosedFormRegistrationProcessor_h
00023 #define __freClosedFormRegistrationProcessor_h
00024
00025 #include "freRegistrationProcessorBase.h"
00026 #include "freControllerCentral.h"
00027 #include "freRegistrationObserver.h"
00028 #include "freTransformFunctionMedia.h"
00029 #include "freTransformBasedRegistrationProcessorInterface.h"
00030
00031 #include "itkMatrixOffsetTransformBase.h"
00032 #include "itkHistogramMatchingImageFilter.h"
00033
00034 namespace FREE
00035 {
00036
00037 template <unsigned int VImageDimension>
00038 class ClosedFormRegistrationProcessor
00039 : public RegistrationProcessorBase<VImageDimension>,
00040 public TransformBasedRegistrationProcessorInterface< itk::MatrixOffsetTransformBase<ScalarType, VImageDimension, VImageDimension>, VImageDimension >
00041 {
00042 public:
00044 typedef ClosedFormRegistrationProcessor<VImageDimension> Self;
00045 typedef RegistrationProcessorBase<VImageDimension> Superclass;
00046 typedef itk::SmartPointer<Self> Pointer;
00047 typedef itk::SmartPointer<const Self> ConstPointer;
00048
00050 itkTypeMacro( ClosedFormRegistrationProcessor, RegistrationProcessorBase );
00051 itkNewMacro(Self);
00052
00053 itkStaticConstMacro(PointSetDimension, unsigned int, VImageDimension);
00054
00055 typedef typename Superclass::PointType PointType;
00056 typedef typename ImageTypes<VImageDimension>::PointSetType PointSetType;
00057 typedef typename PointSetType::Pointer PointSetPointer;
00058
00060 typedef typename itk::MatrixOffsetTransformBase<ScalarType, VImageDimension, VImageDimension> TransformType;
00061 typedef typename TransformType::Pointer TransformPointer;
00062
00063 typedef TransformBasedRegistrationProcessorInterface< TransformType, VImageDimension > TransformInterface;
00064
00065 typedef typename Superclass::RegionType RegionType;
00066 typedef typename Superclass::SpacingType SpacingType;
00067 typedef typename Superclass::ImageType ImageType;
00068 typedef typename Superclass::ImagePointer ImagePointer;
00069
00070 typedef typename TransformInterface::TransformFieldType TransformFieldType;
00071 typedef typename TransformInterface::TransformFieldPointer TransformFieldPointer;
00072 typedef typename TransformInterface::TransformParametersType TransformParametersType;
00073 typedef typename TransformInterface::TransformFunctionMediaType TransformFunctionMediaType;
00074 typedef typename TransformInterface::TransformFunctionMediaPointer TransformFunctionMediaPointer;
00075
00076 itkGetObjectMacro(MovingPointSet,PointSetType);
00077 itkSetObjectMacro(MovingPointSet,PointSetType);
00078
00079 itkGetObjectMacro(FixedPointSet,PointSetType);
00080 itkSetObjectMacro(FixedPointSet,PointSetType);
00081
00082 virtual const long GetMaxIterationCount() const;
00083
00084 using TransformInterface::GetTransformationFunction;
00090 TransformFunctionMediaPointer GetTransformationFunction();
00091
00092 using TransformInterface::GetInverseTransformationFunction;
00099 TransformFunctionMediaPointer GetInverseTransformationFunction();
00100
00101 protected:
00102 ClosedFormRegistrationProcessor();
00103
00104 virtual ~ClosedFormRegistrationProcessor();
00105
00106 virtual void ReleaseInputs();
00107
00108 virtual void ComputeRegistration();
00109
00111 virtual bool TransformationIsValid () const;
00112
00114 virtual void NotifyProgress(const RegistrationStatusType status, const std::string& sComment);
00115
00116 virtual TransformFieldPointer ComputeTransformationField(const PointType& origin,
00117 const RegionType& region,
00118 const SpacingType& spacing);
00119
00121 PointSetPointer m_FixedPointSet;
00123 PointSetPointer m_MovingPointSet;
00124 };
00125
00129 typedef ClosedFormRegistrationProcessor<2> ClosedFormRegistrationProcessor2D;
00131 typedef ClosedFormRegistrationProcessor<3> ClosedFormRegistrationProcessor3D;
00132
00133
00134 }
00135
00136 #ifndef ITK_MANUAL_INSTANTIATION
00137 #include "freClosedFormRegistrationProcessor.txx"
00138 #endif
00139
00140 #endif