rordenlab / MRIcroGL

v1.2 GLSL volume rendering. Able to view NIfTI, DICOM, MGH, MHD, NRRD, AFNI format images.
https://www.nitrc.org/plugins/mwiki/index.php/mricrogl:MainPage
Other
207 stars 33 forks source link

Is it possible to display color rectangle in colormap combo box? #29

Closed hanayik closed 2 years ago

hanayik commented 3 years ago

I think it is possible in pascal/lazarus, but I don't know if that implementation would work cross platform

Here's a reference implementation in NiiVue. I'm just creating a css linear gradient style string by looping over the RGBA nodes in the JSON color map.

Similar to the NiiVue and FSLeyes color drop down widgets

neurolabusc commented 3 years ago

Preceded_image

neurolabusc commented 3 years ago

Here is a minimal working solution. It looks fine, but it does not look or act natively: you can not choose between items using the arrow keys, the currently selected item is not actively highlighted. I really like components to look native, so I am not comfortable with this solution.

color_table_combo.zip color_combo

neurolabusc commented 2 years ago

Its a nice idea, but MRIcroGL strives to use native widgets.