35#ifndef itkElastixRegistrationMethod_h
36#define itkElastixRegistrationMethod_h
38#include "itkImageSource.h"
55template <
typename TFixedImage,
typename TMovingImage>
96 static constexpr unsigned int FixedImageDimension = TFixedImage::ImageDimension;
97 static constexpr unsigned int MovingImageDimension = TMovingImage::ImageDimension;
101 using TransformType = Transform<double, FixedImageDimension, MovingImageDimension>;
172 using Superclass::GetOutput;
195 itkSetMacro(InitialTransformParameterFileName, std::string);
196 itkGetConstMacro(InitialTransformParameterFileName, std::string);
200 this->SetInitialTransformParameterFileName(
"");
204 itkSetMacro(FixedPointSetFileName, std::string);
205 itkGetConstMacro(FixedPointSetFileName, std::string);
209 this->SetFixedPointSetFileName(
"");
213 itkSetMacro(MovingPointSetFileName, std::string);
214 itkGetConstMacro(MovingPointSetFileName, std::string);
218 this->SetMovingPointSetFileName(
"");
222 itkSetMacro(OutputDirectory, std::string);
223 itkGetConstMacro(OutputDirectory, std::string);
227 this->SetOutputDirectory(
"");
234 itkGetConstMacro(LogFileName, std::string);
239 itkSetMacro(LogToConsole,
bool);
240 itkGetConstReferenceMacro(LogToConsole,
bool);
241 itkBooleanMacro(LogToConsole);
244 itkSetMacro(LogToFile,
bool);
245 itkGetConstReferenceMacro(LogToFile,
bool);
246 itkBooleanMacro(LogToFile);
252 m_EnableOutput =
false;
255 itkSetMacro(NumberOfThreads,
int);
256 itkGetConstMacro(NumberOfThreads,
int);
263 SmartPointer<TransformType>
267 SmartPointer<TransformType>
272 static SmartPointer<TransformType>
282 using Superclass::MakeOutput;
304 using Superclass::SetInput;
308 SmartPointer<const elx::ElastixMain> m_ElastixMain{
nullptr };
310 std::string m_InitialTransformParameterFileName{};
311 std::string m_FixedPointSetFileName{};
312 std::string m_MovingPointSetFileName{};
314 std::string m_OutputDirectory{};
315 std::string m_LogFileName{};
317 bool m_EnableOutput{
true };
318 bool m_LogToConsole{
false };
319 bool m_LogToFile{
false };
321 int m_NumberOfThreads{ 0 };
323 unsigned int m_InputUID{ 0 };
328#ifndef ITK_MANUAL_INSTANTIATION
329# include "itkElastixRegistrationMethod.hxx"
A class with all functionality to configure elastix.
ElastixBase::FlatDirectionCosinesType FlatDirectionCosinesType
itk::SmartPointer< Self > Pointer
Configuration::CommandLineArgumentMapType ArgumentMapType
ElastixBase::DataObjectContainerType DataObjectContainerType
ElastixBase::DataObjectContainerPointer DataObjectContainerPointer
itk::Object::Pointer ObjectPointer
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)
unsigned int GetNumberOfFixedImages() const
unsigned int GetNumberOfMovingImages() const
Transform< double, FixedImageDimension, MovingImageDimension > TransformType
const ResultImageType * GetOutput() const
std::vector< ElastixMainPointer > ElastixMainVectorType
const FixedImageType * GetFixedImage() const
unsigned int GetNumberOfMovingMasks() const
ParameterObjectType::ParameterMapType ParameterMapType
void SetLogFileName(const std::string logFileName)
void SetInput(DataObjectPointerArraySizeType index, DataObject *input)
void RemoveOutputDirectory()
ParameterObjectType::ConstPointer ParameterObjectConstPointer
const MovingMaskType * GetMovingMask() const
void RemoveFixedPointSetFileName()
SmartPointer< const Self > ConstPointer
virtual void SetFixedMask(FixedMaskType *fixedMask)
TMovingImage MovingImageType
void RemoveMovingPointSetFileName()
void RemoveInputsOfType(const DataObjectIdentifierType &inputName)
ProcessObject::NameArray NameArrayType
DataObjectContainerType::Iterator DataObjectContainerIterator
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
ElastixMainType::Pointer ElastixMainPointer
ParameterObjectType::Pointer ParameterObjectPointer
ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
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
ElastixMainType::DataObjectContainerType DataObjectContainerType
unsigned int GetNumberOfFixedMasks() const
unsigned int GetNumberOfTransforms() const
virtual void AddMovingMask(MovingMaskType *movingMask)
ProcessObject::DataObjectIdentifierType DataObjectIdentifierType
SmartPointer< TransformType > GetNthTransform(const unsigned int n) const
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 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
ElastixRegistrationMethod()
virtual void SetMovingImage(TMovingImage *movingImages)
const MovingMaskType * GetMovingMask(const unsigned int index) const
const FixedImageType * GetInput() const
ProcessObject::DataObjectPointer DataObjectPointer
SmartPointer< TransformType > GetCombinationTransform() const
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