ITK  4.0.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   itkSimpleNewMacro( 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 
00076   itkSetMacro( GaussianSmoothingVarianceForTheUpdateField, ScalarType );
00077   itkGetConstReferenceMacro( GaussianSmoothingVarianceForTheUpdateField, ScalarType );
00079 
00084   itkSetMacro( GaussianSmoothingVarianceForTheTotalField, ScalarType );
00085   itkGetConstReferenceMacro( GaussianSmoothingVarianceForTheTotalField, ScalarType );
00087 
00096   virtual void UpdateTransformParameters( DerivativeType & update, ScalarType factor = 1.0 );
00097 
00102   virtual DisplacementFieldPointer GaussianSmoothDisplacementField( DisplacementFieldType *, ScalarType );
00103 
00104 protected:
00105   GaussianSmoothingOnUpdateDisplacementFieldTransform();
00106   virtual ~GaussianSmoothingOnUpdateDisplacementFieldTransform();
00107   void PrintSelf( std::ostream& os, Indent indent ) const;
00108 
00112   unsigned long                       m_GaussianSmoothingTempFieldModifiedTime;
00113 
00116   ScalarType                        m_GaussianSmoothingVarianceForTheUpdateField;
00117   ScalarType                        m_GaussianSmoothingVarianceForTheTotalField;
00118 
00119   typename DisplacementFieldType::Pointer    m_GaussianSmoothingTempField;
00122   typedef GaussianOperator<ScalarType, Superclass::Dimension>
00123                                                   GaussianSmoothingOperatorType;
00124   typedef VectorNeighborhoodOperatorImageFilter< DisplacementFieldType,
00125                                                  DisplacementFieldType >
00126                                                   GaussianSmoothingSmootherType;
00127   GaussianSmoothingOperatorType                    m_GaussianSmoothingOperator;
00128   typename GaussianSmoothingSmootherType::Pointer  m_GaussianSmoothingSmoother;
00129 
00130 private:
00131   GaussianSmoothingOnUpdateDisplacementFieldTransform( const Self& ); //purposely not implemented
00132   void operator=( const Self& ); //purposely not implemented
00133 
00134 };
00135 
00136 } // end namespace itk
00137 
00138 #if ITK_TEMPLATE_EXPLICIT
00139 # include "Templates/itkGaussianSmoothingOnUpdateDisplacementFieldTransform+-.h"
00140 #endif
00141 
00142 #if ITK_TEMPLATE_TXX
00143 # include "itkGaussianSmoothingOnUpdateDisplacementFieldTransform.hxx"
00144 #endif
00145 
00146 #endif // __itkGaussianSmoothingOnUpdateDisplacementFieldTransform_h
00147