18#ifndef elxResamplerBase_h
19#define elxResamplerBase_h
26#include "itkResampleImageFilter.h"
27#include "itkCastImageFilter.h"
79template <
typename TElastix>
104 using ITKBaseType = itk::ResampleImageFilter<InputImageType, OutputImageType, CoordinateType>;
222 template <
typename TResultPixel>
223 itk::SmartPointer<itk::ImageBase<ImageDimension>>
226 const auto castFilter =
227 itk::CastImageFilter<InputImageType, itk::Image<TResultPixel, InputImageType::ImageDimension>>::New();
228 castFilter->SetInput(&inputImage);
229 castFilter->Update();
230 return castFilter->GetOutput();
236 template <
typename TResultPixel>
240 itk::SmartPointer<itk::ImageBase<ImageDimension>> & outputImage)
const
251 template <
typename... TResultPixel>
252 itk::SmartPointer<itk::ImageBase<ImageDimension>>
256 if (itk::SmartPointer<itk::ImageBase<ImageDimension>> outputImage;
267#ifndef ITK_MANUAL_INSTANTIATION
268# include "elxResamplerBase.hxx"
BaseComponentSE()=default
typename ElastixType::RegistrationBaseType RegistrationType
virtual const itk::Object & GetSelf() const =0
void WriteResultImage(OutputImageType *imageimage, const std::string &filename, const bool showProgress)
typename ITKBaseType::IndexType IndexType
void CreateTransformParameterMap(ParameterMapType ¶meterMap) const
typename ITKBaseType::SpacingType SpacingType
~ResamplerBase() override=default
void AfterRegistrationBase() override
typename ElastixType::MovingImageType OutputImageType
itk::ResampleImageFilter< InputImageType, OutputImageType, CoordinateType > ITKBaseType
itk::SmartPointer< itk::ImageBase< ImageDimension > > CastImageAsSpecifiedByFixedWidthPixelType(const std::string_view resultImagePixelType, const InputImageType &inputImage) const
itk::SmartPointer< itk::ImageBase< ImageDimension > > CastImage(const InputImageType &inputImage) const
void WriteToFile(std::ostream &transformationParameterInfo) const
ElastixBase::CoordinateType CoordinateType
BaseComponentSE< TElastix > Superclass
bool CastImageIfPixelTypesMatch(const std::string_view resultImagePixelType, const InputImageType &inputImage, itk::SmartPointer< itk::ImageBase< ImageDimension > > &outputImage) const
elxDeclarePureVirtualGetSelfMacro(ITKBaseType)
const ITKBaseType * GetAsITKBaseType() const
typename ElastixType::ParameterMapType ParameterMapType
typename ITKBaseType::TransformType TransformType
typename ITKBaseType::SizeType SizeType
ITKBaseType * GetAsITKBaseType()
void BeforeRegistrationBase() override
typename ITKBaseType::InterpolatorType InterpolatorType
virtual void CreateItkResultImage()
void AfterEachIterationBase() override
itkStaticConstMacro(ImageDimension, unsigned int, OutputImageType::ImageDimension)
virtual ParameterMapType CreateDerivedTransformParameterMap() const
typename ITKBaseType::OriginPointType OriginPointType
typename ITKBaseType::DirectionType DirectionType
ITK_DISALLOW_COPY_AND_MOVE(ResamplerBase)
virtual void SetComponents()
itkOverrideGetNameOfClassMacro(ResamplerBase)
virtual int BeforeAllTransformix()
typename ITKBaseType::PixelType OutputPixelType
void ResampleAndWriteResultImage(const std::string &filename, const bool showProgress)
typename ElastixType::MovingImageType InputImageType
void AfterEachResolutionBase() override
virtual void ReadFromFile()
std::string PixelTypeToFixedWidthString()