tfunc.c File Reference

Deal with transfer-function-related exercises. More...

#include <stdlib.h>
#include "rendermodes.h"

Defines

#define TF_BG_COLOR
#define TF_HISTO_COLOR

Functions

void opacity_reinterpol_tf (opacity_node *curr)
 Reinterpolate opacities.
void new_opacitynode_tf (uint16_t scx, uint16_t scy)
 Generate new opacity-node.
void del_opacitynode_tf (uint16_t scx, uint16_t scy)
 Delete opacity-node.
void color_reinterpol_tf (color_node *curr)
 Reinterpolate colors.
void free_nodes_tf_inside (void)
 Free opacity- and color-nodes.
void free_nodes_tf (void)
 Free opacity- and color-nodes.
void new_colornode_tf (uint16_t scx)
 Generate new color-node.
void del_colornode_tf (uint16_t scx, uint16_t scy)
 Delete color-node.
void resize_tf (void)
 Resize the image which is drawn to represent the transfer-function.
void init_tf (void)
 Calculate the image which is drawn to represent the transfer-function. The initial outermost color- and opacity-nodes are set, too.
void draw_tf (void)
 Draw the transfer-function.

Variables

int vol_loaded
int last_inserted_cnode
int colorband_h


Detailed Description

Deal with transfer-function-related exercises.

All operations that relate to the rendering and updating of the transferfunction happen here.


Function Documentation

void color_reinterpol_tf color_node *  curr  ) 
 

Reinterpolate colors.

This function is called, whenever the user moves a color-node.

Parameters:
curr Pointer to the current color node.

void del_colornode_tf uint16_t  scx,
uint16_t  scy
 

Delete color-node.

This function is called, whenever the user right-clicks on a color-node.

Parameters:
scx The x-coordinate in screen-space of the color-node.
scy The y-coordinate in screen-space of the color-node.

void del_opacitynode_tf uint16_t  scx,
uint16_t  scy
 

Delete opacity-node.

This function is called, whenever the user right-clicks on an opacity-node.

Parameters:
scx The x-coordinate in screen-space of the opacity-node.
scy The y-coordinate in screen-space of the opacity-node.

void draw_tf void   ) 
 

Draw the transfer-function.

The previously calculated/generated image which represents the transfer-function is blit to the screen.

void free_nodes_tf_inside void   ) 
 

Free opacity- and color-nodes.

Does not delete the two outermost color- and opacity-nodes, respectively.

void new_colornode_tf uint16_t  scx  ) 
 

Generate new color-node.

This function is called, whenever the user double-clicks in the "colors-area" of the transfer-function.

Parameters:
scx The x-coordinate in screen-space of the new color-node.

void new_opacitynode_tf uint16_t  scx,
uint16_t  scy
 

Generate new opacity-node.

This function is called, whenever the user double-clicks in the "opacity-area" of the transfer-function.

Parameters:
scx The x-coordinate in screen-space of the new opacity-node.
scy The y-coordinate in screen-space of the new opacity-node.

void opacity_reinterpol_tf opacity_node *  curr  ) 
 

Reinterpolate opacities.

This function is called, whenever the user moves an opacity-node.

Parameters:
curr Pointer to the current opacity node.

void resize_tf void   ) 
 

Resize the image which is drawn to represent the transfer-function.

This function is called, whenever the user changes the size of the SDL-window.


Generated on Wed Dec 13 08:40:13 2006 for PHDVR - Direct Volume Renderer by  doxygen 1.4.6