Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef __itkAdvancedTransform_h
00032 #define __itkAdvancedTransform_h
00033
00034 #include "itkTransform.h"
00035 #include "itkMatrix.h"
00036 #include "itkFixedArray.h"
00037
00038 namespace itk
00039 {
00040
00079 template <class TScalarType,
00080 unsigned int NInputDimensions = 3,
00081 unsigned int NOutputDimensions = 3>
00082 class ITK_EXPORT AdvancedTransform
00083 : public Transform< TScalarType, NInputDimensions, NOutputDimensions >
00084 {
00085 public:
00087 typedef AdvancedTransform Self;
00088 typedef Transform< TScalarType,
00089 NInputDimensions,
00090 NOutputDimensions > Superclass;
00091 typedef SmartPointer< Self > Pointer;
00092 typedef SmartPointer< const Self > ConstPointer;
00093
00095 itkNewMacro( Self );
00096
00098 itkTypeMacro( AdvancedTransform, Transform );
00099
00101 itkStaticConstMacro( InputSpaceDimension, unsigned int, NInputDimensions );
00102 itkStaticConstMacro( OutputSpaceDimension, unsigned int, NOutputDimensions );
00103
00105 typedef typename Superclass::ScalarType ScalarType;
00106 typedef typename Superclass::ParametersType ParametersType;
00107 typedef typename Superclass::JacobianType JacobianType;
00108 typedef typename Superclass::InputVectorType InputVectorType;
00109 typedef typename Superclass::OutputVectorType OutputVectorType;
00110 typedef typename Superclass
00111 ::InputCovariantVectorType InputCovariantVectorType;
00112 typedef typename Superclass
00113 ::OutputCovariantVectorType OutputCovariantVectorType;
00114 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00115 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00116 typedef typename Superclass::InputPointType InputPointType;
00117 typedef typename Superclass::OutputPointType OutputPointType;
00118
00123 typedef std::vector< unsigned long > NonZeroJacobianIndicesType;
00124 typedef Matrix< ScalarType,
00125 OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType;
00126 typedef std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType;
00127
00128 typedef FixedArray<
00129 Matrix< ScalarType,
00130 InputSpaceDimension, InputSpaceDimension >,
00131 OutputSpaceDimension > SpatialHessianType;
00132 typedef std::vector< SpatialHessianType > JacobianOfSpatialHessianType;
00133 typedef typename SpatialJacobianType::InternalMatrixType InternalMatrixType;
00134
00136 virtual unsigned long GetNumberOfNonZeroJacobianIndices( void ) const;
00137
00139 itkGetConstMacro( HasNonZeroSpatialHessian, bool );
00140 itkGetConstMacro( HasNonZeroJacobianOfSpatialHessian, bool );
00141
00168 virtual void GetJacobian(
00169 const InputPointType & ipp,
00170 JacobianType & j,
00171 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
00172
00177 virtual const JacobianType & GetJacobian( const InputPointType & ) const;
00178
00205 virtual void GetSpatialJacobian(
00206 const InputPointType & ipp,
00207 SpatialJacobianType & sj ) const;
00208
00225 virtual void GetSpatialHessian(
00226 const InputPointType & ipp,
00227 SpatialHessianType & sh ) const;
00228
00235 virtual void GetJacobianOfSpatialJacobian(
00236 const InputPointType & ipp,
00237 JacobianOfSpatialJacobianType & jsj,
00238 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
00239
00243 virtual void GetJacobianOfSpatialJacobian(
00244 const InputPointType & ipp,
00245 SpatialJacobianType & sj,
00246 JacobianOfSpatialJacobianType & jsj,
00247 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
00248
00255 virtual void GetJacobianOfSpatialHessian(
00256 const InputPointType & ipp,
00257 JacobianOfSpatialHessianType & jsh,
00258 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
00259
00263 virtual void GetJacobianOfSpatialHessian(
00264 const InputPointType & ipp,
00265 SpatialHessianType & sh,
00266 JacobianOfSpatialHessianType & jsh,
00267 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
00268
00269 protected:
00270 AdvancedTransform();
00271 AdvancedTransform( unsigned int Dimension, unsigned int NumberOfParameters );
00272 virtual ~AdvancedTransform() {};
00273
00274 bool m_HasNonZeroSpatialHessian;
00275 bool m_HasNonZeroJacobianOfSpatialHessian;
00276
00277 private:
00278
00279 AdvancedTransform(const Self&);
00280 void operator=(const Self&);
00281
00282 };
00283
00284 }
00285
00286
00287 #define ITK_TEMPLATE_AdvancedTransform(_, EXPORT, x, y) namespace itk { \
00288 _(3(class EXPORT AdvancedTransform< ITK_TEMPLATE_3 x >)) \
00289 namespace Templates { typedef AdvancedTransform< ITK_TEMPLATE_3 x > AdvancedTransform##y; } \
00290 }
00291
00292 #if ITK_TEMPLATE_EXPLICIT
00293 # include "Templates/itkAdvancedTransform+-.h"
00294 #endif
00295
00296 #if ITK_TEMPLATE_TXX
00297 # include "itkAdvancedTransform.txx"
00298 #endif
00299
00300 #endif