{"action":"opened","issue":{"url":"https://api.github.com/repos/gerbilvis/gerbil/issues/6","labels_url":"https://api.github.com/repos/gerbilvis/gerbil/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/gerbilvis/gerbil/issues/6/comments","events_url":"https://api.github.com/repos/gerbilvis/gerbil/issues/6/events","html_url":"https://github.com/gerbilvis/gerbil/issues/6","id":97036877,"number":6,"title":"Synchronize DistView coloring feature with FalseColorDock/Model","user":{"login":"ypnos","id":8481470,"avatar_url":"https://avatars.githubusercontent.com/u/8481470?v=3","gravatar_id":"","url":"https://api.github.com/users/ypnos","html_url":"https://github.com/ypnos","followers_url":"https://api.github.com/users/ypnos/followers","following_url":"https://api.github.com/users/ypnos/following{/other_user}","gists_url":"https://api.github.com/users/ypnos/gists{/gist_id}","starred_url":"https://api.github.com/users/ypnos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ypnos/subscriptions","organizations_url":"https://api.github.com/users/ypnos/orgs","repos_url":"https://api.github.com/users/ypnos/repos","events_url":"https://api.github.com/users/ypnos/events{/privacy}","received_events_url":"https://api.github.com/users/ypnos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-24T11:49:56Z","updated_at":"2015-07-24T11:49:56Z","closed_at":null,"body":"Currently, the distribution view has a coloring feature that can color spectral vectors based on true coloring. It can be enabled via a button in the controls to the left of the plot. It only works for the view of raw spectra as the colors are computed based on the vector itself.\r\n\r\nIn this enhancement, we would like to achieve that:\r\n - All spectral views can be colored based on true color\r\n - The coloring can also be done based on false color\r\n - By selecting a coloring method in the FalseColorDock, the user selects the respective coloring\r\n\r\nFor that, the coloring needs to be done based on pixel coordinates and not the spectra itself, which lies in a different feature space in the other views. However, due to the histogramming of spectra, the pixel coordinates are not available at the stage where the color is computed right now ([1]).\r\n\r\n1. In the viewport context ([2]) introduce a flag whether the coloring is up-to-date\r\n2. Whenever the coloring in the falsecolordock is switched (at the point the new coloring is shown), all distviews need to be notified. Then, if a distview is currently showing a coloring, the bin colors need to be recomputed (re-binning). If it is not (coloring mode disabled), it needs to set the flag in context, so that if the user decides to enable the coloring, the re-binning is taking place. If for any other reason re-binning is performed, the flag can also be unset. NOTE: we always compute the color values with the binning \"just in case\" the user wants to enable coloring mode)\r\n3. In a rebinning, the color value needs to be computed based on the falsecolordock display. Ideally, the color data would be made accessible by the falsecolormodel, not the dock. then the color dock can be passed to the Bin constructor/methods, see next point.\r\n4. In a Bin, the mean vector of all pixels represented by the bin is stored and dynamically altered when adding/removing pixels from the bin. See [3], [4], [5]. Accordingly, the mean color should be stored and dynamically altered. It then needs to be normalized where also the mean is normalized ([6]).\r\n\r\n[1]: https://github.com/gerbilvis/gerbil/blob/6e3b6e370003ef3e3e4dac3ea566e30720e18119/gui/dist_view/distviewcompute.cpp#L97\r\n[2]: https://github.com/gerbilvis/gerbil/blob/6e3b6e370003ef3e3e4dac3ea566e30720e18119/gui/dist_view/distviewcompute.h#L114\r\n[3]: https://github.com/gerbilvis/gerbil/blob/6e3b6e370003ef3e3e4dac3ea566e30720e18119/gui/dist_view/distviewcompute.h#L35\r\n[4]: https://github.com/gerbilvis/gerbil/blob/6e3b6e370003ef3e3e4dac3ea566e30720e18119/gui/dist_view/distviewcompute.h#L46-47\r\n[5]: https://github.com/gerbilvis/gerbil/blob/6e3b6e370003ef3e3e4dac3ea566e30720e18119/gui/dist_view/distviewcompute.h#L54-55\r\n\r\n[6]: https://github.com/gerbilvis/gerbil/blob/6e3b6e370003ef3e3e4dac3ea566e30720e18119/gui/dist_view/distviewcompute.cpp#L90"}}