# error in sitkFlipImageFiler.h (120) and sitkGridImageSource.h (245) in Basic Filters

**URL:** https://discourse.itk.org/t/error-in-sitkflipimagefiler-h-120-and-sitkgridimagesource-h-245-in-basic-filters/7743
**Category:** Uncategorized
**Created:** [April 5, 2026, 9:19pm UTC](https://discourse.itk.org/t/error-in-sitkflipimagefiler-h-120-and-sitkgridimagesource-h-245-in-basic-filters/7743 "2026-04-05T21:19:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jsemeda](https://discourse.itk.org/user_avatar/discourse.itk.org/jsemeda/32/4633_2.png) [@jsemeda](https://discourse.itk.org/u/jsemeda)
#### Post date: [April 5, 2026, 9:19pm UTC](https://discourse.itk.org/t/error-in-sitkflipimagefiler-h-120-and-sitkgridimagesource-h-245-in-basic-filters/7743/1 "2026-04-05T21:19:40Z")

</div>

getting this error in both header files

Element ‘1’: conversion from ‘int’ to ‘bool’ requires a narrowing conversion

I would like to know if I should be using the ITK header files from within the SITK code, or from the ITK library itself?

---

<div class="post-metadata">

### Author: ![jsemeda](https://discourse.itk.org/user_avatar/discourse.itk.org/jsemeda/32/4633_2.png) [@jsemeda](https://discourse.itk.org/u/jsemeda)
#### Post date: [April 6, 2026, 12:04am UTC](https://discourse.itk.org/t/error-in-sitkflipimagefiler-h-120-and-sitkgridimagesource-h-245-in-basic-filters/7743/2 "2026-04-06T00:04:41Z")

</div>

I changed the code from std::vector m\_WhichDimensions{ std::vector(3, true) }

to

std::vector m\_WhichDimensions{ true, true, true };

---

<div class="post-metadata">

### Author: ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)
#### Post date: [April 6, 2026, 1:25pm UTC](https://discourse.itk.org/t/error-in-sitkflipimagefiler-h-120-and-sitkgridimagesource-h-245-in-basic-filters/7743/3 "2026-04-06T13:25:10Z")

</div>

Hello,

Thank you for posting the error you encountered. Could you please provide the following information:

- What version of SimpleITK did you build?
- What OS and compiler you are using?
- What configuration options did you selected when building SimpleITK?
- Are you using CMake to build your code with SimpleITK?

Thank you for the additional information to help address the issue.

---

<div class="post-metadata">

### Author: ![jsemeda](https://discourse.itk.org/user_avatar/discourse.itk.org/jsemeda/32/4633_2.png) [@jsemeda](https://discourse.itk.org/u/jsemeda)
#### Post date: [April 6, 2026, 6:30pm UTC](https://discourse.itk.org/t/error-in-sitkflipimagefiler-h-120-and-sitkgridimagesource-h-245-in-basic-filters/7743/4 "2026-04-06T18:30:31Z")

</div>

I built the latest version 2.5.3

OS is WIndows10 x64, MSVC compiler

Used the Superbuild with cmake

I already posted the solution
