go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedBSplineDeformableTransformBase.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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 __itkAdvancedBSplineDeformableTransformBase_h
19#define __itkAdvancedBSplineDeformableTransformBase_h
20
22#include "itkImage.h"
23#include "itkImageRegion.h"
24
25namespace itk
26{
27
38template<
39class TScalarType = double, // Data type for scalars
40unsigned int NDimensions = 3 >
41// Number of dimensions
43 public AdvancedTransform< TScalarType, NDimensions, NDimensions >
44{
45public:
46
49 typedef AdvancedTransform<
50 TScalarType, NDimensions, NDimensions > Superclass;
52 typedef SmartPointer< const Self > ConstPointer;
53
56
58 itkStaticConstMacro( SpaceDimension, unsigned int, NDimensions );
59
78 typedef typename Superclass::TransformCategoryEnum TransformCategoryEnum;
79
80 typedef typename Superclass
83 typedef typename Superclass
86 typedef typename Superclass
91
110 void SetParameters( const ParametersType & parameters ) override;
111
127 void SetFixedParameters( const FixedParametersType & parameters ) override;
128
145 void SetParametersByValue( const ParametersType & parameters ) override;
146
155 void SetIdentity( void );
156
158 const ParametersType & GetParameters( void ) const override;
159
161 const FixedParametersType & GetFixedParameters( void ) const override;
162
164 typedef typename ParametersType::ValueType PixelType;
165 typedef Image< PixelType,
166 itkGetStaticConstMacro( SpaceDimension ) > ImageType;
167 typedef typename ImageType::Pointer ImagePointer;
168
170 virtual const ImagePointer * GetCoefficientImages( void ) const
171 { return this->m_CoefficientImages; }
172
184 virtual void SetCoefficientImages( ImagePointer images[] );
185
187 typedef ImageRegion< itkGetStaticConstMacro( SpaceDimension ) > RegionType;
188
189 typedef typename RegionType::IndexType IndexType;
190 typedef typename RegionType::SizeType SizeType;
191 typedef typename ImageType::SpacingType SpacingType;
192 typedef typename ImageType::DirectionType DirectionType;
193 typedef typename ImageType::PointType OriginType;
195
197 virtual void SetGridRegion( const RegionType & region ) = 0;
198
199 //itkGetMacro( GridRegion, RegionType );
200 itkGetConstMacro( GridRegion, RegionType );
201
203 virtual void SetGridSpacing( const SpacingType & spacing );
204
205 //itkGetMacro( GridSpacing, SpacingType );
206 itkGetConstMacro( GridSpacing, SpacingType );
207
209 virtual void SetGridDirection( const DirectionType & direction );
210
211 //itkGetMacro( GridDirection, DirectionType );
212 itkGetConstMacro( GridDirection, DirectionType );
213
215 virtual void SetGridOrigin( const OriginType & origin );
216
217 //itkGetMacro( GridOrigin, OriginType );
218 itkGetConstMacro( GridOrigin, OriginType );
219
221 typedef Array< unsigned long > ParameterIndexArrayType;
222
227 {
228 itkExceptionMacro( << "Method not applicable for deformable transform." );
229 }
230
231
236 {
237 itkExceptionMacro( << "Method not applicable for deformable transform. " );
238 }
239
240
245 const InputCovariantVectorType & ) const override
246 {
247 itkExceptionMacro( << "Method not applicable for deformable transform. " );
248 }
249
250
253
256
258 itkGetConstReferenceMacro( ValidRegion, RegionType );
259
265 bool IsLinear( void ) const override { return false; }
266
271 {
272 return TransformCategoryEnum::BSpline;
273 }
274
275
276 virtual unsigned int GetNumberOfAffectedWeights( void ) const = 0;
277
279
284
285protected:
286
288 void PrintSelf( std::ostream & os, Indent indent ) const override;
289
292
294 void WrapAsImages( void );
295
298 const InputPointType & point, ContinuousIndexType & index ) const;
299
301
303 NonZeroJacobianIndicesType & nonZeroJacobianIndices,
304 const RegionType & supportRegion ) const = 0;
305
307 virtual bool InsideValidRegion( const ContinuousIndexType & index ) const;
308
313
320
329
331
333 unsigned long m_Offset;
337
340
343
345 typedef typename JacobianType::ValueType JacobianPixelType;
346 typedef Image< JacobianPixelType,
347 itkGetStaticConstMacro( SpaceDimension ) > JacobianImageType;
348
349 typename JacobianImageType::Pointer m_JacobianImage[ NDimensions ];
350
355
358
361
363
364private:
365
366 AdvancedBSplineDeformableTransformBase( const Self & ); // purposely not implemented
367 void operator=( const Self & ); // purposely not implemented
368
369};
370
371} // namespace itk
372
373#ifndef ITK_MANUAL_INSTANTIATION
374#include "itkAdvancedBSplineDeformableTransformBase.hxx"
375#endif
376
377#endif /* __itkAdvancedBSplineDeformableTransformBase_h */
Base class for deformable transform using a B-spline representation.
void SetParametersByValue(const ParametersType &parameters) override
virtual void SetGridDirection(const DirectionType &direction)
NumberOfParametersType GetNumberOfNonZeroJacobianIndices(void) const override=0
virtual void SetGridRegion(const RegionType &region)=0
Superclass::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
void SetFixedParameters(const FixedParametersType &parameters) override
virtual void SetGridSpacing(const SpacingType &spacing)
virtual NumberOfParametersType GetNumberOfParametersPerDimension(void) const
OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const override
OutputVnlVectorType TransformVector(const InputVnlVectorType &) const override
Image< JacobianPixelType, itkGetStaticConstMacro(SpaceDimension) > JacobianImageType
itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions)
virtual void ComputeNonZeroJacobianIndices(NonZeroJacobianIndicesType &nonZeroJacobianIndices, const RegionType &supportRegion) const =0
virtual void SetCoefficientImages(ImagePointer images[])
FixedArray< ScalarType, NDimensions *NDimensions > m_PointToIndexMatrixDiagonalProducts
Superclass::MovingImageGradientValueType MovingImageGradientValueType
void PrintSelf(std::ostream &os, Indent indent) const override
virtual unsigned int GetNumberOfAffectedWeights(void) const =0
AdvancedTransform< TScalarType, NDimensions, NDimensions > Superclass
TransformCategoryEnum GetTransformCategory(void) const override
void TransformPointToContinuousGridIndex(const InputPointType &point, ContinuousIndexType &index) const
NumberOfParametersType GetNumberOfParameters(void) const override
virtual bool InsideValidRegion(const ContinuousIndexType &index) const
ContinuousIndex< ScalarType, SpaceDimension > ContinuousIndexType
OutputVectorType TransformVector(const InputVectorType &) const override
Image< PixelType, itkGetStaticConstMacro(SpaceDimension) > ImageType
ImageRegion< itkGetStaticConstMacro(SpaceDimension) > RegionType
void SetParameters(const ParametersType &parameters) override
virtual void SetGridOrigin(const OriginType &origin)
const ParametersType & GetParameters(void) const override
const FixedParametersType & GetFixedParameters(void) const override
Superclass::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
Transform maps points, vectors and covariant vectors from an input space to an output space.
Superclass::ParametersType ParametersType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
Superclass::ScalarType ScalarType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo