# Concept of ITK pipeline and correlation to source repo structure

**URL:** https://discourse.itk.org/t/concept-of-itk-pipeline-and-correlation-to-source-repo-structure/2572
**Category:** Engineering
**Tags:** python, simpleitk
**Created:** [December 26, 2019, 8:47pm UTC](https://discourse.itk.org/t/concept-of-itk-pipeline-and-correlation-to-source-repo-structure/2572 "2019-12-26T20:47:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jigabytes](https://discourse.itk.org/user_avatar/discourse.itk.org/jigabytes/32/967_2.png) [@Jigabytes](https://discourse.itk.org/u/Jigabytes)
#### Post date: [December 26, 2019, 8:47pm UTC](https://discourse.itk.org/t/concept-of-itk-pipeline-and-correlation-to-source-repo-structure/2572/1 "2019-12-26T20:47:55Z")

</div>

Hi All, I am in process to come up with a source code structure that I developed my prototype use case using simple ITK and python. I wanted to learn concept of pipeline in ITK does it have any correlation to how I would structure my source code? I wish to build infrastructure such that output of overall segmentation using simple ITK can be easily integrated into one of VTK interfaces like 3D slicer, ITK snap etc. Happy Holidays everyone !!! Thanks, Jiten

---

<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: [December 26, 2019, 9:06pm UTC](https://discourse.itk.org/t/concept-of-itk-pipeline-and-correlation-to-source-repo-structure/2572/2 "2019-12-26T21:06:00Z")

</div>

It is pretty easy to turn a command-line executable into a Slicer CLI module. See [documentation](https://www.slicer.org/wiki/Documentation/Nightly/Developers/SlicerExecutionModel) and [example](https://github.com/Slicer/Slicer/tree/master/Modules/CLI/AddScalarVolumes).

---

<div class="post-metadata">

### Author: ![Jigabytes](https://discourse.itk.org/user_avatar/discourse.itk.org/jigabytes/32/967_2.png) [@Jigabytes](https://discourse.itk.org/u/Jigabytes)
#### Post date: [December 26, 2019, 9:11pm UTC](https://discourse.itk.org/t/concept-of-itk-pipeline-and-correlation-to-source-repo-structure/2572/3 "2019-12-26T21:11:59Z")

</div>

Thanks @dzenanz will go over it! Thanks, Jiten!

---

<div class="post-metadata">

### Author: ![Jigabytes](https://discourse.itk.org/user_avatar/discourse.itk.org/jigabytes/32/967_2.png) [@Jigabytes](https://discourse.itk.org/u/Jigabytes)
#### Post date: [December 26, 2019, 9:14pm UTC](https://discourse.itk.org/t/concept-of-itk-pipeline-and-correlation-to-source-repo-structure/2572/4 "2019-12-26T21:14:32Z")

</div>

Hi @dzenanz currently I have to run the python program manually from pyCharm IDE to get the algo executed. Is there link you can provide to make my algo into a command-line executable? Thanks, Jiten

---

<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: [December 26, 2019, 9:21pm UTC](https://discourse.itk.org/t/concept-of-itk-pipeline-and-correlation-to-source-repo-structure/2572/5 "2019-12-26T21:21:15Z")

</div>

Take a look at this [discussion](https://discourse.slicer.org/t/how-to-run-python-based-cli-modules/4627) and the first link in it.
