# CT scans into jpg images

**URL:** <https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361>\
**Category:** SlicerCIP\
**Created:** [April 30, 2020, 9:26am UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361 "2020-04-30T09:26:35Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [April 30, 2020, 9:26am UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361/1 "2020-04-30T09:26:36Z")

</div>

hello. can you please guide me how to convert CT volume scans (.raw files) into axial, saggital and coronal jpg or ong images?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [April 30, 2020, 11:53am UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361/2 "2020-04-30T11:53:52Z")

</div>

You can use ScreenCapture for that: [https://www.slicer.org/wiki/Documentation/4.10/Modules/ScreenCapture](https://www.slicer.org/wiki/Documentation/4.10/Modules/ScreenCapture)

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [April 30, 2020, 2:05pm UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361/3 "2020-04-30T14:05:59Z")

</div>

thank you so much. it works. and now after doing some work, if i want to combine the 3 view to get back the volume, what do i have to do?

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [April 30, 2020, 2:30pm UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361/4 "2020-04-30T14:30:09Z")

</div>

Don’t use the jpegs to store volumes. Best to use nrrd instead.

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [April 30, 2020, 4:13pm UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361/5 "2020-04-30T16:13:52Z")

</div>

but i will be working on 2D slices of the 3 views so result will also be 2D images. then i need to combine the results of the 3 views (which are in 2D form) to get the final output.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [April 30, 2020, 4:39pm UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361/6 "2020-04-30T16:39:38Z")

</div>

What are you trying to do?

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [May 1, 2020, 5:41am UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361/7 "2020-05-01T05:41:28Z")

</div>

hello. i am working on airway segmentation from CT lung volume. so will use 2D images and segmented ground truth in all 3 views to train CNN then will segment airways of new CT volumes. lastly will try to put them in volume again to see the airway segmented tree and calculate airway length and volume etc. hope i sound clear. thanks

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [May 1, 2020, 2:44pm UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361/8 "2020-05-01T14:44:29Z")

</div>

Yes, that part I understand. What I am not following is why you need the segmented slices in 2D? There are 3D resnet and unet…

---

<div class="post-metadata">

**Author:** ![JanWitowski](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/janwitowski/32/4512_2.png) [@JanWitowski](https://discourse.slicer.org/u/JanWitowski)\
**Post date:** [May 3, 2020, 9:00am UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361/9 "2020-05-03T09:00:01Z")

</div>

You can easily change 3D matrices in NRRD files into a stack of 2D NRRD arrays for each slice. Then save them in separate files, e.g. using pynrrd library. Jpegs are worst possible format for this, you lose a lot of information from the CT by limiting the pixel range and compressing data.

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [May 5, 2020, 2:05pm UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361/10 "2020-05-05T14:05:57Z")

</div>

thanks for the suggestions. i will try

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [May 7, 2020, 6:28am UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361/11 "2020-05-07T06:28:04Z")

</div>

Screen capture captures the screen but what to do if i want to capture each slice of 512X512 size?? kindly guide

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [May 15, 2020, 11:03am UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361/12 "2020-05-15T11:03:28Z")

</div>

i downloaded preview version of 3D slicer 4.11.0 but fast marching effect is not there in segment editor while i can see in one of the videos. how can i get fast marching effect?

---

<div class="post-metadata">

**Author:** ![anitakh1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/anitakh1/32/3350_2.png) [@anitakh1](https://discourse.slicer.org/u/anitakh1)\
**Post date:** [May 17, 2020, 12:49pm UTC](https://discourse.slicer.org/t/ct-scans-into-jpg-images/11361/13 "2020-05-17T12:49:03Z")

</div>

actually i am preparing some ground truth of segmented airway and segment lung airway is giving lot of leakages. i followed some slicer videos and i think fast marching module can help. pl suggest
