# Dicomizer - json structure for dataset.json file

**URL:** https://discourse.orthanc-server.org/t/dicomizer-json-structure-for-dataset-json-file/755
**Category:** Google Groups archive
**Created:** [August 17, 2017, 6:31pm UTC](https://discourse.orthanc-server.org/t/dicomizer-json-structure-for-dataset-json-file/755 "2017-08-17T18:31:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jack\_Daniels](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/j/5f8ce5/32.png) [@Jack\_Daniels](https://discourse.orthanc-server.org/u/Jack_Daniels)
#### Post date: [August 17, 2017, 6:31pm UTC](https://discourse.orthanc-server.org/t/dicomizer-json-structure-for-dataset-json-file/755/1 "2017-08-17T18:31:23Z")

</div>

I am trying to create DICOM images from WSI-tif files for upload into orthanc. Since the sample json-config file does not all items I would like to include in the DICOM file, I tried editing the sample\_dataset.json file. Unfortunately, I cannot figure out the correct format - no matter what I do,  
the parsing of the modified json file always fails.  
Is there a place/document that explains how to add items to the default file (what are the allowed keywords and sequence structures)?  
Thank you very much - Jack

---

<div class="post-metadata">

### Author: ![Thibault\_Nelis](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@Thibault\_Nelis](https://discourse.orthanc-server.org/u/Thibault_Nelis)
#### Post date: [August 18, 2017, 8:03am UTC](https://discourse.orthanc-server.org/t/dicomizer-json-structure-for-dataset-json-file/755/2 "2017-08-18T08:03:47Z")

</div>

Hello,

> Is there a place/document that explains how to add items to the  
> default file (what are the allowed keywords and sequence structures)?

Good question, I don't think so actually.

If you can read C++, the parser is here[1] and more specifically  
there[2]. If not then you should file a request on the issue tracker  
for someone to synthesize its behavior.

You may also send your dataset, we might try to take a look at it  
specifically to see what's wrong.

[1] [https://bitbucket.org/sjodogne/orthanc-wsi/src/42dcf14389434478bd8e](https://bitbucket.org/sjodogne/orthanc-wsi/src/42dcf14389434478bd8e)  
4471e6fbe8770a966674/Applications/Dicomizer.cpp?at=default&fileviewer=f  
ile-view-default#Dicomizer.cpp-203  
[2] [https://bitbucket.org/sjodogne/orthanc-wsi/src/42dcf14389434478bd8e](https://bitbucket.org/sjodogne/orthanc-wsi/src/42dcf14389434478bd8e)  
4471e6fbe8770a966674/Resources/Orthanc/OrthancServer/FromDcmtkBridge.cp  
p?at=default&fileviewer=file-view-default#FromDcmtkBridge.cpp-1657

---

<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: [August 18, 2017, 11:17am UTC](https://discourse.orthanc-server.org/t/dicomizer-json-structure-for-dataset-json-file/755/3 "2017-08-18T11:17:17Z")

</div>

Dear Jack,

The “dataset.json” format to be used with the “–dataset” command-line argument is really simple: Just add all the tags you want to be included in the output DICOM files into the root associative JSON array. Check out the related documentation:  
[http://book.orthanc-server.com/plugins/wsi.html#specifying-a-dicom-dataset](http://book.orthanc-server.com/plugins/wsi.html#specifying-a-dicom-dataset)

A sample JSON file can found at the following location (it is the sample dataset that is generated by adding the “–sample-dataset” flag when invoking “OrthancWSIDicomizer”):  
[https://bitbucket.org/sjodogne/orthanc-wsi/src/default/Resources/SampleDataset.json](https://bitbucket.org/sjodogne/orthanc-wsi/src/default/Resources/SampleDataset.json)

The tags can be specified either with their symbolic tag name, or with their hexadecimal identifier. For instance:

{  
“PatientID” : “C123456789”,  
“0010,0010” : “PATIENT^NAME”  
}

Please share a buggy JSON dataset so as further help can be provided.

Regards,  
Sébastien-

---

<div class="post-metadata">

### Author: ![Jack\_Daniels](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/j/5f8ce5/32.png) [@Jack\_Daniels](https://discourse.orthanc-server.org/u/Jack_Daniels)
#### Post date: [August 18, 2017, 11:37pm UTC](https://discourse.orthanc-server.org/t/dicomizer-json-structure-for-dataset-json-file/755/4 "2017-08-18T23:37:58Z")

</div>

Sébastien, Thank you very much for you comments, in particular the possibility of using Byte-codes "0040, 0052", etc. That made things much easier. The original problem was caused by putting an element in the wrong sequence - my mistake.  
Thank you very much,  
Jack
