Skip to content

Commit

Permalink
STYLE: Replace Pointer var; var = x with Pointer var = x
Browse files Browse the repository at this point in the history
Using Notepad++, Replace in Files, doing:

    Find what: ^( [ ]+)([^ ][^=\r\n]*::Pointer)([ ]+)(\w+);[\r\n]+\1\4\ =
    Replace with: $1$2$3$4 =
    Filters: itk*.* !+\test
    Directory: D:\src\ITK\Modules
    [v] Match case
    (*) Regular expression

- Follow-up to pull request InsightSoftwareConsortium#4952
commit b4b8e7b
  • Loading branch information
N-Dekker authored and hjmjohnson committed Nov 20, 2024
1 parent 7e3492b commit 4926511
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ BinaryMinMaxCurvatureFlowImageFilter<TInputImage, TOutputImage>::BinaryMinMaxCur
{
m_Threshold = 0.0;

typename BinaryMinMaxCurvatureFlowFunctionType::Pointer cffp;
cffp = BinaryMinMaxCurvatureFlowFunctionType::New();
typename BinaryMinMaxCurvatureFlowFunctionType::Pointer cffp = BinaryMinMaxCurvatureFlowFunctionType::New();

this->SetDifferenceFunction(static_cast<FiniteDifferenceFunctionType *>(cffp.GetPointer()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ CurvatureFlowImageFilter<TInputImage, TOutputImage>::CurvatureFlowImageFilter()
this->SetNumberOfIterations(0);
m_TimeStep = 0.05f;

typename CurvatureFlowFunctionType::Pointer cffp;
cffp = CurvatureFlowFunctionType::New();
typename CurvatureFlowFunctionType::Pointer cffp = CurvatureFlowFunctionType::New();

this->SetDifferenceFunction(static_cast<FiniteDifferenceFunctionType *>(cffp.GetPointer()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ MinMaxCurvatureFlowImageFilter<TInputImage, TOutputImage>::MinMaxCurvatureFlowIm
{
m_StencilRadius = 2;

typename MinMaxCurvatureFlowFunctionType::Pointer cffp;
cffp = MinMaxCurvatureFlowFunctionType::New();
typename MinMaxCurvatureFlowFunctionType::Pointer cffp = MinMaxCurvatureFlowFunctionType::New();

this->SetDifferenceFunction(static_cast<FiniteDifferenceFunctionType *>(cffp.GetPointer()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,7 @@ BSplineResampleImageFilterBase<TInputImage, TOutputImage>::ReduceNDImage(OutputI

// Initialize scratchImage space and allocate memory
InitializeScratch(startSize);
typename TOutputImage::Pointer scratchImage;
scratchImage = TOutputImage::New();
typename TOutputImage::Pointer scratchImage = TOutputImage::New();
scratchImage->CopyInformation(inputPtr);
RegionType scratchRegion = inputPtr->GetBufferedRegion();
currentSize = startSize;
Expand Down Expand Up @@ -462,8 +461,7 @@ BSplineResampleImageFilterBase<TInputImage, TOutputImage>::ExpandNDImage(OutputI

// Initialize scratchImage space and allocate memory
InitializeScratch(startSize);
typename TOutputImage::Pointer scratchImage;
scratchImage = TOutputImage::New();
typename TOutputImage::Pointer scratchImage = TOutputImage::New();
scratchImage->CopyInformation(inputPtr);
RegionType scratchRegion = inputPtr->GetBufferedRegion();
currentSize = startSize;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,7 @@ class ScanlineFilterCommon
using PretendIndexType = typename PretendImageType::RegionType::IndexType;
using LineNeighborhoodType = ConstShapedNeighborhoodIterator<PretendImageType>;

typename PretendImageType::Pointer fakeImage;
fakeImage = PretendImageType::New();
typename PretendImageType::Pointer fakeImage = PretendImageType::New();

typename PretendImageType::RegionType LineRegion;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,7 @@ Element2DC0QuadraticTriangular::GetLocalFromGlobalCoordinates(const VectorType &
VectorType tempWeights(3);
VectorType closest(3);

itk::fem::Element2DC0LinearTriangularMembrane::Pointer e1;

e1 = itk::fem::Element2DC0LinearTriangularMembrane::New();
itk::fem::Element2DC0LinearTriangularMembrane::Pointer e1 = itk::fem::Element2DC0LinearTriangularMembrane::New();
// four linear triangles are used
for (i = 0; i < 4; ++i)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ template <typename TFixedImage, typename TMovingImage, typename TDisplacementFie
GPUDemonsRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField, TParentImageFilter>::
GPUDemonsRegistrationFilter()
{
typename GPUDemonsRegistrationFunctionType::Pointer drfp;

drfp = GPUDemonsRegistrationFunctionType::New();
typename GPUDemonsRegistrationFunctionType::Pointer drfp = GPUDemonsRegistrationFunctionType::New();

this->SetDifferenceFunction(drfp);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ template <typename TFixedImage, typename TMovingImage, typename TDisplacementFie
CurvatureRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField, TImageForceFunction>::
CurvatureRegistrationFilter()
{
typename RegistrationFunctionType::Pointer drfp;
drfp = RegistrationFunctionType::New();
typename RegistrationFunctionType::Pointer drfp = RegistrationFunctionType::New();

this->SetDifferenceFunction(static_cast<FiniteDifferenceFunctionType *>(drfp.GetPointer()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ namespace itk
template <typename TFixedImage, typename TMovingImage, typename TDisplacementField>
DemonsRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField>::DemonsRegistrationFilter()
{
typename DemonsRegistrationFunctionType::Pointer drfp;
drfp = DemonsRegistrationFunctionType::New();
typename DemonsRegistrationFunctionType::Pointer drfp = DemonsRegistrationFunctionType::New();

this->SetDifferenceFunction(static_cast<FiniteDifferenceFunctionType *>(drfp.GetPointer()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ DiffeomorphicDemonsRegistrationFilter<TFixedImage, TMovingImage, TDisplacementFi
DiffeomorphicDemonsRegistrationFilter()

{
typename DemonsRegistrationFunctionType::Pointer drfp;
drfp = DemonsRegistrationFunctionType::New();
typename DemonsRegistrationFunctionType::Pointer drfp = DemonsRegistrationFunctionType::New();

this->SetDifferenceFunction(drfp);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ template <typename TFixedImage, typename TMovingImage, typename TDisplacementFie
FastSymmetricForcesDemonsRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField>::
FastSymmetricForcesDemonsRegistrationFilter()
{
typename DemonsRegistrationFunctionType::Pointer drfp;
drfp = DemonsRegistrationFunctionType::New();
typename DemonsRegistrationFunctionType::Pointer drfp = DemonsRegistrationFunctionType::New();

this->SetDifferenceFunction(drfp);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ namespace itk
template <typename TFixedImage, typename TMovingImage, typename TDisplacementField>
LevelSetMotionRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField>::LevelSetMotionRegistrationFilter()
{
typename LevelSetMotionFunctionType::Pointer drfp;
drfp = LevelSetMotionFunctionType::New();
typename LevelSetMotionFunctionType::Pointer drfp = LevelSetMotionFunctionType::New();

this->SetDifferenceFunction(static_cast<FiniteDifferenceFunctionType *>(drfp.GetPointer()));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ template <typename TFixedImage, typename TMovingImage, typename TDisplacementFie
SymmetricForcesDemonsRegistrationFilter<TFixedImage, TMovingImage, TDisplacementField>::
SymmetricForcesDemonsRegistrationFilter()
{
typename DemonsRegistrationFunctionType::Pointer drfp;
drfp = DemonsRegistrationFunctionType::New();
typename DemonsRegistrationFunctionType::Pointer drfp = DemonsRegistrationFunctionType::New();

this->SetDifferenceFunction(static_cast<FiniteDifferenceFunctionType *>(drfp.GetPointer()));
}
Expand Down

0 comments on commit 4926511

Please sign in to comment.