ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkBSplineDeformableTransform.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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 itkBSplineDeformableTransform_h
19#define itkBSplineDeformableTransform_h
20
22
23namespace itk
24{
112template <typename TParametersValueType = double, unsigned int VDimension = 3, unsigned int VSplineOrder = 3>
113class ITK_TEMPLATE_EXPORT BSplineDeformableTransform
114 : public BSplineBaseTransform<TParametersValueType, VDimension, VSplineOrder>
115{
116public:
118
124
126 // Explicit New() method, used here because we need to split the itkNewMacro()
127 // in order to overload the CreateAnother() method so that we can copy the m_BulkTransform
128 // explicitly.
129 // TODO: shouldn't it be done with the Clone() method?
132 CreateAnother() const override
133 {
135 const Pointer copyPtr = Self::New().GetPointer();
136 // THE FOLLOWING LINE IS DIFFERENT FROM THE DEFAULT MACRO!
137 copyPtr->m_BulkTransform = this->GetBulkTransform();
138 smartPtr = static_cast<Pointer>(copyPtr);
139 return smartPtr;
140 }
141
142
145
148
150 static constexpr unsigned int SpaceDimension = VDimension;
151
153 static constexpr unsigned int SplineOrder = VSplineOrder;
154
156 using ScalarType = TParametersValueType;
157
159 using typename Superclass::ParametersType;
160 using typename Superclass::ParametersValueType;
161 using typename Superclass::FixedParametersType;
163
165 using typename Superclass::JacobianType;
168
171
173 using typename Superclass::InputVectorType;
174 using typename Superclass::OutputVectorType;
175
179
181 using typename Superclass::InputVnlVectorType;
182 using typename Superclass::OutputVnlVectorType;
183
187
188
205 void
206 SetFixedParameters(const FixedParametersType & passedParameters) override;
208
210 using typename Superclass::ImageType;
211 using typename Superclass::ImagePointer;
213
225 void
227
229 using typename Superclass::RegionType;
230
231 using typename Superclass::IndexType;
232 using typename Superclass::SizeType;
233 using typename Superclass::SpacingType;
234 using typename Superclass::DirectionType;
235 using typename Superclass::OriginType;
236
238 using typename Superclass::WeightsFunctionType;
239
240 using typename Superclass::WeightsType;
241 using typename Superclass::ContinuousIndexType;
242
245
255 void
256 TransformPoint(const InputPointType & inputPoint,
257 OutputPointType & outputPoint,
258 WeightsType & weights,
259 ParameterIndexArrayType & indices,
260 bool & inside) const override;
262
263 void
265
268 GetNumberOfParameters() const override;
269
273
275 using typename Superclass::PixelType;
276
277 using typename Superclass::MeshSizeType;
278
280 virtual void
282
285
287 virtual void
289
292
294 virtual void
296
299
301 virtual void
303
306
315
318
319protected:
321 void
322 PrintSelf(std::ostream & os, Indent indent) const override;
323
325 ~BSplineDeformableTransform() override = default;
326
327private:
329 void
331
333 void
335
337 void
339
341 void
343
345 void
347
349 bool
351
364
367
369
371 unsigned long m_Offset{};
375
376 void
378
379}; // class BSplineDeformableTransform
380} // namespace itk
381
382#ifndef ITK_MANUAL_INSTANTIATION
383# include "itkBSplineDeformableTransform.hxx"
384#endif
385
386#endif /* itkBSplineDeformableTransform_h */
OptimizerParameters< FixedParametersValueType > FixedParametersType
IdentifierType NumberOfParametersType
OptimizerParameters< ParametersValueType > ParametersType
CovariantVector< TParametersValueType, Self::SpaceDimension > InputCovariantVectorType
vnl_matrix_fixed< ParametersValueType, VOutputDimension, VInputDimension > JacobianPositionType
vnl_vector_fixed< TParametersValueType, SpaceDimension > OutputVnlVectorType
vnl_vector_fixed< TParametersValueType, SpaceDimension > InputVnlVectorType
BSplineInterpolationWeightFunction< ScalarType, Self::SpaceDimension, Self::SplineOrder > WeightsFunctionType
OutputPointType TransformPoint(const InputPointType &point) const override
vnl_matrix_fixed< ParametersValueType, VInputDimension, VOutputDimension > InverseJacobianPositionType
CovariantVector< TParametersValueType, Self::SpaceDimension > OutputCovariantVectorType
void SetCoefficientImages(const CoefficientImageArray &images) override
typename Superclass::SpacingType PhysicalDimensionsType
Point< TParametersValueType, Self::SpaceDimension > InputPointType
void SetFixedParametersGridSizeFromTransformDomainInformation() const override
itkGetConstObjectMacro(BulkTransform, BulkTransformType)
void ComputeJacobianWithRespectToParameters(const InputPointType &, JacobianType &) const override
void TransformPoint(const InputPointType &inputPoint, OutputPointType &outputPoint, WeightsType &weights, ParameterIndexArrayType &indices, bool &inside) const override
itkGetConstMacro(GridSpacing, SpacingType)
BSplineBaseTransform< TParametersValueType, VDimension, VSplineOrder > Superclass
itkOverrideGetNameOfClassMacro(BSplineDeformableTransform)
virtual void SetGridSpacing(const SpacingType &)
NumberOfParametersType GetNumberOfParameters() const override
itkSetConstObjectMacro(BulkTransform, BulkTransformType)
static constexpr unsigned int SpaceDimension
itk::LightObject::Pointer CreateAnother() const override
Array2D< ParametersValueType > JacobianType
virtual void SetGridDirection(const DirectionType &)
void SetFixedParameters(const FixedParametersType &passedParameters) override
void PrintSelf(std::ostream &os, Indent indent) const override
itkGetConstReferenceMacro(ValidRegion, RegionType)
void SetFixedParametersGridDirectionFromTransformDomainInformation() const override
itkGetConstMacro(GridOrigin, OriginType)
typename BulkTransformType::ConstPointer BulkTransformPointer
bool InsideValidRegion(ContinuousIndexType &) const override
void SetCoefficientImageInformationFromFixedParameters() override
virtual void SetGridOrigin(const OriginType &)
~BSplineDeformableTransform() override=default
ITK_DISALLOW_COPY_AND_MOVE(BSplineDeformableTransform)
Transform< TParametersValueType, Self::SpaceDimension, Self::SpaceDimension > BulkTransformType
virtual void SetGridRegion(const RegionType &)
Point< TParametersValueType, Self::SpaceDimension > OutputPointType
itkGetConstMacro(GridDirection, DirectionType)
itkGetConstMacro(GridRegion, RegionType)
void SetFixedParametersGridSpacingFromTransformDomainInformation() const override
NumberOfParametersType GetNumberOfParametersPerDimension() const override
void SetFixedParametersGridOriginFromTransformDomainInformation() const override
Control indentation during Print() invocation.
Definition itkIndent.h:50
SmartPointer< Self > Pointer
A templated class holding a geometric point in n-Dimensional space.
Definition itkPoint.h:54
Implements transparent reference counting.
Transform points and vectors from an input space to an output space.
OptimizerParameters< FixedParametersValueType > FixedParametersType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar images