freClosedFormRegistrationProcessor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002  
00003   Program:   F.R.E.E. - flexible registration evaluation engine
00004   Version:   v.1.0.0
00005   Date:      $Date: 2006/09/01 12:00:00 $
00006   Module:    $RCSfile: freClosedFormRegistrationProcessor.h,v $
00007   Language:  C++
00008  
00009  
00010  
00011   Copyright (c) 2007 Ralf o Floca (Department of Medical Informatics,
00012   Institute for Medical Biometry and Informatics, University of Heidelberg,
00013   Germany). All rights reserved.
00014   See FREECopyright.txt or http://www.mi.med.uni-hd.de/free/copyright.htm
00015   for details.
00016  
00017      This software is distributed WITHOUT ANY WARRANTY; without even 
00018      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00019      PURPOSE.  See the above copyright notices for more information.
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 }//End of Namespace free
00135 
00136 #ifndef ITK_MANUAL_INSTANTIATION
00137 #include "freClosedFormRegistrationProcessor.txx"
00138 #endif
00139 
00140 #endif

Generated at Sat Oct 13 15:38:38 2007 for f.r.e.e. - Flexible Registration and Evaluation Engine by doxygen 1.5.3 written by Dimitri van Heesch, © 1997-2000