# Exporting volumetric ultrasound to DICOM

**URL:** <https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265>\
**Category:** Support\
**Created:** [March 2, 2022, 4:41pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265 "2022-03-02T16:41:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![koeglfryderyk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/koeglfryderyk/32/14638_2.png) [@koeglfryderyk](https://discourse.slicer.org/u/koeglfryderyk)\
**Post date:** [March 2, 2022, 4:41pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/1 "2022-03-02T16:41:52Z")

</div>

I want to export 3D ultrasound to DICOM.

When I choose the modality as US during export, and then load the exported DICOMs back it into Slicer, it gets loaded as a lot of separate slices, instead of one volume (like for example with an MR or CT):

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/f/cfbf25d8d5a15e0dfe74f9ea900155aefb41a90a.jpeg)

I can choose MR or CT as the modality and then it gets loaded as one volume, but that does not seem right.

What should I do?

---

<div class="post-metadata">

**Author:** ![errollgarner](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@errollgarner](https://discourse.slicer.org/u/errollgarner)\
**Post date:** [March 10, 2022, 4:09pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/2 "2022-03-10T16:09:11Z")

</div>

Does exporting it to a different format produce the same outcome?

---

<div class="post-metadata">

**Author:** ![koeglfryderyk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/koeglfryderyk/32/14638_2.png) [@koeglfryderyk](https://discourse.slicer.org/u/koeglfryderyk)\
**Post date:** [March 10, 2022, 4:15pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/3 "2022-03-10T16:15:38Z")

</div>

When I export it to .nii and import it back again it gets imported as a volume and not slices

---

<div class="post-metadata">

**Author:** ![koeglfryderyk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/koeglfryderyk/32/14638_2.png) [@koeglfryderyk](https://discourse.slicer.org/u/koeglfryderyk)\
**Post date:** [March 10, 2022, 4:18pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/4 "2022-03-10T16:18:04Z")

</div>

I also just noticed that I get the following warning (for each slice) when I load the dicoms:

> Warning in DICOM plugin Image sequence when examining loadable 1: US No series description [107]: Image spacing may need to be calibrated for accurate size measurements.

---

<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:** [April 6, 2022, 5:44am UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/6 "2022-04-06T05:44:07Z")

</div>

There is no commonly used DICOM standard for storing 3D/4D ultrasound images. What software do you plan to use to read the exported images? What DICOM information objects does that software support?

---

<div class="post-metadata">

**Author:** ![koeglfryderyk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/koeglfryderyk/32/14638_2.png) [@koeglfryderyk](https://discourse.slicer.org/u/koeglfryderyk)\
**Post date:** [April 6, 2022, 2:20pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/7 "2022-04-06T14:20:40Z")

</div>

Wouldn’t the [Enhanced Ultrasound Volume Storage (EUVS)](https://www.dicomstandard.org/News-dir/ftsup/docs/sups/sup43.pdf) be the DICOM standard to be used?

I’m preparing data for a publication on TCIA which wants all the data in DICOM - so I can’t say what kind of software other people would use to read those images.

However, I would ideally want to keep using Slicer and Python (Pydicom).

---

<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:** [April 6, 2022, 2:33pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/8 "2022-04-06T14:33:11Z")

</div>

@fedorov @David_Clunie What DICOM information object would you recommend to store 3D ultrasound data on TCIA?

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [April 6, 2022, 2:38pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/9 "2022-04-06T14:38:01Z")

</div>

I would recommend staying as close as possible (ie, keep everything that remains after de-identification following a DICOM profile) to the original representation produced by the US scanner, whatever it is. Exporting from NIFTI to any DICOM object will most likely result in meaningless metadata.

---

<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:** [April 6, 2022, 3:07pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/10 "2022-04-06T15:07:40Z")

</div>

3D ultrasound images in [RESECT](https://archive.norstore.no/pages/public/datasetDetail.jsf?id=10.11582/2017.00004) are created using research software, they are in MINC file format and have never been written to DICOM.

The only 3D ultrasound data in TCIA that I know of is the infamous Eigen Artemis volumes in the [Prostate-MRI-US-Biopsy](https://wiki.cancerimagingarchive.net/pages/viewpage.action?pageId=68550661) collection, but I would not want to follow bad practices. [@David\_Clunie’s recommendations a few years ago](https://github.com/SlicerHeart/SlicerHeart/blob/master/Docs/ImageImportExport.md#eigen-artemis) when the Artemis data set was discussed was:

> It would obviously be far preferable (for us) if the submitter did created an Enhanced US Volume instance, but then probably nobody would be able to display it, so in a clinical product they would have to be able to create both, depending on what the user could cope with. They could stuff the Enhanced US Volume attributes (esp. the spatial macros) in the old SOP Class (as a Standard Extended SOP Class), which would probably be a good compromise.

@fedorov do you know about any such data set or tools or examples that can create such Standard Extended SOP Class files? Or we should just use the enhanced format and not care about incompatibility with clinical software?

---

<div class="post-metadata">

**Author:** ![koeglfryderyk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/koeglfryderyk/32/14638_2.png) [@koeglfryderyk](https://discourse.slicer.org/u/koeglfryderyk)\
**Post date:** [April 6, 2022, 3:20pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/11 "2022-04-06T15:20:12Z")

</div>

I just gave the RESECT file as an example as I’m not allowed to share my data yet. Bu this is how I gather all my data:

1. Ultrasound is recorded during surgery with Brainlab Curve
2. The data is sent from the Brainlab Curve with OpenIGTLink to a PC with Slicer on it
3. The files arrive as .nrrd and are saved  
(4. In order to publish them I’m supposed to convert them to DICOM)

---

<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:** [April 6, 2022, 3:28pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/12 "2022-04-06T15:28:11Z")

</div>

> [@koeglfryderyk](#):
>
> - The data is sent from the Brainlab Curve with OpenIGTLink to a PC with Slicer on it
> - The files arrive as .nrrd and are saved

OK, this is essentially the same as the case with RESECT, i.e., research software creates a 3D ultrasound volume, so the 3D ultrasound DICOM files must be created from scratch.

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [April 6, 2022, 3:53pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/13 "2022-04-06T15:53:40Z")

</div>

Thank you for the clarification, I didn’t know those details.

First and foremost, even if you end up doing the conversion to DICOM, I would recommend including the original data as collected by the acquisition equipment in the final package you will be sharing via TCIA.

If you decide to explore conversion to DICOM, I am not aware of any tools or examples that you could leverage. Reading the recommendation from @dclunie, it sounds like the recommended approach is not something that anyone implemented before. Quite likely, it will take significant effort to create those standard representations (it is not even clear to me if that compromise suggested would pass David’s validator - and if it is expected that validation will not be passed, it will be challenging to distinguish expected errors from the real errors).

My recommendation would be to proceed with sharing of the data in NRRD format to make them available expediently, and in parallel evaluate the effort that would be required to follow recommendations from David.

---

<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:** [April 6, 2022, 4:02pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/14 "2022-04-06T16:02:19Z")

</div>

> [@fedorov](#):
>
> My recommendation would be to proceed with sharing of the data in NRRD format to make them available expediently, and in parallel evaluate the effort that would be required to follow recommendations from David.

Sounds good to me. @koeglfryderyk I can offer my help with implementing 3D ultrasound DICOM import/export plugin for Slicer if you can provide a Python script that creates a valid DICOM file (e.g., using [pydicom](https://pydicom.github.io/)). I can also help with advice/review your Python script and participate in a few meetings with @David_Clunie and TCIA folks to agree in an acceptable file format.

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [April 6, 2022, 4:10pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/15 "2022-04-06T16:10:34Z")

</div>

@koeglfryderyk if you decide to work on such a converter, I can also advice/participate in a few meetings. I do not anticipate TCIA will have any guidance on the details of DICOM encoding. As long as the result passes David’s validator, or has David’s approval, I am sure it will be fine, so we can save the time. I am not sure David is monitoring this forum, so I will add this topic to my agenda for the weekly meeting with David on Friday, and can update this thread after that. For me the key question is how useful the resulting converter would be for the community beyond your specific use case, and whether the investment of effort is justified.

---

<div class="post-metadata">

**Author:** ![koeglfryderyk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/koeglfryderyk/32/14638_2.png) [@koeglfryderyk](https://discourse.slicer.org/u/koeglfryderyk)\
**Post date:** [April 6, 2022, 4:25pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/16 "2022-04-06T16:25:54Z")

</div>

@fedorov ok, thank you for your advice. I’ll share it as NRRD then, this will save me a lot of time.

@lassoan thank you for your offer of help. I think I’ll first try to determine, as @fedorov mentioned, whether anyone else would use this and if the investment would make sense.

---

<div class="post-metadata">

**Author:** ![koeglfryderyk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/koeglfryderyk/32/14638_2.png) [@koeglfryderyk](https://discourse.slicer.org/u/koeglfryderyk)\
**Post date:** [April 6, 2022, 4:28pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/17 "2022-04-06T16:28:30Z")

</div>

However, I have one last question:

When I load the exported US DICOM, next to the slices there is also a Scalar volume loaded, which contains all the data in one volume, however, the pixel spacing is incorrect (as I describe [here](https://github.com/Slicer/Slicer/issues/6303)).

So it seems to me like the exporting and loading of 3D US in Slicer kind of works, only that it also loads slices and has wrong pixel spacing

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [April 8, 2022, 2:05pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/18 "2022-04-08T14:05:13Z")

</div>

> [@koeglfryderyk](#):
>
> @fedorov ok, thank you for your advice. I’ll share it as NRRD then, this will save me a lot of time.

@koeglfryderyk I discussed this with David Clunie today. There is a NRRD to DICOM converter that he has: [NRRDToDicom](https://www.dclunie.com/pixelmed/software/javadoc/com/pixelmed/convert/NRRDToDicom.html), but it currently does not have the features needed to produce DICOM US. David thinks it may not be a very complex task to improve that converter to generate DICOM US, he is willing to spend time on this, and we can justify this work within the scope of the IDC project. BUT in order to start David would need a sample of your data. I understand you are not able to share that yet, but as soon as you can, it would be great if you could update this thread, or email me, so we can start this work.

The converter will likely be useful to others, and you won’t find a better expert to work on this than David Clunie, so let’s make sure we use this opportunity!

---

<div class="post-metadata">

**Author:** ![koeglfryderyk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/koeglfryderyk/32/14638_2.png) [@koeglfryderyk](https://discourse.slicer.org/u/koeglfryderyk)\
**Post date:** [April 15, 2022, 5:34pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/19 "2022-04-15T17:34:13Z")

</div>

Would you need a 3D US DICOM or NRRD?

---

<div class="post-metadata">

**Author:** ![fedorov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/fedorov/32/14_2.png) [@fedorov](https://discourse.slicer.org/u/fedorov)\
**Post date:** [April 15, 2022, 5:43pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/20 "2022-04-15T17:43:20Z")

</div>

I thought NRRD is the only thing that you have, no?

---

<div class="post-metadata">

**Author:** ![koeglfryderyk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/koeglfryderyk/32/14638_2.png) [@koeglfryderyk](https://discourse.slicer.org/u/koeglfryderyk)\
**Post date:** [April 15, 2022, 5:46pm UTC](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265/21 "2022-04-15T17:46:13Z")

</div>

For most cases we have only NRRDs, but we have DICOMs for a few specific ones. We are still working on getting everything in DICOM, but this depends on on Brainlab fixing some things and not on us.

[Next page](https://discourse.slicer.org/t/exporting-volumetric-ultrasound-to-dicom/22265.md?page=2)
