Skip to content

Commit

Permalink
STYLE: Replace BoundaryConditionPointerType w/ BoundaryConditionType *
Browse files Browse the repository at this point in the history
Made it clearer that ConvolutionImageFilterBase and PadImageFilterBase use a
_raw_ pointer to the `BoundaryCondition`.
  • Loading branch information
N-Dekker committed Mar 27, 2024
1 parent 5f3adbd commit 839955e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ class ITK_TEMPLATE_EXPORT ConvolutionImageFilterBase : public ImageToImageFilter
using DefaultBoundaryConditionType = ZeroFluxNeumannBoundaryCondition<TInputImage>;

/** Set/get the boundary condition. */
itkSetMacro(BoundaryCondition, BoundaryConditionPointerType);
itkGetConstMacro(BoundaryCondition, BoundaryConditionPointerType);
itkSetMacro(BoundaryCondition, BoundaryConditionType *);
itkGetConstMacro(BoundaryCondition, BoundaryConditionType *);

/** Set/get the image kernel. */
itkSetInputMacro(KernelImage, KernelImageType);
Expand Down Expand Up @@ -157,7 +157,7 @@ class ITK_TEMPLATE_EXPORT ConvolutionImageFilterBase : public ImageToImageFilter
bool m_Normalize{ false };

DefaultBoundaryConditionType m_DefaultBoundaryCondition{};
BoundaryConditionPointerType m_BoundaryCondition{};
BoundaryConditionType * m_BoundaryCondition{};

OutputRegionModeEnum m_OutputRegionMode{ ConvolutionImageFilterBaseEnums::ConvolutionImageFilterOutputRegion::SAME };
};
Expand Down
8 changes: 4 additions & 4 deletions Modules/Filtering/ImageGrid/include/itkPadImageFilterBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ class ITK_TEMPLATE_EXPORT PadImageFilterBase : public ImageToImageFilter<TInputI
static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;

/** Set/get the boundary condition. */
itkSetMacro(BoundaryCondition, BoundaryConditionPointerType);
itkGetConstMacro(BoundaryCondition, BoundaryConditionPointerType);
itkSetMacro(BoundaryCondition, BoundaryConditionType *);
itkGetConstMacro(BoundaryCondition, BoundaryConditionType *);

protected:
PadImageFilterBase();
Expand All @@ -110,10 +110,10 @@ class ITK_TEMPLATE_EXPORT PadImageFilterBase : public ImageToImageFilter<TInputI

/** Method for subclasses to set the boundary condition. */
void
InternalSetBoundaryCondition(const BoundaryConditionPointerType boundaryCondition);
InternalSetBoundaryCondition(BoundaryConditionType * const boundaryCondition);

private:
BoundaryConditionPointerType m_BoundaryCondition{};
BoundaryConditionType * m_BoundaryCondition{};
};

} // end namespace itk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ PadImageFilterBase<TInputImage, TOutputImage>::DynamicThreadedGenerateData(
template <typename TInputImage, typename TOutputImage>
void
PadImageFilterBase<TInputImage, TOutputImage>::InternalSetBoundaryCondition(
const BoundaryConditionPointerType boundaryCondition)
BoundaryConditionType * const boundaryCondition)
{
m_BoundaryCondition = boundaryCondition;
}
Expand Down

0 comments on commit 839955e

Please sign in to comment.