Tuesday, November 26, 2013

Transfer functions

DOWNLOAD CODE


Understanding Transfer Functions

I explored both the x-mas and engine example sets in ImageVis3D.  It was more difficult to create a nice image with the x-mas set. Below is an image with the alpha adjusted to hide portions of the image that obscure the tree.
With the alpha adjusted I attempted to modify the colors. Below represents one of the more successful attempts.  With the adjustment I was able to apply different colors to the tree itself and the ornaments.

  • What did you like about the transfer function editor?
The ability to drag your mouse around to adjust the channels made it easy to play around with different values. The histogram with the values was also nice.
  • What is difficult about this editor / widget?
It would have been nice to have a reset button.  Understanding the checkboxes for the color components took some time figure out.

  • How would you improve the 1D transfer function editor?
I would require each channel to be set separately. 


Running the Volume Renderer

Volume Visualization and Control Panel

I explored several datasets in the processing volume visualization application.  Below is the bucky ball dataset.
  • What were you able to find from your volume data set?
The buckyballs isovalues are between 233 and below 128.  Setting the center out of this range limits the ability to view the volume rendering.
  • What is useful about the step function?
The major attribute that makes it possible to create a good view of any of the datasets is the CENTER value. 
  • What makes this particular function limited?
 My assumption is that the CENTER essentially replaces the need to set in alpha for the dataset.
With this type of input you cannot set the alpha value to include different isovalue ranges.

Code Structure 
Designing Your Own Transfer Function Widget 

It seems to me that the most useful feature of a transfer function widget is a histogram that provides some information about the data values.  With the histogram present the ability to visualize how the four channels are mapped on top provides the most useful ability for adjustment.

Below are my sketches.  My first idea was really simple.  It was just to add range sliders for each of the channels.  These could be adjusted and the image change would allow the user to evaluate the correct values to use.


The second idea was to add a histogram and a range slider. This is very similar to the first simple widget however the histogram would display where the channels are currently mapped.


My final design choice and the one that I will proceed with involves 4 histograms, one for each channel.  Each histogram would have a vertical slider and a horizontal range slider that would adjust the intensity and range to map respectively.  In addition the user will have the ability to add additional sliders and thus the ability to map additional values to a single channel.  This design choice is more limited than the widget provided in ImageVis3D but It will provide similar functionality and allow me to explore the Controls library.






My final control panel is below.  The panel has four histograms for each channel.  The color of the controls c indicate which channel is being adjusted.  Below each histogram is a range slider that can be adjusted on each end and can be moved by clicking the middle.  The rectangle on the histogram indicates the current range selected to add that channels values. A slider on the histogram allows the intensity of the channel to be adjusted.  Clicking the 'plus' button under each range slider allows the user to set additional values for a single channel.  This interaction can be seen in the alpha channel. The rectangle is numbered to make it easier differentiate multiple channel settings.

The histogram represents the count of values from 1-255.  The counts are log transformed to reduce compress the data.
Finding Good Transfer Functions 

I first evaluated the bonsai tree using my transfer function widget.  The image is below. The above control panel was used to generate the image.  Like most of the datasets the values at the beginning are overrepresented noise.  The leaves of the bonsai have values from 0-54, where the pot has values from 199-210.  This allowed me to color them different.
 I then looked at the foot dataset.  The flesh had a lower isovalue which I was able to render as red.  The bone isovalues ranged from 50 - 255 and the more dense portions had higher isovalues.



  • What are the strengths and weaknesses of your design?
I like my design, I think it is easy to use and allows for a lot of adjustment.  My choice of using sliders does not allow the user to create nuanced  adjustments. They are forced to use rectangles.  This is a weakness. I attempted to overcome this by allowing multiple boxes
  • What would you change to make your widget more effective?
I would allow for even more rectangles to be drawn. I would remove the vertical slider and allow the user to drag the highlighting rectangle instead.  They would be able to adjust the middle-top, which would move the the box up and down or grab a corner to move the corner down or up creating an irregular shape.
  • What are the pros and cons for volume rendering as a technique? What are the challenges?
Volume rendering allows you to focus on different densities of the image and move through the image, which can lead to greater insight.  The con is that it is hard to automate a good rendering and the finding a good representation is often done empirically.

No comments:

Post a Comment