18 #ifndef __itkCompositeTransform_h
19 #define __itkCompositeTransform_h
87 <
class TScalar = double,
unsigned int NDimensions = 3>
165 itkStaticConstMacro( InputDimension,
unsigned int, NDimensions );
166 itkStaticConstMacro( OutputDimension,
unsigned int, NDimensions );
173 this->m_TransformsToOptimizeFlags.at(i) = state;
179 this->SetNthTransformToOptimize( i,
true );
184 this->SetNthTransformToOptimize( i,
false );
187 virtual void SetAllTransformsToOptimize(
bool state )
189 this->m_TransformsToOptimizeFlags.assign(
190 this->m_TransformsToOptimizeFlags.size(), state );
194 virtual void SetAllTransformsToOptimizeOn()
196 this->SetAllTransformsToOptimize(
true );
199 virtual void SetAllTransformsToOptimizeOff()
201 this->SetAllTransformsToOptimize(
false );
207 virtual void SetOnlyMostRecentTransformToOptimizeOn()
209 this->SetAllTransformsToOptimize(
false );
210 this->SetNthTransformToOptimizeOn( this->GetNumberOfTransforms() - 1 );
219 return this->m_TransformsToOptimizeFlags.at(i);
225 return this->m_TransformsToOptimizeFlags;
228 virtual void ClearTransformQueue()
230 Superclass::ClearTransformQueue();
231 this->m_TransformsToOptimizeFlags.clear();
239 bool GetInverse( Self *inverse )
const;
241 virtual InverseTransformBasePointer GetInverseTransform()
const;
257 virtual OutputPointType TransformPoint(
const InputPointType & inputPoint )
const;
260 using Superclass::TransformVector;
261 virtual OutputVectorType TransformVector(
const InputVectorType &)
const;
263 virtual OutputVnlVectorType TransformVector(
const InputVnlVectorType & inputVector)
const;
265 virtual OutputVectorPixelType TransformVector(
const InputVectorPixelType & inputVector )
const;
267 virtual OutputVectorType TransformVector(
const InputVectorType & inputVector,
268 const InputPointType & inputPoint )
const;
270 virtual OutputVnlVectorType TransformVector(
const InputVnlVectorType & inputVector,
271 const InputPointType & inputPoint )
const;
273 virtual OutputVectorPixelType TransformVector(
const InputVectorPixelType & inputVector,
274 const InputPointType & inputPoint )
const;
277 using Superclass::TransformCovariantVector;
278 virtual OutputCovariantVectorType TransformCovariantVector(
const InputCovariantVectorType &)
const;
280 virtual OutputVectorPixelType TransformCovariantVector(
const InputVectorPixelType &)
const;
282 virtual OutputCovariantVectorType TransformCovariantVector(
const InputCovariantVectorType & inputVector,
283 const InputPointType & inputPoint )
const;
285 virtual OutputVectorPixelType TransformCovariantVector(
const InputVectorPixelType & inputVector,
286 const InputPointType & inputPoint )
const;
289 using Superclass::TransformDiffusionTensor3D;
290 virtual OutputDiffusionTensor3DType TransformDiffusionTensor3D(
291 const InputDiffusionTensor3DType & inputTensor)
const;
293 virtual OutputVectorPixelType TransformDiffusionTensor3D(
294 const InputVectorPixelType & inputTensor)
const;
296 virtual OutputDiffusionTensor3DType TransformDiffusionTensor3D(
297 const InputDiffusionTensor3DType & inputTensor,
298 const InputPointType & inputPoint )
const;
300 virtual OutputVectorPixelType TransformDiffusionTensor3D(
301 const InputVectorPixelType & inputTensor,
302 const InputPointType & inputPoint )
const;
305 using Superclass::TransformSymmetricSecondRankTensor;
306 virtual OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor(
307 const InputSymmetricSecondRankTensorType & inputTensor)
const;
309 virtual OutputVectorPixelType TransformSymmetricSecondRankTensor(
310 const InputVectorPixelType & inputTensor)
const;
312 virtual OutputSymmetricSecondRankTensorType TransformSymmetricSecondRankTensor(
313 const InputSymmetricSecondRankTensorType & inputTensor,
314 const InputPointType & inputPoint )
const;
316 virtual OutputVectorPixelType TransformSymmetricSecondRankTensor(
317 const InputVectorPixelType & inputTensor,
318 const InputPointType & inputPoint )
const;
324 virtual TransformCategoryType GetTransformCategory()
const;
336 virtual const ParametersType & GetParameters(
void)
const;
340 virtual void SetParameters(
const ParametersType & p);
344 virtual const ParametersType & GetFixedParameters(
void)
const;
348 virtual void SetFixedParameters(
const ParametersType & fixedParameters);
352 virtual NumberOfParametersType GetNumberOfParameters(
void)
const;
356 virtual NumberOfParametersType GetNumberOfLocalParameters(
void)
const;
360 virtual NumberOfParametersType GetNumberOfFixedParameters(
void)
const;
364 virtual void UpdateTransformParameters(
const DerivativeType & update, ScalarType factor = 1.0 );
369 virtual void FlattenTransformQueue();
375 virtual void ComputeJacobianWithRespectToParameters(
const InputPointType & p, JacobianType & j)
const;
380 void PrintSelf( std::ostream& os,
Indent indent )
const;
387 Superclass::PushFrontTransform( t );
389 this->m_TransformsToOptimizeFlags.push_front(
true );
394 Superclass::PushBackTransform( t );
396 this->m_TransformsToOptimizeFlags.push_back(
true );
399 virtual void PopFrontTransform()
401 Superclass::PopFrontTransform();
402 this->m_TransformsToOptimizeFlags.pop_front();
405 virtual void PopBackTransform()
407 Superclass::PopBackTransform();
408 this->m_TransformsToOptimizeFlags.pop_back();
412 TransformQueueType & GetTransformsToOptimizeQueue()
const;
419 void operator=(
const Self & );
427 #ifndef ITK_MANUAL_INSTANTIATION
428 #include "itkCompositeTransform.hxx"
431 #endif // __itkCompositeTransform_h