# Can anyone tell me how to read and write a .hdr and .img file using ITK?

**URL:** https://discourse.itk.org/t/can-anyone-tell-me-how-to-read-and-write-a-hdr-and-img-file-using-itk/741
**Category:** Beginner Questions
**Created:** [March 6, 2018, 11:26pm UTC](https://discourse.itk.org/t/can-anyone-tell-me-how-to-read-and-write-a-hdr-and-img-file-using-itk/741 "2018-03-06T23:26:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Yuda\_Bi](https://discourse.itk.org/letter_avatar_proxy/v4/letter/y/73ab20/32.png) [@Yuda\_Bi](https://discourse.itk.org/u/Yuda_Bi)
#### Post date: [March 6, 2018, 11:26pm UTC](https://discourse.itk.org/t/can-anyone-tell-me-how-to-read-and-write-a-hdr-and-img-file-using-itk/741/1 "2018-03-06T23:26:08Z")

</div>

Dear All,  
I have encountered a difficulty about a project using ITK to read and write image such as this:  
image.hdr  
image.img  
I don’t know how to read this image, can anyone tell me which class or method need to use for reading this kind of image?

Thanks.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [March 7, 2018, 5:18pm UTC](https://discourse.itk.org/t/can-anyone-tell-me-how-to-read-and-write-a-hdr-and-img-file-using-itk/741/2 "2018-03-07T17:18:31Z")

</div>

You should be able to read it using the standard way, just give a path to .hdr file. [Example](https://itk.org/Wiki/ITK/Examples/IO/ImageFileReader).
