Skip to content

Commit 0e89cdf

Browse files
committed
STYLE: CoordRepType -> CoordinateType code readability
For the sake of code readability, a new 'CoordinateType' alias is added for each nested 'CoordRepType' alias. The old 'CoordRepType' aliases will still be available with ITK 6.0, but it is recommended to use 'CoordinateType' instead. The 'CoordRepType' aliases will be removed when 'ITK_FUTURE_LEGACY_REMOVE' is enabled. Similarly, 'InputCoordinateType', 'OutputCoordinateType', and 'ImagePointCoordinateType' replace 'InputCoordRepType', 'OutputCoordRepType', and 'ImagePointCoordRepType', respectively.
1 parent cb82056 commit 0e89cdf

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

include/itkAdditiveGaussianNoiseMeshFilter.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class AdditiveGaussianNoiseMeshFilter : public MeshToMeshFilter<TInput, TOutput>
5656
using OutputMeshPointer = typename OutputMeshType::Pointer;
5757

5858
/** Type for representing coordinates. */
59-
using CoordRepType = typename TInput::CoordRepType;
59+
using CoordinateType = typename TInput::CoordinateType;
6060

6161
/** Method for creation through the object factory. */
6262
itkNewMacro(Self);
@@ -65,12 +65,12 @@ class AdditiveGaussianNoiseMeshFilter : public MeshToMeshFilter<TInput, TOutput>
6565
itkOverrideGetNameOfClassMacro(AdditiveGaussianNoiseMeshFilter);
6666

6767
/** Mean of noise. */
68-
itkGetConstMacro(Mean, CoordRepType);
69-
itkSetMacro(Mean, CoordRepType);
68+
itkGetConstMacro(Mean, CoordinateType);
69+
itkSetMacro(Mean, CoordinateType);
7070

7171
/** Variance of noise. */
72-
itkGetConstMacro(Sigma, CoordRepType);
73-
itkSetMacro(Sigma, CoordRepType);
72+
itkGetConstMacro(Sigma, CoordinateType);
73+
itkSetMacro(Sigma, CoordinateType);
7474

7575
/** Initialization seed. */
7676
itkGetConstMacro(Seed, int);
@@ -87,8 +87,8 @@ class AdditiveGaussianNoiseMeshFilter : public MeshToMeshFilter<TInput, TOutput>
8787
void
8888
GenerateData() override;
8989

90-
CoordRepType m_Mean;
91-
CoordRepType m_Sigma;
90+
CoordinateType m_Mean;
91+
CoordinateType m_Sigma;
9292
int m_Seed;
9393
};
9494

include/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class AdditiveGaussianNoiseQuadEdgeMeshFilter : public QuadEdgeMeshToQuadEdgeMes
5050
using ConstPointer = SmartPointer<const Self>;
5151

5252
/** Type for representing coordinates. */
53-
using CoordRepType = typename TInputMesh::CoordRepType;
53+
using CoordinateType = typename TInputMesh::CoordinateType;
5454

5555
/** Method for creation through the object factory. */
5656
itkNewMacro(Self);
@@ -59,12 +59,12 @@ class AdditiveGaussianNoiseQuadEdgeMeshFilter : public QuadEdgeMeshToQuadEdgeMes
5959
itkOverrideGetNameOfClassMacro(AdditiveGaussianNoiseQuadEdgeMeshFilter);
6060

6161
/** Mean of noise. */
62-
itkGetConstMacro(Mean, CoordRepType);
63-
itkSetMacro(Mean, CoordRepType);
62+
itkGetConstMacro(Mean, CoordinateType);
63+
itkSetMacro(Mean, CoordinateType);
6464

6565
/** Variance of noise. */
66-
itkGetConstMacro(Sigma, CoordRepType);
67-
itkSetMacro(Sigma, CoordRepType);
66+
itkGetConstMacro(Sigma, CoordinateType);
67+
itkSetMacro(Sigma, CoordinateType);
6868

6969
/** Initialization seed. */
7070
itkGetConstMacro(Seed, int);
@@ -81,8 +81,8 @@ class AdditiveGaussianNoiseQuadEdgeMeshFilter : public QuadEdgeMeshToQuadEdgeMes
8181
void
8282
GenerateData() override;
8383

84-
CoordRepType m_Mean;
85-
CoordRepType m_Sigma;
84+
CoordinateType m_Mean;
85+
CoordinateType m_Sigma;
8686
int m_Seed;
8787
};
8888

test/itkAdditiveGaussianNoiseMeshFilterTest.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ itkAdditiveGaussianNoiseMeshFilterTest(int itkNotUsed(argc), char * itkNotUsed(a
4343
constexpr double SPHERE_SCALE = 10.0;
4444

4545
constexpr int NOISE_SEED = 100;
46-
const TMesh::CoordRepType NOISE_SIGMA = SPHERE_SCALE * 0.01;
47-
constexpr TMesh::CoordRepType NOISE_MEAN = 1.0;
46+
const TMesh::CoordinateType NOISE_SIGMA = SPHERE_SCALE * 0.01;
47+
constexpr TMesh::CoordinateType NOISE_MEAN = 1.0;
4848

4949
///////////
5050
// Logic //

test/itkAdditiveGaussianNoiseQuadEdgeMeshFilterTest.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ itkAdditiveGaussianNoiseQuadEdgeMeshFilterTest(int itkNotUsed(argc), char * itkN
4343
constexpr double SPHERE_SCALE = 10.0;
4444

4545
constexpr int NOISE_SEED = 100;
46-
const TMesh::CoordRepType NOISE_SIGMA = SPHERE_SCALE * 0.01;
47-
constexpr TMesh::CoordRepType NOISE_MEAN = 1.0;
46+
const TMesh::CoordinateType NOISE_SIGMA = SPHERE_SCALE * 0.01;
47+
constexpr TMesh::CoordinateType NOISE_MEAN = 1.0;
4848

4949
///////////
5050
// Logic //

0 commit comments

Comments
 (0)