ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkGaussianSmoothingOnUpdateDisplacementFieldTransform.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkGaussianSmoothingOnUpdateDisplacementFieldTransform_h
00019 #define __itkGaussianSmoothingOnUpdateDisplacementFieldTransform_h
00020 #include "itkGaussianOperator.h"
00021 #include "itkVectorNeighborhoodOperatorImageFilter.h"
00022 
00023 #include "itkDisplacementFieldTransform.h"
00024 
00025 namespace itk
00026 {
00027 
00044 template
00045   <class TScalar, unsigned int NDimensions>
00046 class ITK_EXPORT GaussianSmoothingOnUpdateDisplacementFieldTransform :
00047   public DisplacementFieldTransform<TScalar, NDimensions>
00048 {
00049 public:
00051   typedef GaussianSmoothingOnUpdateDisplacementFieldTransform   Self;
00052   typedef DisplacementFieldTransform<TScalar, NDimensions>      Superclass;
00053   typedef SmartPointer<Self>                                    Pointer;
00054   typedef SmartPointer<const Self>                              ConstPointer;
00055 
00057   itkTypeMacro( GaussianSmoothingOnUpdateDisplacementFieldTransform,
00058                                                 DisplacementFieldTransform );
00059 
00061   itkNewMacro( Self );
00062 
00064   typedef typename Superclass::ScalarType               ScalarType;
00065   typedef typename Superclass::DerivativeType           DerivativeType;
00066   typedef typename DerivativeType::ValueType            DerivativeValueType;
00067   typedef typename Superclass::DisplacementFieldType    DisplacementFieldType;
00068   typedef typename Superclass::DisplacementFieldPointer DisplacementFieldPointer;
00069   typedef typename DisplacementFieldType::PixelType     DisplacementVectorType;
00070 
00071   typedef typename Transform<TScalar,NDimensions,NDimensions>::Pointer
00072           TransformPointer;
00073 
00078   itkSetMacro( GaussianSmoothingVarianceForTheUpdateField, ScalarType );
00079   itkGetConstReferenceMacro( GaussianSmoothingVarianceForTheUpdateField, ScalarType );
00081 
00086   itkSetMacro( GaussianSmoothingVarianceForTheTotalField, ScalarType );
00087   itkGetConstReferenceMacro( GaussianSmoothingVarianceForTheTotalField, ScalarType );
00089 
00098   virtual void UpdateTransformParameters( DerivativeType & update, ScalarType factor = 1.0 );
00099 
00104   virtual DisplacementFieldPointer GaussianSmoothDisplacementField( DisplacementFieldType *, ScalarType );
00105 
00106 protected:
00107   GaussianSmoothingOnUpdateDisplacementFieldTransform();
00108   virtual ~GaussianSmoothingOnUpdateDisplacementFieldTransform();
00109   void PrintSelf( std::ostream& os, Indent indent ) const;
00110 
00112   virtual typename LightObject::Pointer InternalClone() const;
00113 
00116   ScalarType                        m_GaussianSmoothingVarianceForTheUpdateField;
00117   ScalarType                        m_GaussianSmoothingVarianceForTheTotalField;
00118 
00121   typedef GaussianOperator<ScalarType, Superclass::Dimension>
00122                                                   GaussianSmoothingOperatorType;
00123   typedef VectorNeighborhoodOperatorImageFilter< DisplacementFieldType,
00124                                                  DisplacementFieldType >
00125                                                   GaussianSmoothingSmootherType;
00126   GaussianSmoothingOperatorType                    m_GaussianSmoothingOperator;
00127 
00128 private:
00129   GaussianSmoothingOnUpdateDisplacementFieldTransform( const Self& ); //purposely not implemented
00130   void operator=( const Self& ); //purposely not implemented
00131 
00132 };
00133 
00134 } // end namespace itk
00135 
00136 #if ITK_TEMPLATE_EXPLICIT
00137 # include "Templates/itkGaussianSmoothingOnUpdateDisplacementFieldTransform+-.h"
00138 #endif
00139 
00140 #if ITK_TEMPLATE_TXX
00141 # include "itkGaussianSmoothingOnUpdateDisplacementFieldTransform.hxx"
00142 #endif
00143 
00144 #endif // __itkGaussianSmoothingOnUpdateDisplacementFieldTransform_h
00145