Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom buttons and columns #18

Open
nilgoyette opened this issue Jun 26, 2023 · 6 comments
Open

Custom buttons and columns #18

nilgoyette opened this issue Jun 26, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@nilgoyette
Copy link

I was able to add a button in Orthanc Explorer 1 using OrthancPluginExtendOrthancExplorer (or ExtendOrthancExplorer in Python). However, this is not possible wth Orthanc Explorer 2. (Confirmed with Sébastien Jodogne).

My goal is to add a button in the Series section and use the REST API to do something. To be more precise, when we receive study containing several series, we must "tag" them as "DWI", "T1" and "Reverse_b0". I would add 3 buttons (or 1 with a dropdown) to make the tagging easier and faster for the users

As for the column, I would simply print their tag (nothing if they haven't been tagged), or add a T1 icon, etc.

@amazy
Copy link
Member

amazy commented Jun 26, 2023

Hi @nilgoyette

Indeed, right now, it is not possible to extend the OE2 interface. I was thinking of adding some "customizable buttons" some day but they would simply perform a simple action like GET/POST to a URL. Probably not enough for what you need and certainly not any visual feedback.

Right now, I'm afraid your only solution is forking the OE2 code to include your own buttons.

BTW, are you aware that we have implemented "labels" in Orthanc and they are implemented at study level in OE2 - not yet at series level. Would series level labels meet your particular requirements ?

On another side, feel free to share your plugin extension code such that I can have an idea of what you are doing when I work on "customizable buttons".

BR,

Alain

@nilgoyette
Copy link
Author

GET/POST to a URL. Probably not enough for what you need and certainly not any visual feedback.

The problem is that there could be dozens of series in the study we receive so someone must check the image (visual feedback), then decide which images is the T1 and so on. Still, the GET/POST to a URL would be a good start, I could use /series/{id}/labels/{label}. Unless the url is a constant, in that case, this is too limited.

I guess the series level labels feature would do the job! I can see the labels I added in OE1 but I haven't found how to add labels using the OE2 UI though.

In the meantime, I'll simply code a Python script that adds DWI/T1/RevB0 label to the right series, using the REST API.

@amazy
Copy link
Member

amazy commented Jun 27, 2023

You need the very latest OE2 for that: 1.0.1 released last week.

@amazy amazy added the enhancement New feature or request label Jun 28, 2023
@nilgoyette
Copy link
Author

Right now, I'm afraid your only solution is forking the OE2 code to include your own buttons.

I tried what you suggested but I can't get anything to change in the UI. Since everything is in a .so, I think all the html/js/css code get compiled into build/AUTOGENERATED/EmbeddedResources.cpp

  1. I successfully compiled the project to create a plugin
  2. I git grep the string bi bi-trash. There's only one. I change it for bi bi-download, so there should be 2 download icons now (lets forget the bulk icons at the top)
  3. I compile again: make, restart the server to reload the plugin. No change. Ctrl-F5 No change.
  4. make clean make. No change. Ctrl-F5 No change.
  5. make clean cmake .. make. No change. Ctrl-F5 No change.

How do you guys change anything in Orthanc UI? Everything I tried is ignored!

@amazy
Copy link
Member

amazy commented Jul 3, 2023

You must rebuild the frontend separately with npm: https://github.com/orthanc-server/orthanc-explorer-2#compilation

@emipm
Copy link

emipm commented Dec 15, 2023

I have two requests that might be similar enough to use this issue, otherwise I can open new ones:

  1. Custom columns in series section. Right now, we do not have the requirements to add a custom button, but to specify custom DICOM tags to be shown.
  2. Custom buttons in the menu bar (simple requests would suffice for us). And further, instead of a button, an infobox, which can hold (e.g.) some information about best practices for our server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants