# Is there any way to create an Image object starting from a array?

**URL:** <https://discourse.itk.org/t/is-there-any-way-to-create-an-image-object-starting-from-a-array/2658>\
**Category:** Engineering\
**Created:** [January 29, 2020, 4:00am UTC](https://discourse.itk.org/t/is-there-any-way-to-create-an-image-object-starting-from-a-array/2658 "2020-01-29T04:00:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Everaldo](https://discourse.itk.org/letter_avatar_proxy/v4/letter/e/b9bd4f/32.png) [@Everaldo](https://discourse.itk.org/u/Everaldo)\
**Post date:** [January 29, 2020, 4:00am UTC](https://discourse.itk.org/t/is-there-any-way-to-create-an-image-object-starting-from-a-array/2658/1 "2020-01-29T04:00:22Z")

</div>

Hi guys, I have an Image which is structured in an C++ Array and I didn’t find a constructor to initialize an image object starting from it. So, Is there any way to do this?

Thanks.

---

<div class="post-metadata">

**Author:** ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)\
**Post date:** [January 29, 2020, 11:54am UTC](https://discourse.itk.org/t/is-there-any-way-to-create-an-image-object-starting-from-a-array/2658/2 "2020-01-29T11:54:58Z")

</div>

Hi @Everaldo,

These examples show how to import a C / C++ array into an `itk::Image`:

- [https://itk.org/ITKExamples/src/Core/Common/ConvertArrayToImage/Documentation.html](https://itk.org/ITKExamples/src/Core/Common/ConvertArrayToImage/Documentation.html)
- [https://itk.org/ITKExamples/src/Core/Common/ImportPixelBufferIntoAnImage/Documentation.html](https://itk.org/ITKExamples/src/Core/Common/ImportPixelBufferIntoAnImage/Documentation.html)
