Skip to content

Commit

Permalink
BUG: Fix Superclass name in RTTI macro
Browse files Browse the repository at this point in the history
Fix Superclass name in RTTI macro.

Exercise the basic object methods.
  • Loading branch information
jhlegarreta authored and dzenanz committed Sep 2, 2022
1 parent 15d09d6 commit 4f38271
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class ITK_TEMPLATE_EXPORT PolygonGroupSpatialObjectXMLFileWriter : public XMLWri
itkNewMacro(Self);

/** Run-time type information (and related methods). */
itkTypeMacro(PolygonGroupSpatialObjectXMLFileWriter, XMLWriterBase<GroupSpatialObjectType>);
itkTypeMacro(PolygonGroupSpatialObjectXMLFileWriter, XMLWriterBase);

using GroupType = GroupSpatialObject<3>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ITK_TEMPLATE_EXPORT GaussianMembershipFunction : public MembershipFunction
using ConstPointer = SmartPointer<const Self>;

/** Standard macros */
itkTypeMacro(GaussianMembershipFunction, MembershipFunction);
itkTypeMacro(GaussianMembershipFunction, MembershipFunctionBase);
itkNewMacro(Self);

/** SmartPointer class for superclass */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <iostream>
#include "itkGaussianMembershipFunction.h"
#include "itkTestingMacros.h"

int
itkGaussianMembershipFunctionTest(int, char *[])
Expand All @@ -30,9 +31,8 @@ itkGaussianMembershipFunctionTest(int, char *[])
using MeasurementVectorSizeType = MembershipFunctionType::MeasurementVectorSizeType;

auto function = MembershipFunctionType::New();
std::cout << function->GetNameOfClass() << std::endl;

function->Print(std::cout);
ITK_EXERCISE_BASIC_OBJECT_METHODS(function, GaussianMembershipFunction, MembershipFunctionBase);

function->SetMeasurementVectorSize(MeasurementVectorSize); // for code coverage

Expand Down

0 comments on commit 4f38271

Please sign in to comment.