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

@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.

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

You can follow this example.

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:

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):

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 .

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.

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.

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

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

Thanks @lassoan . It is working.

1 Like

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.

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 and read the files using the official GE reader instead of the open implementation.

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.

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

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

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?

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…

Also, there is GE’s program 4DView

There is a link to 4DView installer (1drv) in description of SlicerHeart

Edit:
It seems to be possible to archive a file in 4DView without compression, here is one re-exported file

1 Like

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

1 Like

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?

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.

Thank you, here’s an example volume: VOL Sample - Google Drive