# Error: \[VTK\] Input port 0 of algorithm vtkImageMapToWindowLevelColors (000001A807D0A830) has 0 connections but is not optional. \[VTK\] Input port 0 of algorithm vtkImageThreshold (000001A86BF0BB60) has 0 connections but is not optional.

**URL:** <https://discourse.slicer.org/t/error-vtk-input-port-0-of-algorithm-vtkimagemaptowindowlevelcolors-000001a807d0a830-has-0-connections-but-is-not-optional-vtk-input-port-0-of-algorithm-vtkimagethreshold-000001a86bf0bb60-has-0-connections-but-is-not-optional/43395>\
**Category:** Support\
**Created:** [June 17, 2025, 4:52pm UTC](https://discourse.slicer.org/t/error-vtk-input-port-0-of-algorithm-vtkimagemaptowindowlevelcolors-000001a807d0a830-has-0-connections-but-is-not-optional-vtk-input-port-0-of-algorithm-vtkimagethreshold-000001a86bf0bb60-has-0-connections-but-is-not-optional/43395 "2025-06-17T16:52:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anpus](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@anpus](https://discourse.slicer.org/u/anpus)\
**Post date:** [June 17, 2025, 4:52pm UTC](https://discourse.slicer.org/t/error-vtk-input-port-0-of-algorithm-vtkimagemaptowindowlevelcolors-000001a807d0a830-has-0-connections-but-is-not-optional-vtk-input-port-0-of-algorithm-vtkimagethreshold-000001a86bf0bb60-has-0-connections-but-is-not-optional/43395/1 "2025-06-17T16:52:19Z")

</div>

Hi,

I am using 3D slicer (Slicer version 5.4.0.) for improving the image quality in real-time by integrating .h5 model.  
But I’m getting a lot of errors in the console.

[VTK] Input port 0 of algorithm vtkImageMapToWindowLevelColors (000001A807D0A830) has 0 connections but is not optional.  
[VTK] Input port 0 of algorithm vtkImageThreshold (000001A86BF0BB60) has 0 connections but is not optional.

Has anybody encountered this error before?  
I hope you can help me, Thank you in adavance!.

---

<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 17, 2025, 4:52pm UTC](https://discourse.slicer.org/t/error-vtk-input-port-0-of-algorithm-vtkimagemaptowindowlevelcolors-000001a807d0a830-has-0-connections-but-is-not-optional-vtk-input-port-0-of-algorithm-vtkimagethreshold-000001a86bf0bb60-has-0-connections-but-is-not-optional/43395/2 "2025-06-17T16:52:43Z")

</div>

Probably in one of the slice views you selected to display an empty image.

---

<div class="post-metadata">

**Author:** ![anpus](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@anpus](https://discourse.slicer.org/u/anpus)\
**Post date:** [June 17, 2025, 5:08pm UTC](https://discourse.slicer.org/t/error-vtk-input-port-0-of-algorithm-vtkimagemaptowindowlevelcolors-000001a807d0a830-has-0-connections-but-is-not-optional-vtk-input-port-0-of-algorithm-vtkimagethreshold-000001a86bf0bb60-has-0-connections-but-is-not-optional/43395/3 "2025-06-17T17:08:00Z")

</div>

Hi, thank you for the reply!.

yes, you are absolutely right-- I can see the “No Image” text in one of the slice views, so it seems like an empty image is selected. I’m not sure how to fix this.

I trained a DL model to remove noise and then tried to integrate it into 3D Slicer (v5.4.0) as a scripted module (similar to SegmentationUNet). My goal is to perform denoising in real-time.

Is there something I should check in my code to avoid this?

Thanks a lot in advance for your help!
