# Load scene into Slicer

**URL:** <https://discourse.slicer.org/t/load-scene-into-slicer/31566>\
**Category:** Support\
**Created:** [September 5, 2023, 12:34pm UTC](https://discourse.slicer.org/t/load-scene-into-slicer/31566 "2023-09-05T12:34:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kening\_Zhang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kening_zhang/32/65641_2.png) [@Kening\_Zhang](https://discourse.slicer.org/u/Kening_Zhang)\
**Post date:** [September 5, 2023, 12:34pm UTC](https://discourse.slicer.org/t/load-scene-into-slicer/31566/1 "2023-09-05T12:34:19Z")

</div>

Dear developers,

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/9/896c0fb8deccc66625e9ea25fa5778f8f424f849.png)  
As can be seen in the code, I try to load a scene in Slicer, but errors happened,  
it says:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/f/6ff1716ab709e5da4ec6c065c966c229b51f1a94.png)  
and I tried to load it just dragging the file into Slicer, error shows:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/a/facdeb27d16162078b1e136eb2487d479ff44391.png)  
It seems a vtp file has errors, from my point of view, T\_PLIC\_left seems to be a empty file. I dont know how to settle this problem,  
by the way, other errors show but I dont know which line of code bring this, such as this:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/f/6f0542e75290fb95013a64259757bc190651003f.png)  
Best wishes,  
Joshua

---

<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:** [September 5, 2023, 1:05pm UTC](https://discourse.slicer.org/t/load-scene-into-slicer/31566/2 "2023-09-05T13:05:08Z")

</div>

> [@Kening\_Zhang](#):
>
> T\_PLIC\_left seems to be a empty file

Please check with other versions of slicer to see if this is a regression and if so provide a dataset that can be used for debugging.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 5, 2023, 2:33pm UTC](https://discourse.slicer.org/t/load-scene-into-slicer/31566/3 "2023-09-05T14:33:38Z")

</div>

Do you have the SlicerDMRI extension installed? Based on the error it seems that it would be necessary.

---

<div class="post-metadata">

**Author:** ![Kening\_Zhang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kening_zhang/32/65641_2.png) [@Kening\_Zhang](https://discourse.slicer.org/u/Kening_Zhang)\
**Post date:** [September 5, 2023, 2:34pm UTC](https://discourse.slicer.org/t/load-scene-into-slicer/31566/4 "2023-09-05T14:34:54Z")

</div>

Yes I have installed it in my 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:** [September 5, 2023, 4:38pm UTC](https://discourse.slicer.org/t/load-scene-into-slicer/31566/5 "2023-09-05T16:38:59Z")

</div>

> [@Kening\_Zhang](#):
>
> It seems a vtp file has errors, from my point of view, T\_PLIC\_left seems to be a empty file. I dont know how to settle this problem,

If you don’t expect that file to contain some valid content then you can ignore this error. VTK may report it as an error when you attempt to read or write an empty file, while it may be normal that a fiber is empty.

I would suggest you to report this error to the SlicerDMRI extension repository. You can add a note that a possible fix would be to apply the same technique as it is done in the model storage node: use the [`SkippedNoData` write state](https://github.com/Slicer/Slicer/blob/4540594f5ff293cb387fd252e24e32be13e377c8/Libs/MRML/Core/vtkMRMLModelStorageNode.cxx#L160C32-L160C45) to indicate that the file is expected to be empty.

---

<div class="post-metadata">

**Author:** ![Kening\_Zhang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kening_zhang/32/65641_2.png) [@Kening\_Zhang](https://discourse.slicer.org/u/Kening_Zhang)\
**Post date:** [September 5, 2023, 5:02pm UTC](https://discourse.slicer.org/t/load-scene-into-slicer/31566/6 "2023-09-05T17:02:24Z")

</div>

> [@lassoan](#):
>
> If you don’t expect that file to contain some valid content then you can ignore this error. VTK may report it as an error when you attempt to read or write an empty file, while it may be normal that a fiber is empty.
> 
> I would suggest you to report this error to the SlicerDMRI extension repository. You can add a note that a possible fix would be to apply the same technique as it is done in the model storage node: use the [`SkippedNoData` write state](https://github.com/Slicer/Slicer/blob/4540594f5ff293cb387fd252e24e32be13e377c8/Libs/MRML/Core/vtkMRMLModelStorageNode.cxx#L160C32-L160C45) to indicate that the file is expected to be empty.

Yes this is what I want, it should still load the scene even there are some empty fibers.

---

<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:** [September 7, 2023, 6:31pm UTC](https://discourse.slicer.org/t/load-scene-into-slicer/31566/7 "2023-09-07T18:31:10Z")

</div>

The scene is still loaded. The error just lets you know that there were fiber nodes that were empty, so you can ignore them. It would be still nice to fix to avoid having these false alarms.

Have you submitted a bug report to SlicerDMRI? Could you post the link here for reference? Thank you.

---

<div class="post-metadata">

**Author:** ![Kening\_Zhang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kening_zhang/32/65641_2.png) [@Kening\_Zhang](https://discourse.slicer.org/u/Kening_Zhang)\
**Post date:** [September 8, 2023, 7:21am UTC](https://discourse.slicer.org/t/load-scene-into-slicer/31566/8 "2023-09-08T07:21:34Z")

</div>

Yes, I have reported. Here is the link: [Load scene into Slicer with empty vtk errors - Community / SlicerDMRI - 3D Slicer Community](https://discourse.slicer.org/t/load-scene-into-slicer-with-empty-vtk-errors/31615).  
Thanks so much.

---

<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:** [September 8, 2023, 11:30am UTC](https://discourse.slicer.org/t/load-scene-into-slicer/31566/9 "2023-09-08T11:30:00Z")

</div>

Thanks for the link. However, I meant to file a bug report in the [SlicerDMRI repository’s bugtracker](https://github.com/SlicerDMRI/SlicerDMRI/issues). There is a higher chance that maintainers will notice and eventually fix it.

---

<div class="post-metadata">

**Author:** ![Kening\_Zhang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kening_zhang/32/65641_2.png) [@Kening\_Zhang](https://discourse.slicer.org/u/Kening_Zhang)\
**Post date:** [September 8, 2023, 2:51pm UTC](https://discourse.slicer.org/t/load-scene-into-slicer/31566/10 "2023-09-08T14:51:48Z")

</div>

I am sorry for misunderstanding that. I reported the same one in bugtracker now, here is the link: [Load scene into Slicer with empty vtk errors · Issue #181 · SlicerDMRI/SlicerDMRI (github.com)](https://github.com/SlicerDMRI/SlicerDMRI/issues/181)
