I’m testing a custom build of Slicer but, when I got into URLs functions (because I want to open slicer via browser with “slicer://”) it doesn’t seem to recognize them and nothing happens at all.
Could you help me figure out whats happening? I don’t know if i need to activate a flag or something in building phase.
The slicer:// URL handler has to be registered at the operating system. The Windows installer registers it, but if you haven’t installed your custom application or you work on macOS or Linux then you need to register the URL handler yourself.
The IDC browser already registers custom URL handler for Slicer, so you can take the code from there:
I’ve already modified my windows register to open my custom App instead of the original one, and it opens when i called “slicer://” in a browser, but the problem is the url is not recognized and slicer does nothing but open itself.
That’s good, then you just have to make sure that there is a module that recognizes the received URL. See for example how it is done in the DICOM module:
Make the DICOM module notified when the application receives a URL:
The DICOM module recognizes URLs that start with slicer://viewer/ and processes it by downloading from DICOMweb:
In your module, you can add the connection the same way and your module can process URLs that it recognizes.