# How to import all dicom files into one volume

**URL:** https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260
**Category:** Support
**Tags:** dicom
**Created:** [January 3, 2019, 8:13am UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260 "2019-01-03T08:13:48Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![TingtingYu](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@TingtingYu](https://discourse.slicer.org/u/TingtingYu)
#### Post date: [January 3, 2019, 8:13am UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260/1 "2019-01-03T08:13:48Z")

</div>

Hi,

I have a binary file contains volumetric information and its format was converted into DICOM format. Each .dcm file contains one-slide information. Then I imported all these dicom files, however, each slide was shown as a volume. Could you please show me how to import these DICOM files and form only one 3D volume? Thanks in advanced.

Best wishes,  
Tingting

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/d/0da4104db85a464379521d2c601e44de0f14bd60.png)

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [January 3, 2019, 2:33pm UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260/2 "2019-01-03T14:33:46Z")

</div>

Creating valid dicom data can be tricky - you may be better off trying to load the original volume data. If you can share the data or provide more information about it we might be able to help.

---

<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: [January 3, 2019, 3:45pm UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260/3 "2019-01-03T15:45:05Z")

</div>

It seems that you have selected multiple files. When you load DICOM data, drag-and-drop the containing _folder_ to the Slicer application screen and not individual files. See [DICOM module documentation](https://www.slicer.org/wiki/Documentation/Nightly/Modules/DICOM) for detailed instructions.

---

<div class="post-metadata">

### Author: ![TingtingYu](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@TingtingYu](https://discourse.slicer.org/u/TingtingYu)
#### Post date: [January 4, 2019, 2:21pm UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260/4 "2019-01-04T14:21:01Z")

</div>

Hi Steve,

Thank you for your quick reply. Below is the link that shares binary file. The grid size is 256x256x152.

[https://drive.google.com/file/d/1kiWJX9rBdzH00v\_Sa27b10HOOVTgWHjG/view?usp=sharing](https://drive.google.com/file/d/1kiWJX9rBdzH00v_Sa27b10HOOVTgWHjG/view?usp=sharing)

Best,  
Tingting

---

<div class="post-metadata">

### Author: ![TingtingYu](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@TingtingYu](https://discourse.slicer.org/u/TingtingYu)
#### Post date: [January 4, 2019, 2:32pm UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260/5 "2019-01-04T14:32:17Z")

</div>

Hi Andras,

Thank you for your response. I dragged and dropped the folder to the Slicer application screen. But it still show the same problem.

Best,  
Tingting

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/d/2d397ba8f8d9c62088804e4581e3b57a3d704f73.png)

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [January 4, 2019, 2:49pm UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260/6 "2019-01-04T14:49:51Z")

</div>

Hi @TingtingYu -

It does appear that the dicom files haven’t been converted properly. To load as a volume they would need to all be in the same study and series.

I would have a look, but the .bin file you posted won’t open for me. Can you post a .zip instead?

-Steve

---

<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: [January 4, 2019, 3:36pm UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260/7 "2019-01-04T15:36:06Z")

</div>

You might be able to fix these invalid files using DICOM Patcher module, by enabling “Force same patient name and ID in each directory” option.

---

<div class="post-metadata">

### Author: ![TingtingYu](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@TingtingYu](https://discourse.slicer.org/u/TingtingYu)
#### Post date: [January 7, 2019, 2:42am UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260/8 "2019-01-07T02:42:16Z")

</div>

Hi Steve,

Thank you for your help. No problem. Below is the .zip file.

[https://drive.google.com/file/d/1wmWkbIqVuBBTiXpX6z3pNVmWYJAJ863E/view?usp=sharing](https://drive.google.com/file/d/1wmWkbIqVuBBTiXpX6z3pNVmWYJAJ863E/view?usp=sharing)

Best,  
Tingting

---

<div class="post-metadata">

### Author: ![TingtingYu](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@TingtingYu](https://discourse.slicer.org/u/TingtingYu)
#### Post date: [January 7, 2019, 2:51am UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260/9 "2019-01-07T02:51:20Z")

</div>

Hi Andras,

Thank you for helping me.  
I tried the DICOM Patcher Module, but it still did not work. It gave me the warning below.

Best,  
Tingting

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/9/f9aafb6ae71bcb9a0c5c7fbadc65e6d275945c84.png)

---

<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: [January 7, 2019, 3:03am UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260/10 "2019-01-07T03:03:07Z")

</div>

The yip file contains a single “xcat-TrunPhanLesn-atn.bin” file in a file format that I don’t recognize. Please zip the folder that contains the DICOM files and send that.

---

<div class="post-metadata">

### Author: ![TingtingYu](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@TingtingYu](https://discourse.slicer.org/u/TingtingYu)
#### Post date: [January 7, 2019, 3:45am UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260/11 "2019-01-07T03:45:16Z")

</div>

Hi Andras,

Below is the link that shares zipped folder containing DICOM files.

[https://drive.google.com/file/d/1PCokDgtJUViGLLEw5Z4QCIURvia0qP0R/view?usp=sharing](https://drive.google.com/file/d/1PCokDgtJUViGLLEw5Z4QCIURvia0qP0R/view?usp=sharing)

I also share how I converted the format, it might help you read the .bin file.

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/7/c72d6137d4614ac2a0faae2e2fe58cc8582d6075.png)

Best,  
Tingting

---

<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: [January 7, 2019, 4:01am UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260/12 "2019-01-07T04:01:28Z")

</div>

You cannot create valid DICOM files like this. There are a number of required DICOM fields that you must set correctly (patient name, patient ID, series instance UID, image position patient, image orientation patient, etc). If you don’t want to learn how to create valid DICOM files then you can use using [nrrdwrite.m](https://github.com/PerkLab/SlicerMatlabBridge/blob/master/MatlabCommander/commandserver/nrrdwrite.m) to save the voxel array as .nrrd file that you can directly load into Slicer.

---

<div class="post-metadata">

### Author: ![TingtingYu](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@TingtingYu](https://discourse.slicer.org/u/TingtingYu)
#### Post date: [January 7, 2019, 11:34am UTC](https://discourse.slicer.org/t/how-to-import-all-dicom-files-into-one-volume/5260/13 "2019-01-07T11:34:20Z")

</div>

Hi Andras,

Thank you very much! It works.

Best wishes,  
Tingting

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/9/59cfa29e85fdc49693d19330b6d231f815fc3cad.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/b/4b241674096e3dcf52f3584a29d8a751ee318b2f.png)
