# Generate fat and water MHA files in python from in-/out-phase exported MHA files

**URL:** <https://discourse.slicer.org/t/generate-fat-and-water-mha-files-in-python-from-in-out-phase-exported-mha-files/31377>\
**Category:** Support\
**Tags:** python\
**Created:** [August 26, 2023, 11:32am UTC](https://discourse.slicer.org/t/generate-fat-and-water-mha-files-in-python-from-in-out-phase-exported-mha-files/31377 "2023-08-26T11:32:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luarpy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/luarpy/32/67016_2.png) [@luarpy](https://discourse.slicer.org/u/luarpy)\
**Post date:** [August 26, 2023, 11:32am UTC](https://discourse.slicer.org/t/generate-fat-and-water-mha-files-in-python-from-in-out-phase-exported-mha-files/31377/1 "2023-08-26T11:32:50Z")

</div>

I would like to know if I can ask in this forum some problems I am having in getting some water and fat images from the in-phase and out-of-phase images. I know this forum is dedicated to 3dSlicer and it is partly related because I have exported the files from there, but I am trying equations and code done in python from which I am not getting the desired results.

I am looking for help to solve the effects in the images that do not match the data displayed in 3D Slicer.

I don’t know if it is because of the file format (MHA) and the metadata.
