# Proposal: Aliases of \`itk.D\`, \`itk.US\`, \`itk.SLL\`, ... for specific sizes of numeric types

**URL:** https://discourse.itk.org/t/proposal-aliases-of-itk-d-itk-us-itk-sll-for-specific-sizes-of-numeric-types/7792
**Category:** Engineering
**Created:** [August 18, 2026, 11:44am UTC](https://discourse.itk.org/t/proposal-aliases-of-itk-d-itk-us-itk-sll-for-specific-sizes-of-numeric-types/7792 "2026-08-18T11:44:37Z")
**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: [August 18, 2026, 11:44am UTC](https://discourse.itk.org/t/proposal-aliases-of-itk-d-itk-us-itk-sll-for-specific-sizes-of-numeric-types/7792/1 "2026-08-18T11:44:37Z")

</div>

The ITK Python package allows specifying the pixel type of an image by passing an `itkCType` object, for example `itk.D` for the C type `double`, `itk.US` for `unsigned short` and `itk.SLL` for `signed long long`. As in `itk.Image[itk.D, 2]`, `itk.Image[itk.US, 2]`, `itk.Image[itk.SLL, 2]`. While this notation is very concise, I believe it would be handy for ITK users to allow directly specifying the number of bits of the C type, just like in C and C++ with `int8_t`, `int16_t`, `int32_t`, etc. (See [Fixed width integer types (since C++11) - cppreference.com](https://en.cppreference.com/cpp/types/integer) and [Fixed width floating-point types (since C++23) - cppreference.com](https://en.cppreference.com/cpp/types/floating-point)).

Pull request [ENH: Add ctype aliases for numeric types of specific sizes to Python by N-Dekker · Pull Request #6762 · InsightSoftwareConsortium/ITK · GitHub](https://github.com/InsightSoftwareConsortium/ITK/pull/6762) proposes this feature, simply by adding the following aliases to ITK Python:

```py
float32_t = F
float64_t = D
uint8_t = UC
uint16_t = US
uint32_t = UI
uint64_t = UL if UL.dtype.itemsize == 8 else ULL
int8_t = SC
int16_t = SS
int32_t = SI
int64_t = SL if SL.dtype.itemsize == 8 else SLL

```

To be used, for example, in `itk.Image[itk.float64_t, 2]`, `itk.Image[itk.uint16, 2]`, or `itk.Image[itk.int64_t, 2]`.

Please approve this pull request if you like it!

> <https://github.com/InsightSoftwareConsortium/ITK/pull/6762>
>
> Added the following aliases:
> 
> float32\_t
> float64\_t
> uint8\_t
> u…int16\_t
> uint32\_t
> uint64\_t
> int8\_t
> int16\_t
> int32\_t
> int64\_t
> 
> Aims to provide a more human-readable alternative to F, D, UC, US, UI, ULL, SC, SS, SI, and SLL. Eases writing code for which the specific size of numeric types should be platform-independent.
> 
> Typical use cases, specifying the pixel type of an image:
> \- \`itk.Image\[itk.uint8\_t, 2\]\` (equivalent to \`itk.Image\[itk.UC, 2\]\`)
> \- \`itk.Image\[itk.float64\_t, 2\]\` (equivalent to \`itk.Image\[itk.D, 2\]\`)
> \- \`itk.Image\[itk.int64\_t, 2\]\` (equivalent to \`itk.Image\[itk.SL, 2\]\` on Linux and \`itk.Image\[itk.SLL, 2\]\` on Windows)
> 
> \----
> 
> For the record, this comment is updated, following the replacement of the \`\_ctype\` postfixes with \`\_t\` (see https://github.com/InsightSoftwareConsortium/ITK/pull/6762#issuecomment-5301549951 and \[this force-pushed amend\](https://github.com/InsightSoftwareConsortium/ITK/compare/faaacd488b169cf3a2f7283b4e796ccb620d812d..1d06a176362535d3461e0eba691c2ba501f2e34a))

---

<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: [August 19, 2026, 2:42pm UTC](https://discourse.itk.org/t/proposal-aliases-of-itk-d-itk-us-itk-sll-for-specific-sizes-of-numeric-types/7792/2 "2026-08-19T14:42:26Z")

</div>

Thanks for approving and merging [ENH: Add ctype aliases for numeric types of specific sizes to Python by N-Dekker · Pull Request #6762 · InsightSoftwareConsortium/ITK · GitHub](https://github.com/InsightSoftwareConsortium/ITK/pull/6762) !

Here is a proposed use case of `itk.int64_t` and `itk.uint64_t`:

> <https://github.com/InsightSoftwareConsortium/ITK/pull/6767>
>
> Replaced \`if os.name == "nt"\` statements which used \`itk.SL\`, \`itk.SLL\`, \`itk.UL…\`, or \`itk.ULL\` with the equivalent code, using just \`itk.int64\_t\` or \`itk.uint64\_t\`.
> 
> Aims to improve code readability and remove OS-specific code.
> 
> \- Follow-up to pull request #6762 commit dc0ea28fe9af0503ac572c44839506daaf0329b1
