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

Allow adding logos and icon to a CLI module #4145

Open
slicerbot opened this issue Mar 13, 2020 · 3 comments
Open

Allow adding logos and icon to a CLI module #4145

slicerbot opened this issue Mar 13, 2020 · 3 comments
Labels
Priority: Low Small, non-essential improvements or fixes Type: Enhancement Improvement to functionality
Milestone

Comments

@slicerbot
Copy link
Collaborator

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.

@lassoan lassoan added Priority: Low Small, non-essential improvements or fixes Type: Enhancement Improvement to functionality labels Mar 21, 2020
@lassoan lassoan added this to the Backlog milestone Mar 21, 2020
@lassoan
Copy link
Contributor

lassoan commented Jul 25, 2023

This issue has come up recently on the Slicer forum (https://discourse.slicer.org/t/adding-an-icon-to-identify-an-extension/30562/8).

CLI modules actually can already store icons, but they provide it on their standard output when the CLI module is launched with the --logo argument. It would be very inefficient to simply start using this feature, as it would mean running 50 executables at each Slicer startup to just get the CLI module icons. We would need to do something like that is done for the module description .xml files cache the icon files in the module folder so that the application can load them directly. Even then, loading 50 icon files may have add some perceivable delay at application startup. Maybe adding the icon to the .xml file would be faster (as we already load the .xml files at startup)?

Another complication is that it is not trivial to bundle the icon file into the executable file (embedding binary resources into an executable is different on each compiler).

Exploring all the options and implement something that does not slow down application startup and remains compatible with the existing CLI module infrastructure would be quite significant work. Since the benefits are quite small, this issue remains low priority.

@jcfr
Copy link
Member

jcfr commented Jul 25, 2023

For reference, the file vtkKWResourceUtilities.cxx mentioned in the original issue is now available in the NA-MIC/svn.slicer.org-Slicer3-lib-mirrors@trunk mirror1

Footnotes

  1. https://github.com/NA-MIC/svn.slicer.org-Slicer3-lib-mirrors/blob/trunk/KWWidgets/vtkKWResourceUtilities.cxx

@jcfr
Copy link
Member

jcfr commented Aug 17, 2023

For reference, here is a comment originally posted in https://mantisarchive.slicer.org/view.php?id=2072#c4931 / #2072

A GitHub project named "ImageToHeader" could be created in github.com/Slicer, the associated code could be copied (ideally the associated history should be extracted) from 1, 2 and 3

This project could probably be a git submodule of SlicerExecutionModel

Related issues:

Footnotes

  1. https://github.com/NA-MIC/svn.slicer.org-Slicer3-lib-mirrors/blob/trunk/KWWidgets/Utilities/CMakeLists.txt

  2. https://github.com/NA-MIC/svn.slicer.org-Slicer3-lib-mirrors/blob/trunk/KWWidgets/Utilities/KWConvertImageToHeader.cxx

  3. https://github.com/NA-MIC/svn.slicer.org-Slicer3-lib-mirrors/blob/trunk/KWWidgets/vtkKWResourceUtilities.cxx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Small, non-essential improvements or fixes Type: Enhancement Improvement to functionality
Development

No branches or pull requests

3 participants