Working with OHIF
I'm considering using the OHIF viewer as the basis for a new project I'm developing that looks at mammograms in particular image processing of digital images e.g., segmentation, contour analysis etc. Is the OHIF source code completely customisable with regards, logos, colours, look-and-feel etc.?
I have many routines written in C++, OpenCV, Python that I would like to integrate into the OHIF viewer. Is this possible? I know it is a JS, CSS, HTML5 library but are there workarounds?
Also, would it be possible to integrate some WebGL 3D style graphics into the OHIF viewer? Do you know if anyone has done this?
Any help appreciated.
Yes, customizing the OHIF viewer's logo, colors, look-and-feel is straightforward. If you look at the LesionTracker demo http://lesiontracker.ohif.org, you will see a theme selector in the configuration settings which shows an example of how to do this.
Using libraries in C++, Python, etc. is easy enough as long as they run on the server. Since the OHIF code-base uses meteor, you can just make a call from the client to a server-side meteor method which communicates with your other libraries. I don't think we have any simple examples in the code of how to do this, but you might want to have a look at: https://github.com/capstone-mgh. They built a client-server segmentation workflow with python code that runs in the back-end; that might give you some ideas.
I don't think there is anything special about WebGL 3D style graphics. If you can embed those into a web page, then you can put them in the OHIF viewer. As you noted, the client side code is HTML5/CSS/Javascript, so you can customize it however you like.
Many thanks for the informative reply.
I'm very new to meteor and JS so could you tell me how I can change the code to e.g., remove text, add new text to drop-down boxes, re-organise panels, etc. Basically, what parts of the code structure control,the GUI and how it all fits together.
Also, where in the code structure is the image manipulation routines e.g. how does the interaction between double clicking a study instance result in an image on another separate screen? Then how does this image get updated e.g. contrast change or flipped from the toolbar?
Are the loaded files we see on the first screen in the demos coming directly from a server connection the PACS server e.g. Orthanc? Is it possible to request other studies directly from a PACS server by instance, name or modality for example and populate the first screen?
Thanks David
The study list is a result of querying the Orthanc server using either DICOMWeb of DIMSE (standard DICOM). There is a config setting (exposed in the UI) for setting up other DICOM servers.
As for the coding advice you're looking for, we are going to be documenting the framework over time, but there isn't much available yet. What we do have is here: https://github.com/OHIF/Viewers/wiki. Also, I'd recommend looking for a good intro course to meteor (Pluralsight maybe?)
For now, maybe try posting specific questions to the cornerstone google group about whatever thing you're trying to accomplish. Thx.
- Rob
Thanks for the replies - about WebStorm can the downloaded repo be integrated straight into a WebStorm project that I can edit, run and display? Do I need anything else running installed alongside WebStorm?