ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkBSplineTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkBSplineTransform_h
19 #define itkBSplineTransform_h
20 
22 
23 namespace itk
24 {
108 template<typename TParametersValueType=double,
109  unsigned int NDimensions = 3,
110  unsigned int VSplineOrder = 3>
111 class ITK_TEMPLATE_EXPORT BSplineTransform :
112  public BSplineBaseTransform<TParametersValueType,NDimensions,VSplineOrder>
113 {
114 public:
120 
122  itkNewMacro( Self );
123 
125  itkTypeMacro( BSplineTransform, BSplineBaseTransform );
126 
128  itkStaticConstMacro( SpaceDimension, unsigned int, NDimensions );
129 
131  itkStaticConstMacro( SplineOrder, unsigned int, VSplineOrder );
132 
134  typedef typename Superclass::ScalarType ScalarType;
135 
137  typedef typename Superclass::ParametersType ParametersType;
138  typedef typename Superclass::ParametersValueType ParametersValueType;
139  typedef typename Superclass::FixedParametersType FixedParametersType;
140  typedef typename Superclass::FixedParametersValueType FixedParametersValueType;
141 
143  typedef typename Superclass::JacobianType JacobianType;
144 
146  typedef typename Superclass::NumberOfParametersType NumberOfParametersType;
147 
149  typedef typename Superclass::InputVectorType InputVectorType;
150  typedef typename Superclass::OutputVectorType OutputVectorType;
151 
153  typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
154  typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
155 
157  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
158  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
159 
161  typedef typename Superclass::InputPointType InputPointType;
162  typedef typename Superclass::OutputPointType OutputPointType;
163 
164 
165  virtual std::string GetTransformTypeAsString() const ITK_OVERRIDE;
166 
189  virtual void SetFixedParameters( const FixedParametersType & parameters ) ITK_OVERRIDE;
191 
193  typedef typename Superclass::ImageType ImageType;
196 
208  virtual void SetCoefficientImages( const CoefficientImageArray & images ) ITK_OVERRIDE;
209 
211  typedef typename Superclass::RegionType RegionType;
212 
213  typedef typename Superclass::IndexType IndexType;
214  typedef typename Superclass::SizeType SizeType;
215  typedef typename Superclass::SpacingType SpacingType;
217  typedef typename Superclass::OriginType OriginType;
218 
221 
222  typedef typename Superclass::WeightsType WeightsType;
224 
227 
236  using Superclass::TransformPoint;
237  virtual void TransformPoint( const InputPointType & inputPoint, OutputPointType & outputPoint,
238  WeightsType & weights, ParameterIndexArrayType & indices, bool & inside ) const ITK_OVERRIDE;
240 
242  virtual void ComputeJacobianWithRespectToParameters( const InputPointType &, JacobianType & ) const ITK_OVERRIDE;
243 
245  virtual NumberOfParametersType GetNumberOfParameters() const ITK_OVERRIDE;
246 
248  NumberOfParametersType GetNumberOfParametersPerDimension() const ITK_OVERRIDE;
249 
250  typedef typename Superclass::SpacingType PhysicalDimensionsType;
251  typedef typename Superclass::PixelType PixelType;
252 
254 
256  virtual void SetTransformDomainOrigin( const OriginType & );
257 
259  itkGetConstMacro( TransformDomainOrigin, OriginType );
260 
262  virtual void SetTransformDomainPhysicalDimensions( const PhysicalDimensionsType & );
263 
265  itkGetConstMacro( TransformDomainPhysicalDimensions, PhysicalDimensionsType );
266 
268  virtual void SetTransformDomainDirection( const DirectionType & );
269 
271  itkGetConstMacro( TransformDomainDirection, DirectionType );
272 
274  virtual void SetTransformDomainMeshSize( const MeshSizeType & );
275 
277  itkGetConstMacro( TransformDomainMeshSize, MeshSizeType );
278 
279 protected:
281  void PrintSelf( std::ostream & os, Indent indent ) const ITK_OVERRIDE;
282 
284  virtual ~BSplineTransform() ITK_OVERRIDE;
285 
286 private:
287 
289  virtual void SetFixedParametersGridSizeFromTransformDomainInformation() const ITK_OVERRIDE;
290 
292  virtual void SetFixedParametersGridOriginFromTransformDomainInformation() const ITK_OVERRIDE;
293 
295  virtual void SetFixedParametersGridSpacingFromTransformDomainInformation() const ITK_OVERRIDE;
296 
298  virtual void SetFixedParametersGridDirectionFromTransformDomainInformation() const ITK_OVERRIDE;
299 
301  virtual void SetCoefficientImageInformationFromFixedParameters() ITK_OVERRIDE;
302 
303  ITK_DISALLOW_COPY_AND_ASSIGN(BSplineTransform);
304 
306  virtual bool InsideValidRegion( ContinuousIndexType & ) const ITK_OVERRIDE;
307 
308 private:
309 
310  OriginType m_TransformDomainOrigin;
311  PhysicalDimensionsType m_TransformDomainPhysicalDimensions;
312  DirectionType m_TransformDomainDirection;
313  DirectionType m_TransformDomainDirectionInverse;
314 
315  MeshSizeType m_TransformDomainMeshSize;
316 }; // class BSplineTransform
317 } // namespace itk
318 
319 #ifndef ITK_MANUAL_INSTANTIATION
320 #include "itkBSplineTransform.hxx"
321 #endif
322 
323 #endif /* itkBSplineTransform_h */
Light weight base class for most itk classes.
Superclass::ScalarType ScalarType
BSplineBaseTransform< TParametersValueType, NDimensions, VSplineOrder > Superclass
Deformable transform using a BSpline representation.
An image region represents a structured region of data.
Superclass::NumberOfParametersType NumberOfParametersType
SmartPointer< Self > Pointer
Superclass::JacobianType JacobianType
Superclass::ParametersValueType ParametersValueType
Superclass::OutputVectorType OutputVectorType
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::ParametersType ParametersType
Superclass::InputPointType InputPointType
Superclass::FixedParametersType FixedParametersType
A base class with common elements of BSplineTransform and BSplineDeformableTransform.
Superclass::FixedParametersType FixedParametersType
SmartPointer< const Self > ConstPointer
Superclass::NumberOfParametersType NumberOfParametersType
A templated class holding a point in n-Dimensional image space.
Superclass::InputVnlVectorType InputVnlVectorType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::FixedParametersValueType FixedParametersValueType
Returns the weights over the support region used for B-spline interpolation/reconstruction.
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Templated n-dimensional image class.
Definition: itkImage.h:75
Superclass::InputVectorType InputVectorType
Superclass::OutputVnlVectorType OutputVnlVectorType
Superclass::JacobianType JacobianType
Superclass::OutputPointType OutputPointType