35#ifndef itkElastixRegistrationMethod_h 
   36#define itkElastixRegistrationMethod_h 
   38#include "itkImageSource.h" 
   58template <
typename TFixedImage, 
typename TMovingImage>
 
   99  static constexpr unsigned int FixedImageDimension = TFixedImage::ImageDimension;
 
  100  static constexpr unsigned int MovingImageDimension = TMovingImage::ImageDimension;
 
  104  using TransformType = Transform<double, FixedImageDimension, MovingImageDimension>;
 
  175  using Superclass::GetOutput;
 
  200  itkGetConstMacro(InitialTransformParameterFileName, std::string);
 
  204    this->SetInitialTransformParameterFileName(
"");
 
 
  215    return m_InitialTransform;
 
 
  228    return m_ExternalInitialTransform;
 
 
  236  itkSetMacro(FixedPointSetFileName, std::string);
 
  237  itkGetConstMacro(FixedPointSetFileName, std::string);
 
  241    this->SetFixedPointSetFileName(
"");
 
 
  245  itkSetMacro(MovingPointSetFileName, std::string);
 
  246  itkGetConstMacro(MovingPointSetFileName, std::string);
 
  250    this->SetMovingPointSetFileName(
"");
 
 
  254  itkSetMacro(OutputDirectory, std::string);
 
  255  itkGetConstMacro(OutputDirectory, std::string);
 
  259    this->SetOutputDirectory(
"");
 
 
  266  itkGetConstMacro(LogFileName, std::string);
 
  271  itkSetMacro(LogToConsole, 
bool);
 
  272  itkGetConstReferenceMacro(LogToConsole, 
bool);
 
  273  itkBooleanMacro(LogToConsole);
 
  276  itkSetMacro(LogToFile, 
bool);
 
  277  itkGetConstReferenceMacro(LogToFile, 
bool);
 
  278  itkBooleanMacro(LogToFile);
 
  284    m_EnableOutput = 
false;
 
 
  290  itkSetMacro(NumberOfThreads, 
int);
 
  291  itkGetConstMacro(NumberOfThreads, 
int);
 
  307  static SmartPointer<TransformType>
 
  317  using Superclass::MakeOutput;
 
  340  template <
typename TImage>
 
  341  std::vector<TImage *>
 
  344    std::vector<TImage *> images;
 
  345    for (
const auto & inputName : this->GetInputNames())
 
  347      if (this->IsInputOfType(inputTypeString, inputName))
 
  349        images.push_back(itkDynamicCastInDebugMode<TImage *>(this->ProcessObject::GetInput(inputName)));
 
 
  358    m_InitialTransform = 
nullptr;
 
  359    m_InitialTransformParameterFileName.clear();
 
  360    m_InitialTransformParameterObject = 
nullptr;
 
  361    m_ExternalInitialTransform = 
nullptr;
 
 
  367    if (m_InitialTransform || m_InitialTransformParameterObject || m_ExternalInitialTransform ||
 
  368        !m_InitialTransformParameterFileName.empty())
 
  370      ResetInitialTransformWithoutModified();
 
 
  376  using Superclass::SetInput;
 
  384  SmartPointer<const elx::ElastixMain> m_ElastixMain{};
 
  386  std::string                              m_InitialTransformParameterFileName{};
 
  387  SmartPointer<const elx::ParameterObject> m_InitialTransformParameterObject{};
 
  388  SmartPointer<const TransformType>        m_InitialTransform{};
 
  389  SmartPointer<TransformType>              m_ExternalInitialTransform{};
 
  391  std::string m_FixedPointSetFileName{};
 
  392  std::string m_MovingPointSetFileName{};
 
  394  std::string m_OutputDirectory{};
 
  395  std::string m_LogFileName{};
 
  397  bool m_EnableOutput{ 
true };
 
  398  bool m_LogToConsole{ 
false };
 
  399  bool m_LogToFile{ 
false };
 
  403  int m_NumberOfThreads{ 0 };
 
  405  unsigned int m_InputUID{ 0 };
 
 
  410#ifndef ITK_MANUAL_INSTANTIATION 
  411#  include "itkElastixRegistrationMethod.hxx" 
A class with all functionality to configure elastix.
 
itk::SmartPointer< Self > Pointer
 
ElastixBase::FlatDirectionCosinesType FlatDirectionCosinesType
 
ElastixBase::DataObjectContainerType DataObjectContainerType
 
ElastixBase::DataObjectContainerPointer DataObjectContainerPointer
 
itk::Object::Pointer ObjectPointer
 
Configuration::CommandLineArgumentMapType ArgumentMapType
 
itk::SmartPointer< Self > Pointer
 
std::map< ParameterKeyType, ParameterValueVectorType > ParameterMapType
 
itk::SmartPointer< const Self > ConstPointer
 
std::vector< ParameterValueType > ParameterValueVectorType
 
std::vector< ParameterMapType > ParameterMapVectorType
 
virtual void AddFixedImage(TFixedImage *fixedImage)
 
void SetExternalInitialTransform(TransformType *)
 
unsigned int GetNumberOfFixedImages() const
 
Image< unsigned char, FixedImageDimension > FixedMaskType
 
unsigned int GetNumberOfMovingImages() const
 
Transform< double, FixedImageDimension, MovingImageDimension > TransformType
 
const ResultImageType * GetOutput() const
 
AdvancedCombinationTransform< elx::ElastixBase::CoordRepType, FixedImageDimension > AdvancedCombinationTransformType
 
std::vector< ElastixMainPointer > ElastixMainVectorType
 
void ResetInitialTransformAndModified()
 
const FixedImageType * GetFixedImage() const
 
unsigned int GetNumberOfMovingMasks() const
 
std::vector< TImage * > GetInputImages(const char *const inputTypeString)
 
ParameterObjectType::ParameterMapType ParameterMapType
 
void SetLogFileName(const std::string logFileName)
 
void SetInput(DataObjectPointerArraySizeType index, DataObject *input)
 
TransformType * GetExternalInitialTransform() const
 
void RemoveOutputDirectory()
 
ParameterObjectType::ConstPointer ParameterObjectConstPointer
 
const MovingMaskType * GetMovingMask() const
 
void RemoveFixedPointSetFileName()
 
SmartPointer< const Self > ConstPointer
 
void SetInitialTransformParameterObject(const elx::ParameterObject *)
 
virtual void SetFixedMask(FixedMaskType *fixedMask)
 
TMovingImage MovingImageType
 
void RemoveMovingPointSetFileName()
 
void RemoveInputsOfType(const DataObjectIdentifierType &inputName)
 
ProcessObject::NameArray NameArrayType
 
AdvancedCombinationTransformType * GetAdvancedCombinationTransform() const
 
DataObjectContainerType::Iterator DataObjectContainerIterator
 
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
 
ElastixMainType::Pointer ElastixMainPointer
 
ParameterObjectType::Pointer ParameterObjectPointer
 
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
 
TransformType * GetNthTransform(const unsigned int n) const
 
void GenerateData() override
 
virtual void RemoveInitialTransformParameterFileName()
 
ParameterObjectType::ParameterMapVectorType ParameterMapVectorType
 
ArgumentMapType::value_type ArgumentMapEntryType
 
ResultImageType * GetOutput()
 
ParameterObjectType::ParameterValueVectorType ParameterValueVectorType
 
virtual void RemoveMovingMask()
 
const FixedMaskType * GetFixedMask() const
 
Image< unsigned char, MovingImageDimension > MovingMaskType
 
ElastixMainType::DataObjectContainerType DataObjectContainerType
 
unsigned int GetNumberOfFixedMasks() const
 
unsigned int GetNumberOfTransforms() const
 
virtual void AddMovingMask(MovingMaskType *movingMask)
 
ProcessObject::DataObjectIdentifierType DataObjectIdentifierType
 
virtual void SetParameterObject(ParameterObjectType *parameterObject)
 
virtual void SetMovingMask(MovingMaskType *movingMask)
 
const ParameterObjectType * GetTransformParameterObject() const
 
const MovingImageType * GetMovingImage() const
 
virtual void SetFixedImage(TFixedImage *fixedImage)
 
static SmartPointer< TransformType > ConvertToItkTransform(const TransformType &)
 
virtual void AddFixedMask(FixedMaskType *fixedMask)
 
TFixedImage FixedImageType
 
void ResetInitialTransformWithoutModified()
 
void SetInitialTransform(const TransformType *)
 
void SetInput(FixedImageType *fixedImage)
 
std::string MakeUniqueName(const DataObjectIdentifierType &key)
 
virtual void AddMovingImage(TMovingImage *movingImage)
 
const DataObject * GetInput(DataObjectPointerArraySizeType index) const
 
const FixedImageType * GetFixedImage(const unsigned int index) const
 
bool IsInputOfType(const DataObjectIdentifierType &InputOfType, const DataObjectIdentifierType &inputName) const
 
const DataObject * GetOutput(unsigned int idx) const
 
const TransformType * GetInitialTransform() const
 
TransformType * GetCombinationTransform() const
 
ElastixRegistrationMethod()
 
virtual void SetMovingImage(TMovingImage *movingImages)
 
const MovingMaskType * GetMovingMask(const unsigned int index) const
 
const FixedImageType * GetInput() const
 
ProcessObject::DataObjectPointer DataObjectPointer
 
const FixedMaskType * GetFixedMask(const unsigned int index) const
 
ParameterObjectType * GetTransformParameterObject()
 
ImageSource< TFixedImage > Superclass
 
const ParameterObjectType * GetParameterObject() const
 
ElastixMainType::ObjectPointer ElastixMainObjectPointer
 
ElastixMainType::FlatDirectionCosinesType FlatDirectionCosinesType
 
ElastixMainType::DataObjectContainerPointer DataObjectContainerPointer
 
DataObject * GetOutput(unsigned int idx)
 
ParameterObjectType * GetParameterObject()
 
FixedImageType ResultImageType
 
ElastixMainType::ArgumentMapType ArgumentMapType
 
const MovingImageType * GetMovingImage(const unsigned int index) const
 
ITK_DISALLOW_COPY_AND_MOVE(ElastixRegistrationMethod)
 
unsigned int GetNumberOfInputsOfType(const DataObjectIdentifierType &intputType) const
 
void SetInitialTransformParameterFileName(std::string)