# Loading of GE/Kretz ultrasound volumes (.vol file)

**URL:** https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808
**Category:** Support
**Tags:** segmentation
**Created:** [August 2, 2017, 3:06pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808 "2017-08-02T15:06:49Z")
**Posts on this page:** 20
**Page:** 6

<div class="post-metadata">

### Author: ![simongeek](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/simongeek/32/9614_2.png) [@simongeek](https://discourse.slicer.org/u/simongeek)
#### Post date: [February 11, 2021, 9:10pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/105 "2021-02-11T21:10:34Z")

</div>

@lassoan Thank you. I have a problem with this file. It is the right format to load into Slicer 3D? I can load this file into Slicer3D, but I don’t see a baby.

> **[GE](https://www.dropbox.com/sh/lwijz3j6mz2yo34/AACR4QLrQj4e45t1v3ctIwTha?dl=0)**
>
> Shared with Dropbox

---

<div class="post-metadata">

### Author: ![bahram\_jafrasteh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bahram_jafrasteh/32/10214_2.png) [@bahram\_jafrasteh](https://discourse.slicer.org/u/bahram_jafrasteh)
#### Post date: [March 8, 2021, 1:03pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/106 "2021-03-08T13:03:38Z")

</div>

Can you please let me know how can I open kretz files using python. I tried the following command:  
slicer.util.loadVolume(’/IMG\_201\_1.vol’)  
It does not work.  
I also tried to open it using the following script and I could not do that.

```
  plugin = slicer.modules.dicomPlugins['DicomUltrasoundPlugin']()
  loadables = plugin.examine([['/IMG_201_1.vol']])
  node = plugin.load(loadable)

```

I got the following error:  
E: DcmElement: Unknown Tag & Data (…) larger (…) than remaining bytes in file  
Could not load “/IMG\_201\_1.vol”  
Thank you in advance

---

<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: [March 8, 2021, 3:23pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/107 "2021-03-08T15:23:44Z")

</div>

You can follow [this example](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#How_to_load_DICOM_files_into_the_scene_from_a_folder).

If you are OK with duplicating some loading logic and you are sure that you will only get .vol files then you can copy-paste code from the DICOM ultrasound plugin:

> <https://github.com/SlicerHeart/SlicerHeart/blob/715a3eb0c086dfa1e110453ceebd6c750d3989f2/DicomUltrasoundPlugin/DicomUltrasoundPlugin.py#L564-L585>

If you just need to work with .vol files that do not embed the volume in a DICOM file then you can load it with a single line of code (set `volFileOffset` to 0):

> <https://github.com/SlicerHeart/SlicerHeart/blob/715a3eb0c086dfa1e110453ceebd6c750d3989f2/DicomUltrasoundPlugin/DicomUltrasoundPlugin.py#L583>

---

<div class="post-metadata">

### Author: ![bahram\_jafrasteh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bahram_jafrasteh/32/10214_2.png) [@bahram\_jafrasteh](https://discourse.slicer.org/u/bahram_jafrasteh)
#### Post date: [March 8, 2021, 5:02pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/108 "2021-03-08T17:02:25Z")

</div>

Thanks. However, I have some problems.  
I am sure that my file is a Kretz file.  
I have this error:  
File is missing DICOM File Meta Information header or the ‘DICM’ prefix is missing from the header. Use force=True to force reading.  
I checked that the output of the fp.read(4) in filereader.py is : b’\x00\x00&\x02’ which is not equal to b"DICM". If I use force=True I should set `volFileOffset` to 0 .

---

<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: [March 8, 2021, 5:12pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/109 "2021-03-08T17:12:19Z")

</div>

There are two Kretz file formats circulating. One of them is just the proprietary data structure in a file. The other one is a DICOM file that contains the proprietary data structure in a private DICOM tag.

DICOM files start with a preamble of 128 bytes that should be ignored. If you want to determine if a file is DICOM or not then parse it using pydicom (already bundled with Slicer) instead of trying to analyze the file on your own.

---

<div class="post-metadata">

### Author: ![bahram\_jafrasteh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bahram_jafrasteh/32/10214_2.png) [@bahram\_jafrasteh](https://discourse.slicer.org/u/bahram_jafrasteh)
#### Post date: [March 8, 2021, 7:05pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/110 "2021-03-08T19:05:04Z")

</div>

So my file is the proprietary data structure in a file. How can I open it using python?  
I can easily open it in the Slicer GUI.

---

<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: [March 8, 2021, 8:24pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/111 "2021-03-08T20:24:24Z")

</div>

This should work on a non-DICOM-embedded Kretzfile:

```python
volumeNode = slicer.modules.kretzfilereader.logic().LoadKretzFile(
  volFilePath, 'my node name', True, [0.3,0.3,0.3])
slicer.util.setSliceViewerLayers(background=volumeNode, fit=True)

```

---

<div class="post-metadata">

### Author: ![bahram\_jafrasteh](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bahram_jafrasteh/32/10214_2.png) [@bahram\_jafrasteh](https://discourse.slicer.org/u/bahram_jafrasteh)
#### Post date: [March 10, 2021, 2:54pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/112 "2021-03-10T14:54:10Z")

</div>

Thanks @lassoan . It is working.

---

<div class="post-metadata">

### Author: ![Goli](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/goli/32/549_2.png) [@Goli](https://discourse.slicer.org/u/Goli)
#### Post date: [March 10, 2021, 10:01pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/113 "2021-03-10T22:01:18Z")

</div>

Hi Andras @lassoan, I hope you’re doing well!

I can successfully load .vol image volumes (from Voluson E10) in Slicer using the SlicerHeart module, which is great. However, the voxel sizes (image spacing) seem to be too large (0.5x0.5x0.5 mm) and the multiplication of the voxel dimensions by the image dimensions don’t match the image depth and width (but the image depth measured using the ruler is correct!). Is there a way to get the correct voxel size from the .vol files? Thank you.

---

<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: [March 10, 2021, 10:25pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/114 "2021-03-10T22:25:11Z")

</div>

What probe did you use? Can you share an image of a ultrasound phantom (or an object of known size, for example a Lego brick)?

Note that you can also [get Image3dAPI from GE](https://github.com/SlicerHeart/SlicerHeart#loading-various-3d4d-ultrasound-images-using-image3dapi) and read the files using the official GE reader instead of the open implementation.

---

<div class="post-metadata">

### Author: ![Goli](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/goli/32/549_2.png) [@Goli](https://discourse.slicer.org/u/Goli)
#### Post date: [March 11, 2021, 12:18am UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/115 "2021-03-11T00:18:31Z")

</div>

We used a RAB6-D probe. Unfortunately, I only have patient and volunteer images now (we’re using a hospital’s scanner). I’ll try to get a phantom image next time I’m there. I signed up for the GE Edison Developer Program earlier today.

---

<div class="post-metadata">

### Author: ![klemo4](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@klemo4](https://discourse.slicer.org/u/klemo4)
#### Post date: [May 4, 2021, 10:24am UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/116 "2021-05-04T10:24:02Z")

</div>

Hi. I am trying to open .vol files from voluson E6 that doctor export for me so i can 3d print them. i have try to open them with slicer but no luck. i get a error every time. i have follow the instruction for [Edison Developer Program], i have install Image3dLoaderGe.dll but still i cant open them,(i just install Image3dLoaderGe.dll from cmd with “regsvr32 Image3dLoaderGe.dll” and then try to open with slicer. Maybe i had to do something else? ). Can someone help plz. i will share my vol file if anyone can open them and tell me how. i think i am doing something wrong.

[https://drive.google.com/drive/folders/1MlpSsZKHUDT21OtGGMDc3\_F5QO5NmYxn?usp=sharing](https://drive.google.com/drive/folders/1MlpSsZKHUDT21OtGGMDc3_F5QO5NmYxn?usp=sharing)

---

<div class="post-metadata">

### Author: ![issakomi](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@issakomi](https://discourse.slicer.org/u/issakomi)
#### Post date: [May 4, 2021, 4:40pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/117 "2021-05-04T16:40:39Z")

</div>

> [@klemo4](#):
>
> I am trying to open .vol files from voluson E6 that doctor export for me

The files are in _Kretzfile_ format, but unfortunately they are compressed, not supported by most programs (i don’t ever know a program with support for compressed _Kretzfile_, except closed from manufacturer).

![tv](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/b/fb5c24049a90d42cc5f6edd6fb1fe44f62794677.png)

---

<div class="post-metadata">

### Author: ![klemo4](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@klemo4](https://discourse.slicer.org/u/klemo4)
#### Post date: [May 4, 2021, 4:48pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/118 "2021-05-04T16:48:54Z")

</div>

Tnx man for the help. I have try it too and i saw the same error but i didn’t know that they are not support to be compressed. so what is why i cant open them. So where is no way i can open them?

---

<div class="post-metadata">

### Author: ![issakomi](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@issakomi](https://discourse.slicer.org/u/issakomi)
#### Post date: [May 4, 2021, 5:38pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/119 "2021-05-04T17:38:41Z")

</div>

May be the doctor could re-export images without compression. Also, there is GE’s program _4DView_, but it is not downloadable without registration (it requires device serial number). Files are compressed with wavelet transform  
`0xD100,0x0001 compression? WTCompression`  
difficult, a lot of work were required to solve the puzzle, not impossible, there are many experiments with wavelets, but probably there is no working solution…

---

<div class="post-metadata">

### Author: ![issakomi](https://avatars.discourse-cdn.com/v4/letter/i/b9e5f3/32.png) [@issakomi](https://discourse.slicer.org/u/issakomi)
#### Post date: [May 4, 2021, 6:05pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/120 "2021-05-04T18:05:20Z")

</div>

> Also, there is GE’s program _4DView_

There is a link to _4DView_ installer (1drv) in description of [SlicerHeart](https://github.com/SlicerHeart/SlicerHeart)

Edit:  
It seems to be possible to archive a file in 4DView without compression, here is one re-exported [file](https://drive.google.com/file/d/1jbv2YQ4zO4LvEHRgeRtd8IqNKUOmU6Ky/view?usp=sharing)

---

<div class="post-metadata">

### Author: ![klemo4](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@klemo4](https://discourse.slicer.org/u/klemo4)
#### Post date: [May 4, 2021, 7:09pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/121 "2021-05-04T19:09:56Z")

</div>

THENK you man you have make my day. you have save me. i have no words to tell you. i have install and open the files with _4DView_ and i have archive them and decompress them. now i can fix the so i can print them. tnx again man

---

<div class="post-metadata">

### Author: ![Goli](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/goli/32/549_2.png) [@Goli](https://discourse.slicer.org/u/Goli)
#### Post date: [May 14, 2021, 4:09pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/122 "2021-05-14T16:09:48Z")

</div>

Thank you @lassoan, I used a Lego phantom to confirm the voxel sizes and everything was correct.  
On a different note, I have issues opening sample data (.vol) that a collaborator sent us from Hon Kong using an older GE scanner, with a RAB 4-8 probe. Would you know what the problem could be? Is it possible that .vol files from some scanners can’t be opened in Slicer?

---

<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: [May 14, 2021, 6:12pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/123 "2021-05-14T18:12:54Z")

</div>

SlicerHeart’s Kretzfile reader and Image3dAPI reader (with Ge’s plugin) can read most GE .vol files. If you can send an anonymized/phantom example image then I can have a look.

---

<div class="post-metadata">

### Author: ![Goli](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/goli/32/549_2.png) [@Goli](https://discourse.slicer.org/u/Goli)
#### Post date: [May 14, 2021, 10:25pm UTC](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808/124 "2021-05-14T22:25:40Z")

</div>

Thank you, here’s an example volume: [VOL Sample - Google Drive](https://drive.google.com/drive/folders/1pLmKvSodtOm8HNOHrraCAnqLsL0pkIV6?usp=sharing)

[Previous page](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808.md?page=5)

[Next page](https://discourse.slicer.org/t/loading-of-ge-kretz-ultrasound-volumes-vol-file/808.md?page=7)
