# Segmentation Editor: Painting raises VTK error: no input data

**URL:** <https://discourse.slicer.org/t/segmentation-editor-painting-raises-vtk-error-no-input-data/31793>\
**Category:** Support\
**Tags:** segmentation, slicermorph\
**Created:** [September 19, 2023, 4:14pm UTC](https://discourse.slicer.org/t/segmentation-editor-painting-raises-vtk-error-no-input-data/31793 "2023-09-19T16:14:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![gortm](https://avatars.discourse-cdn.com/v4/letter/g/848f3c/32.png) [@gortm](https://discourse.slicer.org/u/gortm)\
**Post date:** [September 19, 2023, 4:14pm UTC](https://discourse.slicer.org/t/segmentation-editor-painting-raises-vtk-error-no-input-data/31793/1 "2023-09-19T16:14:45Z")

</div>

Dear community,

First I’d like to mention that I’m new to slicer and probably I’m making a very obvious mistake.

While trying to segment ct data captured on a Skyscan 1176, I ran into the issue that I could not use the painting function. I followed the tutorial _Whole heart segmentation from cardiac CT in 10 minutes_ but when painting into the viewport I receive this error message in the python console: _[VTK] No input data_. The model looks fine in the viewport.

I imported the data using the slicermorph extension, which is why I also tagged it. Maybe I did something wrong there.

Any suggestions as to why I cannot use the painting function in the segmentation editor?

Thank you in advance!

---

<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:** [September 19, 2023, 4:49pm UTC](https://discourse.slicer.org/t/segmentation-editor-painting-raises-vtk-error-no-input-data/31793/2 "2023-09-19T16:49:14Z")

</div>

How are you importing the 1176 data into Slicer?

If the data are read as vector (RGB) then SegmentEditor won’t work.

In SlicerMorph there is a `SkyscanReconImport` module that simplifies the procedure, though it is not ideal to use if your data is too large or you want to downsample as you import etc. If that’s the case, use the `ImageStacks` module in SlicerMorph. Both of them will bring the data ready to be used in SegmentEditor.

---

<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 19, 2023, 7:39pm UTC](https://discourse.slicer.org/t/segmentation-editor-painting-raises-vtk-error-no-input-data/31793/3 "2023-09-19T19:39:09Z")

</div>

You are probably seeing this issue:

> <https://github.com/Slicer/Slicer/pull/7212>
>
> If there is no input or if the input has no points, the vtkTransformPolyDataFilt…er will display an error message on every update: "No input data", polluting the log and slowing down the application. To prevent logging the error, an error callback command is set that discards the message.

It should be harmless, but it’s being fixed to clear up the log. If painting actually isn’t working it’s some other issue.

---

<div class="post-metadata">

**Author:** ![gortm](https://avatars.discourse-cdn.com/v4/letter/g/848f3c/32.png) [@gortm](https://discourse.slicer.org/u/gortm)\
**Post date:** [September 19, 2023, 8:00pm UTC](https://discourse.slicer.org/t/segmentation-editor-painting-raises-vtk-error-no-input-data/31793/4 "2023-09-19T20:00:46Z")

</div>

Thank you very much for your reply @muratmaga!

Indeed I used Imagestack to import the files (tiff). SkyscanReconImport didn’t work because I was missing one image which I will get tomorrow. Otherwise I will have to adjust the log file which I would prefer not to.  
I will check if I accidentally imported it as RGB (I don’t know where the setting is).

---

<div class="post-metadata">

**Author:** ![gortm](https://avatars.discourse-cdn.com/v4/letter/g/848f3c/32.png) [@gortm](https://discourse.slicer.org/u/gortm)\
**Post date:** [September 19, 2023, 8:13pm UTC](https://discourse.slicer.org/t/segmentation-editor-painting-raises-vtk-error-no-input-data/31793/5 "2023-09-19T20:13:19Z")

</div>

Thank you @pieper for pointing out this bug.  
Looks like it’s exactly that. But what can I do about it? Should it still draw something? It doesn’t draw anything in my case.

---

<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:** [September 19, 2023, 8:24pm UTC](https://discourse.slicer.org/t/segmentation-editor-painting-raises-vtk-error-no-input-data/31793/6 "2023-09-19T20:24:31Z")

</div>

> [@gortm](#):
>
> I will check if I accidentally imported it as RGB (I don’t know where the setting is).

You can check whether your data is scalar (grayscale) or vector (RGB) under volumes module:

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

Imagestacks will normally convert the image to grayscale (scalar). Make sure that option is checked.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/1/61d3704b287fa341e0bb214e152f58148a595a23.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:** [September 19, 2023, 8:35pm UTC](https://discourse.slicer.org/t/segmentation-editor-painting-raises-vtk-error-no-input-data/31793/7 "2023-09-19T20:35:15Z")

</div>

> [@gortm](#):
>
> But what can I do about it? Should it still draw something? It doesn’t draw anything in my case.

Yes, it should still draw so if it’s still an issue after doing the steps that @muratmaga suggested, it would be great if you could share a few files (enough that someone could replicate the issue).

---

<div class="post-metadata">

**Author:** ![gortm](https://avatars.discourse-cdn.com/v4/letter/g/848f3c/32.png) [@gortm](https://discourse.slicer.org/u/gortm)\
**Post date:** [September 22, 2023, 5:19am UTC](https://discourse.slicer.org/t/segmentation-editor-painting-raises-vtk-error-no-input-data/31793/8 "2023-09-22T05:19:18Z")

</div>

Sorry, for taking so long to reply. I was running experiments and new CT scans the last couple days.

I resolved the issue. While not being 100% sure, what resolved the problem was downloading the files to have them locally. Probably an obvious solution but I prefer to leave such large datasets (20 Gb) on the NAS. Anyway, now I know and it worked now for another dataset too. The STLs I exported from it are impressively good.

What strangely doesn’t work is the SkyscanReconImport I always have to use ImageStack but that’s off-topic.

Thank you very much @muratmaga and @pieper 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:** [September 22, 2023, 10:55am UTC](https://discourse.slicer.org/t/segmentation-editor-painting-raises-vtk-error-no-input-data/31793/9 "2023-09-22T10:55:55Z")

</div>

> [@gortm](#):
>
> What strangely doesn’t work is the SkyscanReconImport I always have to use ImageStack but that’s off-topic.

If you can provide the error log for `SkyscanReconImport` and better yet provide a non-working dataset, we can take a look.
