# Plot images from PNG files in slicer jupyter kernel

**URL:** https://discourse.slicer.org/t/plot-images-from-png-files-in-slicer-jupyter-kernel/12432
**Category:** Support
**Created:** [July 8, 2020, 1:50am UTC](https://discourse.slicer.org/t/plot-images-from-png-files-in-slicer-jupyter-kernel/12432 "2020-07-08T01:50:56Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [July 8, 2020, 1:00pm UTC](https://discourse.slicer.org/t/plot-images-from-png-files-in-slicer-jupyter-kernel/12432/2 "2020-07-08T13:00:21Z")

</div>

> [@BennetMontgomery](#):
>
> The way I have it set up now is the notebook takes shots of the 3D view and writes them to png files, and I would like to load the png files into the notebook and plot them in a table.

This is already implemented with a one-liner for slice views:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/e/4ebd0806a2c45e8d24622965cfbfd8855bdde06d.jpeg)

By changing a few lines in [ViewLightboxDisplay script](https://github.com/Slicer/SlicerJupyter/blob/beafcb192bc44ccc88e0c2c478df89fefcd43537/JupyterNotebooks/JupyterNotebooksLib/display.py#L236-L283) (essentially, replace `screenCaptureLogic.captureSliceSweep` by [`screenCaptureLogic.capture3dViewRotation`](https://github.com/Slicer/Slicer/blob/0bc7cb16bd6cb9cdad7e589f44442e9bf7d0ee79/Modules/Scripted/ScreenCapture/ScreenCapture.py#L1214-L1215), you can create a table showing 3D view in different orientations. I’ve created this using Screen Capture module GUI, you can play a bit with the GUI, too to get to know a bit better what the module can do:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/4/443f476b175b5dd20cfc4bec01878f6563d4f4a1.jpeg)

Finally, here is an example of a script creating some data augmentation for training data and generation of an overview image of all data sets:

> [@Generating augmented training data from nrrd file using random translations, rotations, and deformations](https://discourse.slicer.org/t/generating-augmented-training-data-from-nrrd-file-using-random-translations-rotations-and-deformations/11810/8):
>
> I’ve updated the volume augmentation script to apply random translations and rotations in addition to the random deformations, and to also take screenshots so that you can get a quick overview of how the augmented data looks like. Gallery of example output: Script that generated it:

---

_[View the full topic](https://discourse.slicer.org/t/plot-images-from-png-files-in-slicer-jupyter-kernel/12432)._
