Skip to content

Commit

Permalink
STYLE: Rename TransformixFilter template parameter TMovingImage "TImage"
Browse files Browse the repository at this point in the history
The template parameter of `TransformixFilter` is not _just_ the type of the moving image (the input image). Conceptually, it is also the type of the fixed image. Moreover, it is the type of the output image as well.
  • Loading branch information
N-Dekker committed May 9, 2023
1 parent 441c8d1 commit 88c83a8
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 80 deletions.
16 changes: 8 additions & 8 deletions Core/Main/itkTransformixFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@
namespace itk
{

template <typename TMovingImage>
class ITK_TEMPLATE_EXPORT TransformixFilter : public ImageSource<TMovingImage>
template <typename TImage>
class ITK_TEMPLATE_EXPORT TransformixFilter : public ImageSource<TImage>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(TransformixFilter);

/** Standard ITK typedefs. */
using Self = TransformixFilter;
using Superclass = ImageSource<TMovingImage>;
using Superclass = ImageSource<TImage>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;

Expand Down Expand Up @@ -95,12 +95,12 @@ class ITK_TEMPLATE_EXPORT TransformixFilter : public ImageSource<TMovingImage>
using typename Superclass::OutputImagePixelType;

using OutputDeformationFieldType =
typename itk::Image<itk::Vector<float, TMovingImage::ImageDimension>, TMovingImage::ImageDimension>;
typename itk::Image<itk::Vector<float, TImage::ImageDimension>, TImage::ImageDimension>;

using DataObjectPointerArraySizeType = ProcessObject::DataObjectPointerArraySizeType;

using InputImageType = TMovingImage;
itkStaticConstMacro(MovingImageDimension, unsigned int, TMovingImage::ImageDimension);
using InputImageType = TImage;
itkStaticConstMacro(MovingImageDimension, unsigned int, TImage::ImageDimension);

using MeshType = Mesh<OutputImagePixelType, MovingImageDimension>;

Expand All @@ -113,7 +113,7 @@ class ITK_TEMPLATE_EXPORT TransformixFilter : public ImageSource<TMovingImage>

/** Set/Get/Add moving image. */
virtual void
SetMovingImage(TMovingImage * inputImage);
SetMovingImage(TImage * inputImage);
const InputImageType *
GetMovingImage() const;
virtual void
Expand Down Expand Up @@ -273,7 +273,7 @@ class ITK_TEMPLATE_EXPORT TransformixFilter : public ImageSource<TMovingImage>
*/
using ProcessObject::RemoveInput;

using ElastixTransformBaseType = elx::TransformBase<elx::ElastixTemplate<TMovingImage, TMovingImage>>;
using ElastixTransformBaseType = elx::TransformBase<elx::ElastixTemplate<TImage, TImage>>;

const ElastixTransformBaseType *
GetFirstElastixTransformBase() const;
Expand Down
Loading

0 comments on commit 88c83a8

Please sign in to comment.