# Increment through slices in sliceviews programatically

**URL:** https://discourse.slicer.org/t/increment-through-slices-in-sliceviews-programatically/20309
**Category:** Support
**Created:** [October 23, 2021, 4:15am UTC](https://discourse.slicer.org/t/increment-through-slices-in-sliceviews-programatically/20309 "2021-10-23T04:15:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sharada](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Sharada](https://discourse.slicer.org/u/Sharada)
#### Post date: [October 23, 2021, 4:15am UTC](https://discourse.slicer.org/t/increment-through-slices-in-sliceviews-programatically/20309/1 "2021-10-23T04:15:19Z")

</div>

Hello,

I am trying to display N consecutive slices of a volume in separate slice views, with each of them showing progressively increasing slices. Something like below, without the green and yellow slices.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/0/b0c4e5d9a62ff6c74de12aef9d52da52ee828e6b.png)

Is there a way to do this with Python?

Thank you,  
Sharada

---

<div class="post-metadata">

### Author: ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)
#### Post date: [October 23, 2021, 1:24pm UTC](https://discourse.slicer.org/t/increment-through-slices-in-sliceviews-programatically/20309/2 "2021-10-23T13:24:03Z")

</div>

Not directly the answer to your question, but the “Screen Capture” module is capable of producing an output as “lightbox (contact image) mode” [see Link](https://discourse.slicer.org/t/new-lightbox-contact-image-mode-in-screen-capture-module/10840) . This works nicely in stable and preview versions, see LungCTAnalyzer (PDF report) for an implementation.

---

<div class="post-metadata">

### Author: ![Sharada](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Sharada](https://discourse.slicer.org/u/Sharada)
#### Post date: [October 23, 2021, 4:45pm UTC](https://discourse.slicer.org/t/increment-through-slices-in-sliceviews-programatically/20309/3 "2021-10-23T16:45:24Z")

</div>

This is precisely what I want! Thank you so much.
