<p>Revisiting this question from awhile ago. It turns out this sort of histogram is created by iterating through every pixel value in both the normal image and gradient magnitude image plotting it in the 2d image. (x intensity, y gradient magnitude). The count/occurrences of the 2d histogram are represented by the intensity of the grayscale in figure b. So the brighter a pixel in figure b is, the more pixels with that (intensity, gradient magnitude).</p>

<p>For volume rendering this is called a 2d transfer function which lets users filter out or assign lower opacities to pixels with large/small gradient magnitudes. This is especially helpful in real time volume rendering with lighting. Real time volume rendering typically uses a BSDF at every point along a ray march as an approximation (Assuming that light reaches every point in the volume). IE: Dot product of the incoming light direction with the gradient as the normal. Using the gradient as the normal means that homogeneous areas are not well represented as they have low gradient magnitudes. Small noise in these areas can easily cause the gradient and normal to flip.</p>

CC BY-SA 3.0
2018-01-17T00:51:52.407Z
2018-01-17T00:51:52.407Z
Andrew Wilson
<p>I'm playing around with volume rendering and looking into multi dimensional transfer functions. I keep seeing images like this for 2d transfer functions:
<a href="https://i.sstatic.net/ZUJqV.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZUJqV.jpg" alt="enter image description here"></a></p>

<p>I've read numerous papers and articles but haven't gotten very far because I can't seem to understand how the image on the right is generated from the volume data set. Also what would you call this image? From my understanding the two axis are data values (intensities) on the x and gradient magnitude on the y. But where is the gradient magnitude coming from? I have a basic understanding of gradient magnitude and don't see how it can be used to make that picture.
How is it calculated? How can I generate a picture like the one on the right?</p>

CC BY-SA 3.0
2017-04-26T02:42:13.947Z
Can you post any more examples or links to similar stuff? It's not clear to me what the histogram on the right is showing, so it's difficult to say much about it.
user1118321
CC BY-SA 3.0
2017-04-27T03:40:36.103Z
From further investigation I believe it's a scatterplot of gradient magnitude and intensity of the 3d texture. (The tooth) Im still having a little trouble visualizing it though.
Andrew Wilson
CC BY-SA 3.0
2017-05-09T14:10:30.250Z
Is this paper publicly available? In that case it would be useful if you could provide us with a link to it.
wip
<rendering><image-processing>
How to generate a 2d histogram?
Andrew Wilson
# How to generate a 2d histogram?

(Asked by: username_0 on 2017-04-24)

I'm playing around with volume rendering and looking into multi dimensional transfer functions. I keep seeing images like this for 2d transfer functions:
[![enter image description here](https://i.sstatic.net/ZUJqV.jpg)](https://i.sstatic.net/ZUJqV.jpg)

I've read numerous papers and articles but haven't gotten very far because I can't seem to understand how the image on the right is generated from the volume data set. Also what would you call this image? From my understanding the two axis are data values (intensities) on the x and gradient magnitude on the y. But where is the gradient magnitude coming from? I have a basic understanding of gradient magnitude and don't see how it can be used to make that picture.
How is it calculated? How can I generate a picture like the one on the right?

**Tags:** rendering, image-processing

> **Comments:**
> **username_1**: Can you post any more examples or links to similar stuff? It's not clear to me what the histogram on the right is showing, so it's difficult to say much about it.  
> **username_0**: From further investigation I believe it's a scatterplot of gradient magnitude and intensity of the 3d texture. (The tooth) Im still having a little trouble visualizing it though.  
> **username_2**: Is this paper publicly available? In that case it would be useful if you could provide us with a link to it.  

---

## 1 answers

### Answer by username_0 on 2018-01-17. Score: 1

Revisiting this question from awhile ago. It turns out this sort of histogram is created by iterating through every pixel value in both the normal image and gradient magnitude image plotting it in the 2d image. (x intensity, y gradient magnitude). The count/occurrences of the 2d histogram are represented by the intensity of the grayscale in figure b. So the brighter a pixel in figure b is, the more pixels with that (intensity, gradient magnitude).

For volume rendering this is called a 2d transfer function which lets users filter out or assign lower opacities to pixels with large/small gradient magnitudes. This is especially helpful in real time volume rendering with lighting. Real time volume rendering typically uses a BSDF at every point along a ray march as an approximation (Assuming that light reaches every point in the volume). IE: Dot product of the incoming light direction with the gradient as the normal. Using the gradient as the normal means that homogeneous areas are not well represented as they have low gradient magnitudes. Small noise in these areas can easily cause the gradient and normal to flip.


---

