18#ifndef elxTransformBase_h
19#define elxTransformBase_h
35#include <itkOptimizerParameters.h>
36#include <itkTransformMeshFilter.h>
143template <
typename TElastix>
202 itk::Image<itk::Matrix<float, MovingImageDimension, FixedImageDimension>, FixedImageDimension>;
245 const bool includeDerivedTransformParameters =
true)
const;
264 typename SpatialJacobianDeterminantImageType::Pointer
268 typename SpatialJacobianMatrixImageType::Pointer
287 template <
typename TMesh>
288 typename TMesh::Pointer
293 transformMeshFilter.SetInput(&mesh);
294 transformMeshFilter.Update();
295 return transformMeshFilter.GetOutput();
309 return configuration.
HasParameter(
"ITKTransformParameters");
335 template <
template <
typename,
typename>
class TSource,
typename TOutputImage>
342 const auto jacGenerator = TSource<TOutputImage, CoordinateType>::New();
345 jacGenerator->SetOutputSize(resampleImageFilter.GetSize());
346 jacGenerator->SetOutputSpacing(resampleImageFilter.GetOutputSpacing());
347 jacGenerator->SetOutputOrigin(resampleImageFilter.GetOutputOrigin());
348 jacGenerator->SetOutputIndex(resampleImageFilter.GetOutputStartIndex());
349 jacGenerator->SetOutputDirection(resampleImageFilter.GetOutputDirection());
359 template <
typename TImage>
366 const auto infoChanger = itk::ChangeInformationImageFilter<TImage>::New();
367 typename FixedImageType::DirectionType originalDirection;
368 const bool retdc = this->
m_Elastix->GetOriginalFixedImageDirection(originalDirection);
369 infoChanger->SetOutputDirection(originalDirection);
370 infoChanger->SetChangeDirection(retdc && !this->
m_Elastix->GetUseDirectionCosines());
371 infoChanger->SetInput(image);
405 itkGetStringMacro(TransformParameterFileName);
423 typename DeformationFieldImageType::Pointer
437 if (!initialTransform)
439 return "NoInitialTransform";
442 const auto t0 =
dynamic_cast<const Self *
>(initialTransform);
443 return t0->GetTransformParameterFileName();
446 virtual ParameterMapType
465#ifndef ITK_MANUAL_INSTANTIATION
466# include "elxTransformBase.hxx"
BaseComponentSE()=default
itk::WeakPointer< TElastix > m_Elastix
const Configuration * GetConfiguration() const
typename ElastixType::RegistrationBaseType RegistrationType
virtual const itk::Object & GetSelf() const =0
ObjectPointer(*)() PtrToCreator
std::string ComponentDescriptionType
A class that deals with user given parameters and command line arguments.
itk::SmartPointer< const Self > ConstPointer
bool HasParameter(const std::string ¶meterName) const
class ITK_TEMPLATE_EXPORT OptimizerParameters