# A shape class for ShapedImageNeighborhoodRange and ShapedNeighborhoodIterator

**URL:** <https://discourse.itk.org/t/a-shape-class-for-shapedimageneighborhoodrange-and-shapedneighborhooditerator/924>\
**Category:** Engineering\
**Created:** [May 11, 2018, 4:03pm UTC](https://discourse.itk.org/t/a-shape-class-for-shapedimageneighborhoodrange-and-shapedneighborhooditerator/924 "2018-05-11T16:03:14Z")\
**Posts on this page:** 1\
**Showing post:** 21

<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:** [October 7, 2018, 11:26am UTC](https://discourse.itk.org/t/a-shape-class-for-shapedimageneighborhoodrange-and-shapedneighborhooditerator/924/21 "2018-10-07T11:26:33Z")

</div>

@phcerdan Would it be OK to you if the identifiers [HyperrectangularImageNeighborhoodShape](https://itk.org/Doxygen/html/classitk_1_1Experimental_1_1HyperrectangularImageNeighborhoodShape.html) and [GenerateHyperrectangularImageNeighborhoodOffsets](https://itk.org/Doxygen/html/namespaceitk_1_1Experimental.html#acff402c520d4a2df3dd5372c27633250) would be renamed to `RectangularImageNeighborhoodShape` and `GenerateRectangularImageNeighborhoodOffsets`, respectively?

I remember you suggested the term _hyperrectangular_:

> [@itk::NeighborhoodRange: a new class for efficient modern C++ style iteration](https://discourse.itk.org/t/itk-neighborhoodrange-a-new-class-for-efficient-modern-c-style-iteration/833/11):
>
> NeighborhoodOffsets.h sounds good to me!. The name GenerateOffsetsForRectangularNeighborhood, might be misleading, because the offsets could be Cubic if Size is 3D. Or lines if Size\<1\>. I would recommend the more formal GenerateHyperRectangleOffsets, or GenerateNRectangleOffsets? GenerateNCrossOffsets(radius), for one pixel wide Greek cross (+), with the lengths of the cross taken from radius? I would put there: Generate3D26TopologyOffsets, equivalent to GenerateOffsetsForRectangularNeighb…

[Wikipedia](https://en.wikipedia.org/wiki/Hyperrectangle) explained to me that the term _hyperrectangle_ is a “generalization of a rectangle for higher dimensions”.

Personally I feel that the “hyper” adjective is not _really_ necessary, as the template argument `VImageDimension` already indicates that the rectangle may be generalized for higher dimensionalities.

Note that `itk::Image<TPixel, VImageDimension>` also supports dimensionalities higher than 2 (even though the ITK image class has not been named something like _itk::Hyperimage\<THyperpixel, VImageDimension\>_).

Note also that this shape class supports 1-D as well. Would that be a _hypo_ rectangular shape?

So please tell me, what do you think by now?

---

_[View the full topic](https://discourse.itk.org/t/a-shape-class-for-shapedimageneighborhoodrange-and-shapedneighborhooditerator/924)._
