New at master branch: itk::MakePoint, itk::MakeVector, itk::MakeIndex, itk::MakeSize

Four little convenience function templates are just added to the ITK “master” branch, to ease the creation of an itk::Point, an itk::Vector, an itk::Index, and an itk::Size, after review by @dzenanz, @blowekamp, and @Lee_Newberg :

itk::MakePoint(0.1, 0.2, 0.3) yields an itk::Point<double, 3>, itk::MakeVector(-1, 1) yields an itk::Vector<int, 2>, and itk::MakeSize(3, 3, 3, 3) yields an itk::Size<4>, so the dimension of the return type corresponds to the number of specified arguments. And the arguments specify the element values, of course.

Now these are basically a generalization of the corresponding “Make” functions from the itk::GTest::TypedefsAndConstructors namespace at ITK/itkGTestTypedefsAndConstructors.h at v5.2.0 · InsightSoftwareConsortium/ITK · GitHub

So I proposed to remove the original “Make” functions from “itkGTestTypedefsAndConstructors.h”:

Is that OK to everybody? Or should the original “Make” functions from itk::GTest::TypedefsAndConstructors still have legacy support (#if !defined(ITK_LEGACY_REMOVE)…).

2 Likes

I think that the redundancy should be removed now. The proposed change would not affect the public API.

1 Like