# How to turn off ImageSeriesReader Warnings? (SimpleITK JAVA)

**URL:** https://discourse.itk.org/t/how-to-turn-off-imageseriesreader-warnings-simpleitk-java/6217
**Category:** Uncategorized
**Created:** [September 20, 2023, 6:44pm UTC](https://discourse.itk.org/t/how-to-turn-off-imageseriesreader-warnings-simpleitk-java/6217 "2023-09-20T18:44:51Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Salu\_Ramos](https://discourse.itk.org/user_avatar/discourse.itk.org/salu_ramos/32/3619_2.png) [@Salu\_Ramos](https://discourse.itk.org/u/Salu_Ramos)
#### Post date: [September 20, 2023, 6:44pm UTC](https://discourse.itk.org/t/how-to-turn-off-imageseriesreader-warnings-simpleitk-java/6217/1 "2023-09-20T18:44:51Z")

</div>

the ImageSeriesReader are printing Warnings in my console when opening certain series.

 ![image](https://discourse.itk.org/uploads/default/original/2X/a/a6cdef1cb85b4e6f91e5206ee5445b348a760597.png)

i’m using debugOff() method but is not working for this warnings.

---

<div class="post-metadata">

### Author: ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)
#### Post date: [September 20, 2023, 6:50pm UTC](https://discourse.itk.org/t/how-to-turn-off-imageseriesreader-warnings-simpleitk-java/6217/2 "2023-09-20T18:50:49Z")

</div>

Hello,

You can find some information on SimpleITK/ITK’s logging on this documentation page:  
[https://simpleitk.readthedocs.io/en/master/link\_Logging\_docs.html](https://simpleitk.readthedocs.io/en/master/link_Logging_docs.html)

These are warnings and not debug message. The warnings can be global disabled with the ` ProcessObject::SetGlobalWarningDisplay` method.

However, this message does not look like it should be ignored. There is something fundamental wrong with either how you are loading the data set or with the files.

---

<div class="post-metadata">

### Author: ![Salu\_Ramos](https://discourse.itk.org/user_avatar/discourse.itk.org/salu_ramos/32/3619_2.png) [@Salu\_Ramos](https://discourse.itk.org/u/Salu_Ramos)
#### Post date: [September 20, 2023, 6:58pm UTC](https://discourse.itk.org/t/how-to-turn-off-imageseriesreader-warnings-simpleitk-java/6217/3 "2023-09-20T18:58:10Z")

</div>

Hi @blowekamp ,

i’ve been receiving these alerts for months and apparently it doesn’t affect any functionality, so I’d like to make the console cleaner. It seems to me to be a problem with the series and not with the software.

opening with radiant dicom viewer shows:

![image](https://discourse.itk.org/uploads/default/original/2X/7/7fa52251e4df1e8865997f57c75705f77c22bdc8.png)

---

<div class="post-metadata">

### Author: ![Salu\_Ramos](https://discourse.itk.org/user_avatar/discourse.itk.org/salu_ramos/32/3619_2.png) [@Salu\_Ramos](https://discourse.itk.org/u/Salu_Ramos)
#### Post date: [September 21, 2023, 4:43pm UTC](https://discourse.itk.org/t/how-to-turn-off-imageseriesreader-warnings-simpleitk-java/6217/4 "2023-09-21T16:43:30Z")

</div>

I achieved what I wanted with the following code:

```auto
SimpleITKJNI.ProcessObject_setGlobalWarningDisplay(false);

```

Thanks @blowekamp !

---

<div class="post-metadata">

### Author: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [September 21, 2023, 5:36pm UTC](https://discourse.itk.org/t/how-to-turn-off-imageseriesreader-warnings-simpleitk-java/6217/5 "2023-09-21T17:36:46Z")

</div>

Hello @Salu_Ramos,

Disabling warnings globally is a bit of an extreme approach and may not be what you want. It may work for you in this instance and is trivial to implement, but only do it if you are convinced **all** warnings can be ignored as false positives.

Having said that, I strongly suggest following @blowekamp’s advice about using a logging based approach. This will hide the messages from the user but will make them available to the developer if something goes wrong.
