# Missing Examples ImportPixelBufferIntoAnImage/Code.py, and WRAP\_PYTHON question

**URL:** https://discourse.itk.org/t/missing-examples-importpixelbufferintoanimage-code-py-and-wrap-python-question/3409
**Category:** Engineering
**Created:** [August 24, 2020, 4:13pm UTC](https://discourse.itk.org/t/missing-examples-importpixelbufferintoanimage-code-py-and-wrap-python-question/3409 "2020-08-24T16:13:30Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![fissell](https://discourse.itk.org/letter_avatar_proxy/v4/letter/f/8baadc/32.png) [@fissell](https://discourse.itk.org/u/fissell)
#### Post date: [August 24, 2020, 4:13pm UTC](https://discourse.itk.org/t/missing-examples-importpixelbufferintoanimage-code-py-and-wrap-python-question/3409/1 "2020-08-24T16:13:30Z")

</div>

Hi,

I’m building InsightToolkit-5.1.0 on Ubuntu 20.04 with BUILD\_EXAMPLES ON and ITK\_WRAP\_PYTHON ON. Two questions.

1. 

The make command succeeded. The make install command generated an errror:  
Make Error at Modules/Remote/SphinxExamples/src/Core/Common/ImportPixelBufferIntoAnImage/cmake\_install.cmake:57 (file):  
file INSTALL cannot find  
“/data/pkg/InsightToolkit-5.1.0/Modules/Remote/SphinxExamples/src/Core/Common/ImportPixelBufferIntoAnImage/Code.py”:

I see that ImportPixelBufferIntoAnImage/CMakeLists.txt tries to install that file:  
install(FILES Code.cxx CMakeLists.txt Code.py  
DESTINATION share/ITKExamples/Code/Core/Common/ImportPixelBufferIntoAnImage/  
COMPONENT Code  
)

Should I try to get that file or take it out of the CMakeLists install list ?  
I see my Example tar file does not have the Code.py file:

> tar -vtf InsightSphinxExamples-5.1.0.tar | grep ImportPixelBufferIntoAnImage  
> drwxrwxr-x root/root 0 2020-06-02 12:41 InsightSphinxExamples-5.1.0/src/Core/Common/ImportPixelBufferIntoAnImage/  
> -rw-rw-r-- root/root 746 2020-06-02 12:41 InsightSphinxExamples-5.1.0/src/Core/Common/ImportPixelBufferIntoAnImage/CMakeLists.txt  
> -rw-rw-r-- root/root 4960 2020-06-02 12:41 InsightSphinxExamples-5.1.0/src/Core/Common/ImportPixelBufferIntoAnImage/Code.cxx  
> -rw-rw-r-- root/root 1007 2020-06-02 12:41 InsightSphinxExamples-5.1.0/src/Core/Common/ImportPixelBufferIntoAnImage/Documentation.rst  
> -rw-rw-r-- root/root 128 2020-06-02 12:41 InsightSphinxExamples-5.1.0/src/Core/Common/ImportPixelBufferIntoAnImage/OutputBaseline.png.sha512

1. 

Does ITK python wrapping support Python2 ?  
I set my  
PYTHON\_EXECUTABLE to a Python2 executable, but I see these  
Python3 settings came up in ccmake:  
Python3\_LIBRARY\_DEBUG:FILEPATH=  
Python3\_LIBRARY\_RELEASE:FILEPATH=/usr/lib/x86\_64-linux-gnu/libpython3.8.so  
\_Python3\_INCLUDE\_DIR:PATH=/usr/include/python3.8  
\_Python3\_LIBRARY\_RELEASE:FILEPATH=/usr/lib/x86\_64-linux-gnu/libpython3.8.so

thanks  
Kate

---

<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: [August 24, 2020, 5:36pm UTC](https://discourse.itk.org/t/missing-examples-importpixelbufferintoanimage-code-py-and-wrap-python-question/3409/2 "2020-08-24T17:36:53Z")

</div>

I am not surprised that ImportPixelBufferIntoAnImage/Code.py does not exist, as that example demonstrates a lower-level feature. Code.py should be removed from `install(FILES` list. It is probably a copy-paste from another example (which contained Python version) that was not cleaned up 100%.

---

<div class="post-metadata">

### Author: ![fissell](https://discourse.itk.org/letter_avatar_proxy/v4/letter/f/8baadc/32.png) [@fissell](https://discourse.itk.org/u/fissell)
#### Post date: [August 28, 2020, 7:39pm UTC](https://discourse.itk.org/t/missing-examples-importpixelbufferintoanimage-code-py-and-wrap-python-question/3409/3 "2020-08-28T19:39:39Z")

</div>

Thanks very much, removing Code.py from install(FILES list in CMakeLists.txt worked. I can now make and make install.  
Note I also had to remove Code.py in the ConvertArrayToImage folder, and, I had to change Create3DVolume.cxx, ReadMesh.cxx to Code.cxx in the InsightToolkit-5.1.0/Modules/Remote/SphinxExamples/src/Filtering/ImageGrid/Create3DVolume and src/IO/Mesh/ReadMesh folders.

---

<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: [August 31, 2020, 7:14pm UTC](https://discourse.itk.org/t/missing-examples-importpixelbufferintoanimage-code-py-and-wrap-python-question/3409/4 "2020-08-31T19:14:41Z")

</div>

That sounds like a good cleanup. Can you [submit](https://github.com/InsightSoftwareConsortium/ITK/blob/master/CONTRIBUTING.md) your changes as a patch?

---

<div class="post-metadata">

### Author: ![melrobin](https://discourse.itk.org/user_avatar/discourse.itk.org/melrobin/32/277_2.png) [@melrobin](https://discourse.itk.org/u/melrobin)
#### Post date: [February 22, 2021, 9:39pm UTC](https://discourse.itk.org/t/missing-examples-importpixelbufferintoanimage-code-py-and-wrap-python-question/3409/5 "2021-02-22T21:39:26Z")

</div>

I have created Pull Request #200 on [https://github.com/InsightSoftwareConsortium/ITKExamples](https://github.com/InsightSoftwareConsortium/ITKExamples)
