# convert .avi to .mha

**URL:** <https://discourse.slicer.org/t/convert-avi-to-mha/26493>\
**Category:** Support\
**Created:** [November 29, 2022, 3:06pm UTC](https://discourse.slicer.org/t/convert-avi-to-mha/26493 "2022-11-29T15:06:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattusa90](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@mattusa90](https://discourse.slicer.org/u/mattusa90)\
**Post date:** [November 29, 2022, 3:06pm UTC](https://discourse.slicer.org/t/convert-avi-to-mha/26493/1 "2022-11-29T15:06:35Z")

</div>

For a research project I collected .avi video files of the vasculature under the tongue of patients with a microscope. I need to convert these .avi files to .mha files for analysis in new software. Would this be something that is possible with 3dslicer.

I have tried to convert the images to .png and then load the images in 3dslicer. How would I create a single .mha file out of this. Is there a more efficient way to do this?

Thank you in advance!

---

<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:** [November 29, 2022, 8:07pm UTC](https://discourse.slicer.org/t/convert-avi-to-mha/26493/2 "2022-11-29T20:07:06Z")

</div>

I mean if you already read the PNGs as a volume then you are prtty much done. Right-click on the objects name and choose `export to file` and save as MHA.

---

<div class="post-metadata">

**Author:** ![mattusa90](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@mattusa90](https://discourse.slicer.org/u/mattusa90)\
**Post date:** [December 2, 2022, 12:18pm UTC](https://discourse.slicer.org/t/convert-avi-to-mha/26493/3 "2022-12-02T12:18:51Z")

</div>

Thank you for the quick response! I am a real novice at this. Just to check:

As a result of the conversion from .avi video to .png I have 100 seperate .png images.

Can these be loaded as 1 volume? Or is there an intermediate step I need to take?

---

<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:** [December 2, 2022, 3:25pm UTC](https://discourse.slicer.org/t/convert-avi-to-mha/26493/4 "2022-12-02T15:25:25Z")

</div>

To import pngs, the easiest is to use the imagestack module from Slicermorph extension.

> <https://github.com/SlicerMorph/Tutorials/blob/main/ImageStacks/README.md>
