BlueBrain / BlueBrain/VessMorphoVis

Issue: discontinuous colormap for 3D directions (angle vs. sine)

Open
#27 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
50
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Hi Marwan,

Thanks again for adding the 3D directional color-coding feature...

I noticed some choppiness (discontinuities) in the colormap. Did you perhaps encode the angle to each axis or the sines of those angles in the colormap? I believe the sines of those angles (the 3-space components of the direction unit vector) to be the better quantity to encode because it will utilize the color-space more evenly.

Proof: a random variable uniformly distributed on the surface of the unit sphere will be uniformly distributed in three components (sine of angle from axis) independently, but will have an uneven distribution when binned by the angles.

For example, looking at this authentic in vivo anatomy:

![image](https://user-images.githubusercontent.com/45496077/139416734-9ae3ea85-e5a1-474e-b00a-5ab260ab443a.png)

Here is the histogram of segment directions binned by Z-component (quite uniform):

![image](https://user-images.githubusercontent.com/45496077/139416882-735b264e-7803-437c-aeba-4629fa70c23c.png)

And here is the histogram of ***(area-weighted) section*** directions binned by angle from Z axis (the histogram is heavily concentrated on 0 (because a random direction is more likely to be aligned to a plane than a line).

![image](https://user-images.githubusercontent.com/45496077/139416996-359a0a4f-6e94-4059-b0c7-ffca07622e8d.png)

Thanks,
Sam

Contributor guide

Open the contributing guide

Research direction

Start by locating the 3D directional color-coding implementation in the VessMorphoVis codebase and trace how direction values are converted into colors. Compare the current angle-based and sine/component-based behavior using the reported anatomy example or equivalent visualization. Done means the colormap no longer shows the reported discontinuities and the direction distribution is represented as intended.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics, data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.