ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkBSplineTransformParametersAdaptor.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 __itkBSplineTransformParametersAdaptor_h
00019 #define __itkBSplineTransformParametersAdaptor_h
00020 
00021 #include "itkTransformParametersAdaptor.h"
00022 
00023 namespace itk
00024 {
00064 template<class TTransform>
00065 class ITK_EXPORT BSplineTransformParametersAdaptor
00066 : public TransformParametersAdaptor<TTransform>
00067 {
00068 public:
00069 
00071   typedef BSplineTransformParametersAdaptor          Self;
00072   typedef TransformParametersAdaptor<TTransform>     Superclass;
00073   typedef SmartPointer<Self>                         Pointer;
00074   typedef SmartPointer<const Self>                   ConstPointer;
00075 
00077   itkNewMacro( Self );
00078 
00080   itkTypeMacro( BSplineTransformParametersAdaptor, TransformParametersAdaptor );
00081 
00083   typedef TTransform                                        TransformType;
00084   typedef typename TransformType::Pointer                   TransformPointer;
00085   typedef typename Superclass::ParametersType               ParametersType;
00086   typedef typename Superclass::ParametersValueType          ParametersValueType;
00087 
00088   typedef typename TransformType::OriginType                OriginType;
00089   typedef typename TransformType::SizeType                  SizeType;
00090   typedef typename TransformType::SpacingType               SpacingType;
00091   typedef typename TransformType::IndexType                 IndexType;
00092   typedef typename TransformType::MeshSizeType              MeshSizeType;
00093   typedef typename TransformType::DirectionType             DirectionType;
00094   typedef typename TransformType::PhysicalDimensionsType    PhysicalDimensionsType;
00095 
00096 
00097   typedef typename TransformType::ImageType                 ImageType;
00098   typedef typename ImageType::RegionType                    RegionType;
00099   typedef typename TransformType::CoefficientImageArray     CoefficientImageArray;
00100 
00102   itkStaticConstMacro( SpaceDimension, unsigned int, TransformType::SpaceDimension );
00103 
00105   void SetRequiredTransformDomainMeshSize( const MeshSizeType & );
00106 
00108   itkGetConstReferenceMacro( RequiredTransformDomainMeshSize, MeshSizeType );
00109 
00111   void SetRequiredTransformDomainPhysicalDimensions( const PhysicalDimensionsType & );
00112 
00114   itkGetConstReferenceMacro( RequiredTransformDomainPhysicalDimensions, PhysicalDimensionsType );
00115 
00117   void SetRequiredTransformDomainOrigin( const OriginType & );
00118 
00120   itkGetConstReferenceMacro( RequiredTransformDomainOrigin, OriginType );
00121 
00123   void SetRequiredTransformDomainDirection( const DirectionType & );
00124 
00126   itkGetConstReferenceMacro( RequiredTransformDomainDirection, DirectionType );
00127 
00128   virtual void SetRequiredFixedParameters( const ParametersType );
00129 
00131   virtual void AdaptTransformParameters();
00132 
00133 protected:
00134   BSplineTransformParametersAdaptor();
00135   ~BSplineTransformParametersAdaptor();
00136 
00137   void PrintSelf( std::ostream & os, Indent indent ) const;
00138 
00139 private:
00140   BSplineTransformParametersAdaptor( const Self & ); //purposely not implemented
00141   void operator=( const Self & );             //purposely not implemented
00142 
00144   void UpdateRequiredFixedParameters();
00145 
00146   MeshSizeType                               m_RequiredTransformDomainMeshSize;
00147   OriginType                                 m_RequiredTransformDomainOrigin;
00148   DirectionType                              m_RequiredTransformDomainDirection;
00149   PhysicalDimensionsType                     m_RequiredTransformDomainPhysicalDimensions;
00150 
00151 }; //class BSplineTransformParametersAdaptor
00152 }  // namespace itk
00153 
00154 #ifndef ITK_MANUAL_INSTANTIATION
00155 #include "itkBSplineTransformParametersAdaptor.hxx"
00156 #endif
00157 
00158 #endif /* __itkBSplineTransformParametersAdaptor_h */
00159