How to Upload STL OBJ GLTF file type to ORTHANC

We are currently working on a project of segmentation of bone from CT/MRI. We use ORTHANC on Windows 10 to store all dicom files. Use StudyInstanceUID+BoneName as 3D file name produced and store them on a hierarchy of web folder. User log into ORTHANC to locate the dicom study, copy down the StudyInstanceUID and navigate through the web folder to find the 3D Models.

We don’t have an effective way to store thousands of 3D files produced and link them to the dicom study. If ORTHANC allow us to upload non-dicom file type along side with the dicom study that will be great.

I have read through a lot of group post and cannot find a solution. There are some posts discuss about upload jpeg, PDF or video file. But the solutions doesn’t cover the file type we are using.

I also studied OrthancToolsJs, it is too complicated for me to set up. Thanks in advance for advice.

Hi,

You can store any type of file in Orthanc as an attachment (https://book.orthanc-server.com/faq/features.html?highlight=attachment#metadata-attachments). You can use this feature to store pdf, images or in your case the 3D file. An attachment can be attached to a patient, study, series or instance.

Hope that helps.

Cheers,

James

Thank you James.

Glad to know ORTHANC accept User defined attachments.
I believe some coding is needed to use the function, as it is not included in the explorer.

ja…@binary.com.au在 2021年12月13日星期一上午5:25:10 [UTC+8]寫道:

Hello,

Indeed, Orthanc Explorer is a low-level interface that doesn’t provide access to user-defined attachments. As explained in the following page, you’ll have to create a higher-level Web interface on the top of the REST API of Orthanc:
https://book.orthanc-server.com/faq/improving-interface.html

Sébastien-

Regarding the last comment, is there a recommended way to setup a development environment for Orthanc if one wishes to work on some enhancements for the Explorer and otherwise ?

For the Stone Viewer I host the front end on my own server by using a proxy, which works well, but then any changes that I make are not so easily incorporated back into the releases. It seems a bit more difficult to setup the proxies for the Explorer, although I am sure that is possible. I use NGINX for a proxy server and web server.

I develop on a Mac using Docker Desktop, but production runs on Docker in UBUNTU. It would be really nice if there were some way to sort of do “live updates” somehow in a development environment without have to recompile code. Most of the work I would do would be on the front-end and then using Python scripts (could be migrated to C++ at some later date if a finished product).

I have some features on some of my other projects that upload files or webcam shots and “dicomize” them. Ditto for reports since I am attaching those as PDF’s. I do not use the attachments feature of Orthanc yet, but that is something that I would like to add as well.

Thanks.

Hi,

FYI, I’ve just added the attachment download from the Orthanc Explorer but this does not include uploading of attachments.

image.png

And, Stephen, in order to update the OrthancExplorer without recompiling, I simply used the ServeFolders plugin with this configuration:

“ServeFolders” : {
“/exp” : “/home/xxx/orthanc/OrthancServer/OrthancExplorer”
},

HTH,

Alain.

That is interesting. That isn’t really clear to me. I take it that that is when running Orthanc from the host and not within Docker, although you could also probably do that from within a Docker container if you setup things ‘correctly’ by binding a Docker Folder to a host folder container the Orthanc Source from here:

https://hg.orthanc-server.com/orthanc/file/tip or using

sudo apt-get install mercurial sudo apt install git hg clone https://hg.orthanc-server.com/orthanc

For the front end, only the OrthancServer/OrthancExplorer file are needed ?

I would just need to install on OS X from the package here: https://www.osimis.io/en/orthanc-downloads, or try to set it up using Docker.

If that works that is a great way to go.

Can the same thing be done for the Stone Viewer front end ? That might eliminate the need for me to host that with my proxy setup.

Yes, all you wrote is correct.

For the StoneViewer, you can do the same as long as you don’t modify the C++ code running in the WASM part (this one requires a build step).

Excellent ! I will give it a try. That is in my Docker compose root. I know how to setup the mapping. Is that all I need for both the OrthancExplorer and for Stone (WebApplicaiton), or do I need the wasm binaries for Stone also. I take it that Python Plug-ins are almost as good as C++ initially. Might actually start learning about the C++ plug-ins. Not sure if this is UTD, but helpful: https://github.com/mbarnig/RadioLogic

serverfolders.png

Thanks. That helps.

/sds

Seems to work for both, although I used the wasm binaries for Stone, from here: https://lsb.orthanc-server.com/stone-webviewer/mainline/

If anyone else is interested, brief summary:

In my DockerFile for the build:
RUN mkdir /development # make the bound folder in the container.

I am using Docker compose:
pacs:

volumes:

  • ./ServeFolders:/development # bind it to the host
    environment:
    SERVE_FOLDERS_PLUGIN_ENABLED: “true” # make sure that you enable the plug-in somehow.


In orthanc.json or other config:

“ServeFolders”: {
“/devexplorer” : “/development/OrthancExplorer”,
“/devstone” : “/development/WebApplication”
},

URL for Explorer: http://localhost:8042/devexplorer/explorer.html
URL for Stone: http://localhost:8042/devstone/index.html?study=StudyInstanceUID

There might be some additional configuration needed for Stone because the config file apparently is loaded from the host, whereas I have config items for stone also in my orthanc.json.

Folder structure on host at root of Docker Compose file:

setup.png