18#ifndef elxTransformBase_h
19#define elxTransformBase_h
35#include <itkOptimizerParameters.h>
36#include <itkTransformMeshFilter.h>
136template <
class TElastix>
195 itk::Image<itk::Matrix<float, MovingImageDimension, FixedImageDimension>, FixedImageDimension>;
205 return &(this->GetSelf());
213 return &(this->GetSelf());
238 const bool includeDerivedTransformParameters =
true)
const;
257 typename SpatialJacobianDeterminantImageType::Pointer
261 typename SpatialJacobianMatrixImageType::Pointer
280 template <
typename TMesh>
281 typename TMesh::Pointer
286 transformMeshFilter.SetInput(&mesh);
287 transformMeshFilter.Update();
288 return transformMeshFilter.GetOutput();
301 const Configuration & configuration = itk::Deref(Superclass::GetConfiguration());
302 return configuration.
HasParameter(
"ITKTransformParameters");
328 template <
template <
typename,
typename>
class TSource,
typename TOutputImage>
332 const auto & resampleImageFilter = *(this->m_Elastix->GetElxResamplerBase()->GetAsITKBaseType());
335 const auto jacGenerator = TSource<TOutputImage, CoordRepType>::New();
337 jacGenerator->SetTransform(this->GetAsITKBaseType());
338 jacGenerator->SetOutputSize(resampleImageFilter.GetSize());
339 jacGenerator->SetOutputSpacing(resampleImageFilter.GetOutputSpacing());
340 jacGenerator->SetOutputOrigin(resampleImageFilter.GetOutputOrigin());
341 jacGenerator->SetOutputIndex(resampleImageFilter.GetOutputStartIndex());
342 jacGenerator->SetOutputDirection(resampleImageFilter.GetOutputDirection());
352 template <
typename TImage>
359 const auto infoChanger = itk::ChangeInformationImageFilter<TImage>::New();
360 typename FixedImageType::DirectionType originalDirection;
361 const bool retdc = this->m_Elastix->GetOriginalFixedImageDirection(originalDirection);
362 infoChanger->SetOutputDirection(originalDirection);
363 infoChanger->SetChangeDirection(retdc && !this->m_Elastix->GetUseDirectionCosines());
364 infoChanger->SetInput(image);
398 itkGetStringMacro(TransformParameterFileName);
416 typename DeformationFieldImageType::Pointer
430 if (!initialTransform)
432 return "NoInitialTransform";
435 const auto t0 =
dynamic_cast<const Self *
>(initialTransform);
439 virtual ParameterMapType
453 bool m_ReadWriteTransformParameters{
true };
458#ifndef ITK_MANUAL_INSTANTIATION
459# include "elxTransformBase.hxx"
The BaseComponentSE class is a base class for elastix components that provides some basic functionali...
typename ElastixType::RegistrationBaseType RegistrationType
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