![]() |
Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
00001 /*====================================================================== 00002 00003 This file is part of the elastix software. 00004 00005 Copyright (c) University Medical Center Utrecht. All rights reserved. 00006 See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for 00007 details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notices for more information. 00012 00013 ======================================================================*/ 00014 00015 #ifndef __itkTransformPenaltyTerm_h 00016 #define __itkTransformPenaltyTerm_h 00017 00018 #include "itkAdvancedImageToImageMetric.h" 00019 00020 // Needed for checking for B-spline for faster implementation 00021 #include "itkAdvancedBSplineDeformableTransform.h" 00022 #include "itkAdvancedCombinationTransform.h" 00023 00024 00025 namespace itk 00026 { 00042 template< class TFixedImage, class TScalarType = double > 00043 class TransformPenaltyTerm 00044 : public AdvancedImageToImageMetric< TFixedImage, TFixedImage > 00045 { 00046 public: 00047 00049 typedef TransformPenaltyTerm Self; 00050 typedef AdvancedImageToImageMetric< 00051 TFixedImage, TFixedImage > Superclass; 00052 typedef SmartPointer<Self> Pointer; 00053 typedef SmartPointer<const Self> ConstPointer; 00054 00056 itkTypeMacro( TransformPenaltyTerm, AdvancedImageToImageMetric ); 00057 00059 typedef typename Superclass::CoordinateRepresentationType CoordinateRepresentationType; 00060 typedef typename Superclass::MovingImageType MovingImageType; 00061 typedef typename Superclass::MovingImagePixelType MovingImagePixelType; 00062 typedef typename Superclass::MovingImagePointer MovingImagePointer; 00063 typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer; 00064 typedef typename Superclass::FixedImageType FixedImageType; 00065 typedef typename Superclass::FixedImagePointer FixedImagePointer; 00066 typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer; 00067 typedef typename Superclass::FixedImageRegionType FixedImageRegionType; 00068 // these not: use advanced transform below 00069 //typedef typename Superclass::TransformType TransformType; 00070 //typedef typename Superclass::TransformPointer TransformPointer; 00071 typedef typename Superclass::InputPointType InputPointType; 00072 typedef typename Superclass::OutputPointType OutputPointType; 00073 typedef typename Superclass::TransformParametersType TransformParametersType; 00074 typedef typename Superclass::TransformJacobianType TransformJacobianType; 00075 typedef typename Superclass::InterpolatorType InterpolatorType; 00076 typedef typename Superclass::InterpolatorPointer InterpolatorPointer; 00077 typedef typename Superclass::RealType RealType; 00078 typedef typename Superclass::GradientPixelType GradientPixelType; 00079 typedef typename Superclass::GradientImageType GradientImageType; 00080 typedef typename Superclass::GradientImagePointer GradientImagePointer; 00081 typedef typename Superclass::GradientImageFilterType GradientImageFilterType; 00082 typedef typename Superclass::GradientImageFilterPointer GradientImageFilterPointer; 00083 typedef typename Superclass::FixedImageMaskType FixedImageMaskType; 00084 typedef typename Superclass::FixedImageMaskPointer FixedImageMaskPointer; 00085 typedef typename Superclass::MovingImageMaskType MovingImageMaskType; 00086 typedef typename Superclass::MovingImageMaskPointer MovingImageMaskPointer; 00087 typedef typename Superclass::MeasureType MeasureType; 00088 typedef typename Superclass::DerivativeType DerivativeType; 00089 typedef typename Superclass::DerivativeValueType DerivativeValueType; 00090 typedef typename Superclass::ParametersType ParametersType; 00091 typedef typename Superclass::FixedImagePixelType FixedImagePixelType; 00092 typedef typename Superclass::ImageSampleContainerType ImageSampleContainerType; 00093 typedef typename Superclass::ImageSampleContainerPointer ImageSampleContainerPointer; 00094 00096 typedef TScalarType ScalarType; // \todo: not really meaningful name. 00097 00099 typedef typename Superclass 00100 ::AdvancedTransformType TransformType; 00101 typedef typename TransformType 00102 ::SpatialJacobianType SpatialJacobianType; 00103 typedef typename TransformType 00104 ::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType; 00105 typedef typename TransformType 00106 ::SpatialHessianType SpatialHessianType; 00107 typedef typename TransformType 00108 ::JacobianOfSpatialHessianType JacobianOfSpatialHessianType; 00109 typedef typename TransformType 00110 ::InternalMatrixType InternalMatrixType; 00111 00113 itkStaticConstMacro( FixedImageDimension, unsigned int, FixedImageType::ImageDimension ); 00114 00115 protected: 00116 00118 typedef typename Superclass::FixedImageIndexType FixedImageIndexType; 00119 typedef typename Superclass::FixedImageIndexValueType FixedImageIndexValueType; 00120 typedef typename Superclass::MovingImageIndexType MovingImageIndexType; 00121 typedef typename Superclass::FixedImagePointType FixedImagePointType; 00122 typedef typename Superclass::MovingImagePointType MovingImagePointType; 00123 typedef typename Superclass::MovingImageContinuousIndexType MovingImageContinuousIndexType; 00124 typedef typename Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType; 00125 00127 TransformPenaltyTerm(){}; 00128 00130 virtual ~TransformPenaltyTerm() {}; 00131 00133 //void PrintSelf( std::ostream& os, Indent indent ) const; 00134 00136 typedef AdvancedBSplineDeformableTransform< 00137 ScalarType, FixedImageDimension, 3 > BSplineTransformType; 00138 typedef typename BSplineTransformType::Pointer BSplineTransformPointer; 00139 typedef AdvancedCombinationTransform< 00140 ScalarType, FixedImageDimension > CombinationTransformType; 00141 00143 virtual bool CheckForBSplineTransform( BSplineTransformPointer & bspline ) const; 00144 00145 private: 00146 00148 TransformPenaltyTerm( const Self& ); // purposely not implemented 00150 void operator=( const Self& ); // purposely not implemented 00151 00152 }; // end class TransformPenaltyTerm 00153 00154 00155 } // end namespace itk 00156 00157 #ifndef ITK_MANUAL_INSTANTIATION 00158 #include "itkTransformPenaltyTerm.txx" 00159 #endif 00160 00161 #endif // #ifndef __itkTransformPenaltyTerm_h 00162
Generated on 24-10-2011 for elastix by ![]() |
![]() |