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

**URL:** https://discourse.itk.org/t/new-at-master-branch-itk-makepoint-itk-makevector-itk-makeindex-itk-makesize/4260
**Category:** Engineering
**Created:** [July 13, 2021, 4:59pm UTC](https://discourse.itk.org/t/new-at-master-branch-itk-makepoint-itk-makevector-itk-makeindex-itk-makesize/4260 "2021-07-13T16:59:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Niels\_Dekker](https://discourse.itk.org/letter_avatar_proxy/v4/letter/n/9d8465/32.png) [@Niels\_Dekker](https://discourse.itk.org/u/Niels_Dekker)
#### Post date: [July 13, 2021, 4:59pm UTC](https://discourse.itk.org/t/new-at-master-branch-itk-makepoint-itk-makevector-itk-makeindex-itk-makesize/4260/1 "2021-07-13T16:59:05Z")

</div>

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 :

> <https://github.com/InsightSoftwareConsortium/ITK/commit/8aed68490b733ba45b36b2e8e84e99980db45948>
>
> Added a templated generalization of the overloaded \`MakePoint\`,
> \`MakeVector\`, \`M…akeIndex\`, and \`MakeSize\`, functions from
> "itkGTestTypedefsAndConstructors.h", allowing them to be more widely
> used.
> 
> Placed the function templates directly in the namespace \`itk\`.

`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](https://github.com/InsightSoftwareConsortium/ITK/blob/v5.2.0/Modules/Core/TestKernel/include/itkGTestTypedefsAndConstructors.h)

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

> <https://github.com/InsightSoftwareConsortium/ITK/pull/2644>
>
> Removed the \`Make\` functions from the namespace
> \`itk::GTest::TypedefsAndConstru…ctors\` as they are superseded by:
> 
> pull request https://github.com/InsightSoftwareConsortium/ITK/pull/2633
> commit 8aed68490b733ba45b36b2e8e84e99980db45948
> "ENH: Add MakePoint, MakeVector, MakeIndex, MakeSize function templates"
> 
> Adjusted itkGoogleTest.cxx accordingly.

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

---

<div class="post-metadata">

### Author: ![hjmjohnson](https://discourse.itk.org/user_avatar/discourse.itk.org/hjmjohnson/32/23_2.png) [@hjmjohnson](https://discourse.itk.org/u/hjmjohnson)
#### Post date: [July 13, 2021, 5:56pm UTC](https://discourse.itk.org/t/new-at-master-branch-itk-makepoint-itk-makevector-itk-makeindex-itk-makesize/4260/2 "2021-07-13T17:56:09Z")

</div>

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