# How to stitch together two sets of CT slices to make one file

**URL:** <https://discourse.slicer.org/t/how-to-stitch-together-two-sets-of-ct-slices-to-make-one-file/1197>\
**Category:** Support\
**Created:** [October 7, 2017, 8:02pm UTC](https://discourse.slicer.org/t/how-to-stitch-together-two-sets-of-ct-slices-to-make-one-file/1197 "2017-10-07T20:02:40Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 31, 2018, 1:31am UTC](https://discourse.slicer.org/t/how-to-stitch-together-two-sets-of-ct-slices-to-make-one-file/1197/11 "2018-03-31T01:31:13Z")

</div>

You can get images as numpy arrays, so you can very easily combine them in any way you want using numpy operations.

Just a few illustrative examples (I haven’t tested these expressions, so syntax may not be fully correct, but something similar should work):

Get minimum of two images: `imageCombined = numpy.minimum(imageA,imageB)`

Get image A voxels if it is above a certain intensity threshold, otherwise return the mean of image A and B: `imageCombined = numpy.where(imageA>1500, imageA, (imageA+imageB)/2.0)`

---

_[View the full topic](https://discourse.slicer.org/t/how-to-stitch-together-two-sets-of-ct-slices-to-make-one-file/1197)._
