35#ifndef itkElastixRegistrationMethod_h
36#define itkElastixRegistrationMethod_h
38#include "itkImageSource.h"
58template <
typename TFixedImage,
typename TMovingImage>
104 using TransformType = Transform<double, FixedImageDimension, MovingImageDimension>;
175 using Superclass::GetOutput;
200 itkGetConstMacro(InitialTransformParameterFileName, std::string);
236 itkSetMacro(FixedPointSetFileName, std::string);
237 itkGetConstMacro(FixedPointSetFileName, std::string);
245 itkSetMacro(MovingPointSetFileName, std::string);
246 itkGetConstMacro(MovingPointSetFileName, std::string);
254 itkSetMacro(OutputDirectory, std::string);
255 itkGetConstMacro(OutputDirectory, std::string);
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);
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())
349 images.push_back(itkDynamicCastInDebugMode<TImage *>(this->ProcessObject::GetInput(inputName)));
376 using Superclass::SetInput;
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)
static constexpr unsigned int MovingImageDimension
void SetExternalInitialTransform(TransformType *)
unsigned int GetNumberOfFixedImages() const
Image< unsigned char, FixedImageDimension > FixedMaskType
elx::ElastixMain ElastixMainType
elx::ParameterObject ParameterObjectType
unsigned int GetNumberOfMovingImages() const
Transform< double, FixedImageDimension, MovingImageDimension > TransformType
const ResultImageType * GetOutput() const
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
std::string m_MovingPointSetFileName
std::string m_OutputDirectory
std::string m_InitialTransformParameterFileName
void SetLogFileName(const std::string logFileName)
void SetInput(DataObjectPointerArraySizeType index, DataObject *input)
SmartPointer< const elx::ParameterObject > m_InitialTransformParameterObject
TransformType * GetExternalInitialTransform() const
void RemoveOutputDirectory()
ParameterObjectType::ConstPointer ParameterObjectConstPointer
const MovingMaskType * GetMovingMask() const
void RemoveFixedPointSetFileName()
SmartPointer< const Self > ConstPointer
virtual void SetOutputDirectory(std::string _arg)
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
SmartPointer< Self > Pointer
ParameterObjectType::Pointer ParameterObjectPointer
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
TransformType * GetNthTransform(const unsigned int n) const
void GenerateData() override
virtual void RemoveInitialTransformParameterFileName()
ParameterObjectType::ParameterMapVectorType ParameterMapVectorType
ElastixLogLevel m_LogLevel
ArgumentMapType::value_type ArgumentMapEntryType
static constexpr unsigned int FixedImageDimension
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)
std::string m_LogFileName
ProcessObject::DataObjectIdentifierType DataObjectIdentifierType
AdvancedCombinationTransform< elx::ElastixBase::CoordRepType, FixedImageDimension > AdvancedCombinationTransformType
virtual void SetParameterObject(ParameterObjectType *parameterObject)
virtual void SetMovingMask(MovingMaskType *movingMask)
const ParameterObjectType * GetTransformParameterObject() const
ElastixRegistrationMethod Self
SmartPointer< const elx::ElastixMain > m_ElastixMain
const MovingImageType * GetMovingImage() const
SmartPointer< const TransformType > m_InitialTransform
virtual void SetFixedImage(TFixedImage *fixedImage)
static SmartPointer< TransformType > ConvertToItkTransform(const TransformType &)
virtual void AddFixedMask(FixedMaskType *fixedMask)
TFixedImage FixedImageType
void ResetInitialTransformWithoutModified()
void SetInitialTransform(const TransformType *)
SmartPointer< TransformType > m_ExternalInitialTransform
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
std::string m_FixedPointSetFileName
const FixedImageType * GetInput() const
virtual void SetMovingPointSetFileName(std::string _arg)
ProcessObject::DataObjectPointer DataObjectPointer
virtual void SetFixedPointSetFileName(std::string _arg)
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)