# any simple example code for learning c++ and ITK for a beginner?

**URL:** <https://discourse.itk.org/t/any-simple-example-code-for-learning-c-and-itk-for-a-beginner/1680>\
**Category:** Beginner Questions\
**Created:** [March 18, 2019, 5:06pm UTC](https://discourse.itk.org/t/any-simple-example-code-for-learning-c-and-itk-for-a-beginner/1680 "2019-03-18T17:06:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![EE18D504\_SINDHURA\_C](https://discourse.itk.org/letter_avatar_proxy/v4/letter/e/b3f665/32.png) [@EE18D504\_SINDHURA\_C](https://discourse.itk.org/u/EE18D504_SINDHURA_C)\
**Post date:** [March 18, 2019, 5:06pm UTC](https://discourse.itk.org/t/any-simple-example-code-for-learning-c-and-itk-for-a-beginner/1680/1 "2019-03-18T17:06:35Z")

</div>

I am new to c++ and ITK. I learned to build and running examples.  
I want to write a basic program when I can give my input image(not through command window) directly in the code and do certain changes like scaling,intensity contrast, intensity equalization, cropping an image etc. and write the output image in different file.

ALL I want is “HOw to read an image in C++ ??”

---

<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 18, 2019, 6:11pm UTC](https://discourse.itk.org/t/any-simple-example-code-for-learning-c-and-itk-for-a-beginner/1680/2 "2019-03-18T18:11:37Z")

</div>

The simplest example of reading and writing an image is [here](https://itk.org/Doxygen/html/Examples_2IO_2ImageReadWrite_8cxx-example.html). You might want to consult [software guide](http://www.itk.org/ItkSoftwareGuide.pdf), or its [HTML version](https://itk.org/ITKSoftwareGuide/html/Book2/ITKSoftwareGuide-Book2ch1.html#x7-70001.1).

If you want to take advantage of ITKv5 (available in master branch, and will be released within a couple of months), you can take a look at [ParallelizeImageRegion](https://itk.org/ITKExamples/src/Core/Common/UseParallelizeImageRegion/Documentation.html) and [FilterAndParallelizeImageRegion](https://itk.org/ITKExamples/src/Core/Common/FilterAndParallelizeImageRegion/Documentation.html) examples. The documentation of how to run these examples is [here](https://itk.org/ITKExamples/Documentation/Build/index.html).
