Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkBSplineFreeFormTransform.h

00001 /*=========================================================================
00002 
00003   Program:   3DMed
00004   Date:      $Date: 2014-02-25 18:30:00 +0800 $
00005   Version:   $Version: 4.6.0 $
00006   Copyright: MIPG, Institute of Automation, Chinese Academy of Sciences
00007 
00008 =========================================================================*/
00009 
00010 
00011 #ifndef __mitkBSplineFreeFormTransform_h
00012 #define __mitkBSplineFreeFormTransform_h
00013 
00014 #include "mitkTransform.h"
00015 #include "mitkVolumeIterator.h"
00016 
00017 #define MITK_BSPLINEFFD_PARAMETER_COPY_RULE 0   //0 for shadow copy, 1 for deep copy
00018 
00019 
00020 class mitkBSplineInterpolationFunction;
00021 class mitkBSplineLatticeImage;
00022 
00023 class MITK_REGISTRATION_API mitkBSplineFreeFormTransform : public mitkTransform
00024 {
00025 public:
00026     MITK_TYPE(mitkBSplineFreeFormTransform, mitkTransform)  
00027     virtual void PrintSelf(ostream &os);
00028 
00029     mitkBSplineFreeFormTransform();
00030 
00031     mitkBSplineFreeFormTransform(unsigned int dim);
00032 
00033     virtual bool Update();
00034 
00039     virtual void SetParameters(const VectorParameterType& parameters);
00040 
00046     const MatrixType & GetJacobian(const VectorParameterType& inPoint);
00047 
00048     void SetLatticeImage(mitkBSplineLatticeImage* image);
00049 
00050     void SetLatticeDimensions(const VectorIndexType& dim);
00051 
00052     void SetLatticeSpacings(const VectorParameterType& spacing);
00053 
00054     void SetLatticeOrigins(const VectorParameterType& origin);
00055 
00056     void AutoConfigureBSplineLattice(int latticeSize, mitkVolume* image);
00057 
00058 protected:
00059     virtual ~mitkBSplineFreeFormTransform();    
00060     void _init();
00061     virtual void _transform(const ScalarParameterType* inPoint, ScalarParameterType* outPoint);
00062     bool IsInsideLatticeRegion( const VectorParameterType& index ) const;
00063 
00064     mitkBSplineInterpolationFunction*   m_KernelFunction;
00065     VectorIndexType                     m_KernelSize;
00066     VectorIndexType                     m_ValidRegion;
00067     VectorIndexType                     m_LastJacobianIndex;
00068 
00069     unsigned int                        m_BSplineOrder;
00070     unsigned int                        m_NumberOfControlPoints;
00071 
00072     mitkBSplineLatticeImage*            m_LatticeImage[3];
00073     mitkBSplineLatticeImage*            m_JacobianImage[3];
00074 
00075     mitkVolumeIterator<ScalarParameterType>     m_LatticeImageIterator[3];
00076     mitkVolumeIterator<ScalarParameterType>     m_JacobianImageIterator[3];
00077 
00078     VectorIndexType                     m_LatticeDimensions;
00079     VectorParameterType                 m_LatticeSpacings;
00080     VectorParameterType                 m_LatticeOrigins;
00081 
00082     bool                                m_FlagLatticeImage;
00083 
00084     // Local Temporary Variables
00085     VectorParameterType                 weights;
00086     VectorIndexType                     supportRegion;
00087     VectorParameterType                 index;
00088     VectorIndexType                     supportIndex;
00089 
00090 
00091 private:
00092     mitkBSplineFreeFormTransform(const mitkBSplineFreeFormTransform&);
00093     void operator = (const mitkBSplineFreeFormTransform&);
00094 
00095 };
00096 
00097 
00098 //#define DEFINED_mitkBSplineFreeFormTransform
00099 
00100 
00101 
00102 #endif
00103 

Generated on Tue Feb 25 15:00:36 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3