18 #ifndef itkMaskedFFTNormalizedCorrelationImageFilter_h
19 #define itkMaskedFFTNormalizedCorrelationImageFilter_h
144 template <
typename TInputImage,
typename TOutputImage,
typename TMaskImage = TInputImage>
165 static constexpr
unsigned int ImageDimension = TOutputImage::ImageDimension;
214 itkSetMacro(RequiredNumberOfOverlappingPixels,
SizeValueType);
215 itkGetMacro(RequiredNumberOfOverlappingPixels,
SizeValueType);
219 itkGetMacro(RequiredFractionOfOverlappingPixels,
RealPixelType);
220 itkSetClampMacro(RequiredFractionOfOverlappingPixels,
RealPixelType, 0.0f, 1.0f);
224 itkGetMacro(MaximumNumberOfOverlappingPixels,
SizeValueType);
226 #ifdef ITK_USE_CONCEPT_CHECKING
236 Self::SetPrimaryInputName(
"FixedImage");
239 Self::AddRequiredInputName(
"MovingImage", 1);
242 Self::AddOptionalInputName(
"FixedImageMask", 2);
245 Self::AddOptionalInputName(
"MovingImageMask", 3);
247 m_RequiredNumberOfOverlappingPixels = 0;
248 m_RequiredFractionOfOverlappingPixels = 0;
249 m_MaximumNumberOfOverlappingPixels = 0;
250 m_AccumulatedProgress = 0.0;
254 PrintSelf(std::ostream & os,
Indent indent)
const override;
258 VerifyInputInformation()
const override;
262 GenerateData()
override;
270 GenerateInputRequestedRegion()
override;
277 GenerateOutputInformation()
override;
280 EnlargeOutputRequestedRegion(
DataObject * output)
override;
283 PreProcessMask(
const InputImageType * inputImage,
const MaskImageType * inputMask);
286 PreProcessImage(
const InputImageType * inputImage,
const MaskImageType * inputMask);
288 template <
typename LocalInputImageType>
290 RotateImage(LocalInputImageType * inputImage);
292 template <
typename LocalInputImageType,
typename LocalOutputImageType>
294 CalculateForwardFFT(LocalInputImageType * inputImage, InputSizeType & FFTImageSize);
296 template <
typename LocalInputImageType,
typename LocalOutputImageType>
298 CalculateInverseFFT(LocalInputImageType * inputImage, RealSizeType & combinedImageSize);
301 template <
typename LocalInputImageType,
typename LocalOutputImageType>
303 ElementProduct(LocalInputImageType * inputImage1, LocalInputImageType * inputImage2);
305 template <
typename LocalInputImageType>
307 ElementQuotient(LocalInputImageType * inputImage1, LocalInputImageType * inputImage2);
309 template <
typename LocalInputImageType>
311 ElementSubtraction(LocalInputImageType * inputImage1, LocalInputImageType * inputImage2);
313 template <
typename LocalInputImageType>
315 ElementPositive(LocalInputImageType * inputImage);
317 template <
typename LocalInputImageType,
typename LocalOutputImageType>
319 ElementRound(LocalInputImageType * inputImage);
325 FactorizeNumber(
int n);
330 FindClosestValidDimension(
int n);
332 template <
typename LocalInputImageType>
334 CalculatePrecisionTolerance(LocalInputImageType * inputImage);
350 const unsigned int m_TotalForwardAndInverseFFTs{ 12 };
353 float m_AccumulatedProgress{};
357 #ifndef ITK_MANUAL_INSTANTIATION
358 # include "itkMaskedFFTNormalizedCorrelationImageFilter.hxx"