# "Adding data failed" Files edited with "Segment Editor" cannot be reopened

**URL:** <https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058>\
**Category:** Support\
**Created:** [June 26, 2024, 8:37pm UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058 "2024-06-26T20:37:13Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![JSteinJ](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@JSteinJ](https://discourse.slicer.org/u/JSteinJ)\
**Post date:** [June 26, 2024, 8:37pm UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/1 "2024-06-26T20:37:13Z")

</div>

using slicer 5.6.2 on win11

we are segmenting a few hundred mri brain images.  
we have mri scans stored in .nii.gz format.  
we have segmentations stored in the same .nii.gz format.

now we are adding new features so we have to edit the segmentations.  
opening scans & segmentations via drag and drop…  
scans as VOLUMES  
segmentations as SEGMENTATION

after editing (it is really cumbersome that Slicer doesn’t remember the settings ;( )  
we save the new segmentation as .nrrd segmentations.

NOW! We reopen this .nrrd segmentations as VOLUMES and save the segmentations as .nii.gz again.  
That works in many cases, BUT there are lots of cases where we get an error:

Adding data failed  
Error occurred while loading the selected file  
Click “Show details” button to…

End the info of the “Show details” button is:  
Error: …file… - load failed.

Any idea how we can solve this problem???  
Thanks for your help.

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [June 26, 2024, 10:02pm UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/2 "2024-06-26T22:02:26Z")

</div>

Please use seg.nrrd format to keep your segmentations, if you want to avoid issues like this.

---

<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:** [June 27, 2024, 3:23am UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/3 "2024-06-27T03:23:17Z")

</div>

> [@JSteinJ](#):
>
> after editing (it is really cumbersome that Slicer doesn’t remember the settings

Slicer remembers the settings. If you can give more details about what details are not preserved then let us know.

> [@JSteinJ](#):
>
> End the info of the “Show details” button is:  
> Error: …file… - load failed.

If you provide more information (for example, an image that cannot be opened) then we can have a look. However, I agere with @muratmaga - there is a good chance that the issues are due to that you are using NIFTI file format. NIFTI is not a general-purpose 3D image file format and it suffers from ambiguities and has serious limitations.

---

<div class="post-metadata">

**Author:** ![JSteinJ](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@JSteinJ](https://discourse.slicer.org/u/JSteinJ)\
**Post date:** [June 27, 2024, 5:16am UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/4 "2024-06-27T05:16:17Z")

</div>

thank you for your help…  
can you give me an address where I can show such files?  
This is multi-center machine learning data. So there are no .nrrd files.

Oh really?  
What I mean:  
when I do the next segmentation and I open the segmentation in the segment editor, for example the 3d view is inactive at the start… I would like to have it active…  
e.g. Paint tool:  
Diameter of paint tool is 3% I need 1%  
Sphere brush is inactive, I need it active…  
Editable intensity range is inactive… need it active…  
and so on… other tools as well.  
that would be really nice to have…

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [June 27, 2024, 6:12am UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/5 "2024-06-27T06:12:46Z")

</div>

> [@JSteinJ](#):
>
> can you give me an address where I can show such files?

You can post it on dropbox, google drive, onedrive publicly and share the link:

---

<div class="post-metadata">

**Author:** ![JSteinJ](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@JSteinJ](https://discourse.slicer.org/u/JSteinJ)\
**Post date:** [June 28, 2024, 8:23am UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/6 "2024-06-28T08:23:01Z")

</div>

here are links to 2 .nrrd files…  
in this case the files can be opened as .nrrd but not as volume  
 → cannot be stored as nifi then…

have to look for those that cannot be reopened in both ways… (perhaps they are redone meanwhile…)

---

<div class="post-metadata">

**Author:** ![JSteinJ](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@JSteinJ](https://discourse.slicer.org/u/JSteinJ)\
**Post date:** [June 28, 2024, 8:58am UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/7 "2024-06-28T08:58:55Z")

</div>

> **[Google Drive: Sign-in](https://accounts.google.com/v3/signin/identifier?continue=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1csCuW1BxtYbCovv3vTIABSkNJmwzcPwO%2Fview%3Fusp%3Ddrive_link&followup=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1csCuW1BxtYbCovv3vTIABSkNJmwzcPwO%2Fview%3Fusp%3Ddrive_link&ifkv=AS5LTAQewgpUtU9Msog0MQmbS7_RQJLYxoey8tJGFOdiAOomIjBA2CsA0fAtmEIPyVOZCmuiUugeiQ&osid=1&passive=1209600&service=wise&flowName=GlifWebSignIn&flowEntry=ServiceLogin&dsh=S1963631806%3A1719565120926863&ddm=0)**
>
> Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).

> **[Google Drive: Sign-in](https://accounts.google.com/v3/signin/identifier?continue=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1HySw-z6pydKf3aWcUer1KnA6nQIbpKZY%2Fview%3Fusp%3Ddrive_link&followup=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1HySw-z6pydKf3aWcUer1KnA6nQIbpKZY%2Fview%3Fusp%3Ddrive_link&ifkv=AS5LTAQoDlNOWTNgwOIL0oRQbhxmBod46P5fvaqxJKEMRzDCz0jOCkeFRJ4RSJpiO3RjgRpk_700vw&osid=1&passive=1209600&service=wise&flowName=GlifWebSignIn&flowEntry=ServiceLogin&dsh=S-2029062529%3A1719565124505591&ddm=0)**
>
> Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).

---

<div class="post-metadata">

**Author:** ![JSteinJ](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@JSteinJ](https://discourse.slicer.org/u/JSteinJ)\
**Post date:** [June 28, 2024, 9:00am UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/8 "2024-06-28T09:00:22Z")

</div>

?? no idea if it works…

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [June 28, 2024, 2:06pm UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/9 "2024-06-28T14:06:00Z")

</div>

> [@JSteinJ](#):
>
> ??

You did not publicly share.

---

<div class="post-metadata">

**Author:** ![JSteinJ](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@JSteinJ](https://discourse.slicer.org/u/JSteinJ)\
**Post date:** [July 1, 2024, 9:45am UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/10 "2024-07-01T09:45:55Z")

</div>

[Training\_226\_seg.nii.nrrd - Google Drive](https://drive.google.com/file/d/1HySw-z6pydKf3aWcUer1KnA6nQIbpKZY/view?usp=drive_link), [Training\_201\_seg.nii.gz.nrrd - Google Drive](https://drive.google.com/file/d/1csCuW1BxtYbCovv3vTIABSkNJmwzcPwO/view?usp=drive_link)

so hope it works now…

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [July 1, 2024, 2:54pm UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/11 "2024-07-01T14:54:00Z")

</div>

I was able to open both files and load them as segmentations without any problem or error messages. I didn’t have to change anything or set any option. I can edit them as well.

What is the specific problem you are facing?

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

---

<div class="post-metadata">

**Author:** ![JSteinJ](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@JSteinJ](https://discourse.slicer.org/u/JSteinJ)\
**Post date:** [July 2, 2024, 5:11am UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/12 "2024-07-02T05:11:15Z")

</div>

yes that is correct.  
the problem is: how to convert it into niftis again?  
when I want to store it as nifti, I have to open it as VOLUME and that doesn t work…  
is there a workaround?  
thanks…

(there just one or two that don t open as segmentation & volume but thats not a problem to segment this number again… )

---

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [July 2, 2024, 5:30am UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/13 "2024-07-02T05:30:18Z")

</div>

As we me

> [@JSteinJ](#):
>
> when I want to store it as nifti,

As we mentioned before, you will run into issues if you try to save a segmentation file as a nifti and try to load it as a segmentation into Slicer. NIFTI format will not store all the necessary information (like segment names, colors etc), and Slicer will have trouble reading back as a segmentation.

If you **must** save a nifti for some reason, then first export your segmentaiton as a labelmap, then you can save it as nifti. However, you will loose things like segment names and colors. To avoid that you can also look into creating a custom color table.

---

<div class="post-metadata">

**Author:** ![JSteinJ](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@JSteinJ](https://discourse.slicer.org/u/JSteinJ)\
**Post date:** [July 2, 2024, 9:16am UTC](https://discourse.slicer.org/t/adding-data-failed-files-edited-with-segment-editor-cannot-be-reopened/37058/14 "2024-07-02T09:16:01Z")

</div>

brilliant! segment names & colors don t matter…  
thank you!
