Skip to content

Commit

Permalink
COMP: Use modern macro name for GetModifiableObjectMacro
Browse files Browse the repository at this point in the history
Compilation error when future legacy is enabled.

In file included from ../Modules/Core/Mesh/src/itkTriangleMeshCurvatureCalculator.cxx:18:
../Modules/Core/Mesh/include/itkTriangleMeshCurvatureCalculator.h:110:3: error: use of undeclared identifier purposeful_error
  itkGetObjectMacro(GaussCurvatureData, DoubleVectorContainer);
  ^
../Modules/Core/Common/include/itkMacro.h:1128:7: note: expanded from macro itkGetObjectMacro
      purposeful_error("itkGetObjectMacro should be replaced with itkGetModifiableObjectMacro.");
  • Loading branch information
hjmjohnson committed Nov 24, 2021
1 parent faa3ab0 commit 7fdb6d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class ITK_TEMPLATE_EXPORT TriangleMeshCurvatureCalculator : public Object
itkSetObjectMacro(TriangleMesh, InputMeshType);

/** Get Gauss curvature. */
itkGetObjectMacro(GaussCurvatureData, DoubleVectorContainer);
itkGetModifiableObjectMacro(GaussCurvatureData, DoubleVectorContainer);

/** Set the curvature type to Guass. */
void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ itkTriangleMeshCurvatureCalculatorTest(int argc, char * argv[])
ITK_EXERCISE_BASIC_OBJECT_METHODS(curvCalculator, TriangleMeshCurvatureCalculator, Object);

using DoubleVectorContainerPointer = typename CurvatureCalculatorType::DoubleVectorContainerPointer;
DoubleVectorContainerPointer gaussCurvatureData;

// Test for empty mesh, curvature data should be null.
TriangleMeshType::Pointer triangleMesh = TriangleMeshType::New();
Expand All @@ -69,7 +68,7 @@ itkTriangleMeshCurvatureCalculatorTest(int argc, char * argv[])
curvCalculator->Compute();

// Output should be null for empty mesh.
gaussCurvatureData = curvCalculator->GetGaussCurvatureData();
DoubleVectorContainerPointer gaussCurvatureData = curvCalculator->GetModifiableGaussCurvatureData();
ITK_TEST_EXPECT_TRUE(gaussCurvatureData == nullptr);


Expand Down

0 comments on commit 7fdb6d6

Please sign in to comment.