# Blank viewport with errors while using Orthanc dicom-web

**URL:** <https://discourse.orthanc-server.org/t/blank-viewport-with-errors-while-using-orthanc-dicom-web/3654>\
**Category:** General\
**Created:** [June 23, 2023, 4:38am UTC](https://discourse.orthanc-server.org/t/blank-viewport-with-errors-while-using-orthanc-dicom-web/3654 "2023-06-23T04:38:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sonaliayash](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/sonaliayash/32/1930_2.png) [@sonaliayash](https://discourse.orthanc-server.org/u/sonaliayash)\
**Post date:** [June 23, 2023, 4:38am UTC](https://discourse.orthanc-server.org/t/blank-viewport-with-errors-while-using-orthanc-dicom-web/3654/1 "2023-06-23T04:38:10Z")

</div>

Hi All,

I am using Orthanc and OHIF plugin with this dicom-web configuration:

```auto
{
	...
	"DicomWeb": {
		"Enable": true,
		"Root": "/dicom-web/",
		"EnableWado": true,
		"WadoRoot": "/wado",
		"Ssl": false,
		"QidoCaseSensitive": false,
		"Servers": {
			"sample": ["http://127.0.0.1:8042/dicom-web/"]
		},
		"StudiesMetadata": "MainDicomTags",
		"SeriesMetadata": "MainDicomTags"
	}
}

```

When I tried to load the viewer, I got a blank viewport and these errors:  
 ![image](https://discourse.orthanc-server.org/uploads/default/original/2X/6/6a3a67fc31cff3d8631fb4835e4648d186cebd4b.png)

Any help on this topic is appreciated!

Regards,  
Yash

---

<div class="post-metadata">

**Author:** ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)\
**Post date:** [June 23, 2023, 5:30am UTC](https://discourse.orthanc-server.org/t/blank-viewport-with-errors-while-using-orthanc-dicom-web/3654/2 "2023-06-23T05:30:31Z")

</div>

Hello,

Your screenshot is unreadable. Have you tried using the [default “dicom-json” data source](https://book.orthanc-server.com/plugins/ohif.html#using-dicomweb) instead of DICOMweb?

If you expect further support from this discussion forum, please share a [minimal working example](https://book.orthanc-server.com/users/support.html#discussing-a-minimal-working-example), i.e. a sample DICOM study for other people to reproduce your issue.

Regards,  
Sébastien-

---

<div class="post-metadata">

**Author:** ![sonaliayash](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/sonaliayash/32/1930_2.png) [@sonaliayash](https://discourse.orthanc-server.org/u/sonaliayash)\
**Post date:** [June 23, 2023, 6:12am UTC](https://discourse.orthanc-server.org/t/blank-viewport-with-errors-while-using-orthanc-dicom-web/3654/3 "2023-06-23T06:12:34Z")

</div>

Hi, apologies for the quality of the screenshot.

About using the dicom-json data source, do I just have to set the property like this

```auto
  "OHIF" : {
    "DataSource" : "dicom-json"
  }

```

Or, do I have to make changes to the Orthand dicom-web and OHIF app.config as well?

---

<div class="post-metadata">

**Author:** ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)\
**Post date:** [June 23, 2023, 6:25am UTC](https://discourse.orthanc-server.org/t/blank-viewport-with-errors-while-using-orthanc-dicom-web/3654/4 "2023-06-23T06:25:21Z")

</div>

> [@sonaliayash](#):
>
> About using the dicom-json data source, do I just have to set the property like this
> 
> ```auto
> "OHIF" : {
> "DataSource" : "dicom-json"
> }
> 
> ```
> 
> Or, do I have to make changes to the Orthand dicom-web and OHIF app.config as well?

You can simply remove all the `OHIF` section from the configuration file. This will use the default configuration.

---

<div class="post-metadata">

**Author:** ![sonaliayash](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/sonaliayash/32/1930_2.png) [@sonaliayash](https://discourse.orthanc-server.org/u/sonaliayash)\
**Post date:** [June 23, 2023, 6:43am UTC](https://discourse.orthanc-server.org/t/blank-viewport-with-errors-while-using-orthanc-dicom-web/3654/5 "2023-06-23T06:43:29Z")

</div>

Thanks @jodogne it worked!

A related question to dicom-json, would it be possible to have these configuration properties  
a. Enable the OHIF study list  
b. enable lazy loading

Something like this?

```auto
{
  window.config.showStudyList = true;
  window.config.dataSources = [
    {
      friendlyName: 'Orthanc DICOM JSON',
      namespace: '@ohif/extension-default.dataSourcesModule.dicomjson',
      sourceName: 'dicomjson',
      configuration: {
        name: 'json',
        enableStudyLazyLoad: true,
      },
    }
  ];

  window.config.defaultDataSourceName = 'dicomjson';
}

```

---

<div class="post-metadata">

**Author:** ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)\
**Post date:** [June 23, 2023, 8:24am UTC](https://discourse.orthanc-server.org/t/blank-viewport-with-errors-while-using-orthanc-dicom-web/3654/6 "2023-06-23T08:24:43Z")

</div>

a. The OHIF study list is unavailable by design of OHIF if using the DICOM JSON source. So, you’ll have to resort to Orthanc Explorer 1 or [Orthanc Explorer 2](https://book.orthanc-server.com/plugins/orthanc-explorer-2.html) to show the list of studies.

b. I don’t know what you call “lazy loading”.

---

<div class="post-metadata">

**Author:** ![sonaliayash](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/sonaliayash/32/1930_2.png) [@sonaliayash](https://discourse.orthanc-server.org/u/sonaliayash)\
**Post date:** [June 23, 2023, 9:00am UTC](https://discourse.orthanc-server.org/t/blank-viewport-with-errors-while-using-orthanc-dicom-web/3654/7 "2023-06-23T09:00:11Z")

</div>

b. I want to set this property in the dataSources \> configuration  
`enableStudyLazyLoad: true`

---

<div class="post-metadata">

**Author:** ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)\
**Post date:** [June 23, 2023, 9:37am UTC](https://discourse.orthanc-server.org/t/blank-viewport-with-errors-while-using-orthanc-dicom-web/3654/8 "2023-06-23T09:37:27Z")

</div>

OK, but what is “study lazy loading”? Is it a feature of OHIF?

---

<div class="post-metadata">

**Author:** ![sonaliayash](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/sonaliayash/32/1930_2.png) [@sonaliayash](https://discourse.orthanc-server.org/u/sonaliayash)\
**Post date:** [June 23, 2023, 9:48am UTC](https://discourse.orthanc-server.org/t/blank-viewport-with-errors-while-using-orthanc-dicom-web/3654/9 "2023-06-23T09:48:48Z")

</div>

Yes, it’s an OHIF feature. I tried to apply it through the UserConfiguration property but it gets overridden by the default configuration.

---

<div class="post-metadata">

**Author:** ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)\
**Post date:** [June 23, 2023, 10:05am UTC](https://discourse.orthanc-server.org/t/blank-viewport-with-errors-while-using-orthanc-dicom-web/3654/10 "2023-06-23T10:05:16Z")

</div>

I am still unsure about what this feature is about, but I guess that OHIF doesn’t support it together with the DICOM JSON data source. Maybe it is only available with the DICOMweb data source. You should validate this with the OHIF community.

---

<div class="post-metadata">

**Author:** ![sdscotti](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/sdscotti/32/2563_2.png) [@sdscotti](https://discourse.orthanc-server.org/u/sdscotti)\
**Post date:** [June 23, 2023, 7:40pm UTC](https://discourse.orthanc-server.org/t/blank-viewport-with-errors-while-using-orthanc-dicom-web/3654/11 "2023-06-23T19:40:41Z")

</div>

> [@sonaliayash](#):
>
> enableStudyLazyLoad: true

Go here:

[OHIF external link](https://docs.ohif.org/configuration/configurationfiles/)

and search for Lazy.

```auto
window.config = {
  routerBasename: '/',
  extensions: [],
  modes: [],
  showStudyList: true,
  dataSources: [
    {
      friendlyName: 'dcmjs DICOMWeb Server',
      namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
      sourceName: 'dicomweb',
      configuration: {
        name: 'DCM4CHEE',
        wadoUriRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/wado',
        qidoRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs',
        wadoRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs',
        qidoSupportsIncludeField: true,
        supportsReject: true,
        imageRendering: 'wadors',
        thumbnailRendering: 'wadors',
        enableStudyLazyLoad: true,
        supportsFuzzyMatching: true,
        supportsWildcard: true,
        omitQuotationForMultipartRequest: true,
      },
    },
  ],
  defaultDataSourceName: 'dicomweb',
};

```

If you read through their documentation if probably explains it.
