cgv
Loading...
Searching...
No Matches
cgv::render::volume_render_style Struct Reference

style of a volume More...

#include <volume_renderer.h>

Inheritance diagram for cgv::render::volume_render_style:
cgv::render::render_style

Public Types

enum  IntegrationQuality {
  IQ_8 = 8 , IQ_16 = 16 , IQ_32 = 32 , IQ_64 = 64 ,
  IQ_128 = 128 , IQ_256 = 256 , IQ_512 = 512 , IQ_1024 = 1024 ,
  IQ_2048 = 2048 , IQ_4096 = 4096
}
 quality measure for the number of steps used during ray marching More...
 
enum  InterpolationMode { IP_NEAREST = 0 , IP_SMOOTHED = 1 , IP_LINEAR = 2 , IP_CUBIC = 3 }
 the interpolation method used (supplied volume texture should be set to GL_LINEAR) More...
 
enum  CompositingMode { CM_MAXIMUM_INTENSITY_PROJECTION = 0 , CM_AVERAGE = 1 , CM_BLEND = 2 }
 the compositing mode used More...
 
enum  IsosurfaceMode { IM_NONE = 0 , IM_ISOVALUE = 1 , IM_ALPHA_THRESHOLD = 2 }
 mode of a single supported isosurface More...
 
enum  SliceMode { SM_DISABLED = 0 , SM_OPAQUE = 1 , SM_TRANSPARENT = 2 }
 mode of slice rendering More...
 

Public Member Functions

 volume_render_style ()
 construct with default values
 

Public Attributes

enum cgv::render::volume_render_style::IntegrationQuality integration_quality
 
bool enable_noise_offset
 whether to use the noise texture to offset ray start positions in order to reduce sampling artifacts
 
enum cgv::render::volume_render_style::InterpolationMode interpolation_mode
 
bool enable_depth_test
 whether to enable depth testing by reading depth from a texture to allow geometry intersecting the volume (depth texture must be supplied)
 
enum cgv::render::volume_render_style::CompositingMode compositing_mode
 
float scale_adjustment_factor
 the coefficient used to adjust sample opacity based on volume scaling (useful range between 50 and 500)
 
bool enable_lighting
 whether to enable lighting
 
bool light_local_to_eye
 whether the light is local to the eye position (moves with the eye) or is static to the scene
 
bool use_gradient_texture
 whether to use a supplied gradient texture or compute gradients on the fly via central differences (default)
 
vec3 light_direction
 the direction of the directional light
 
float ambient_strength
 light ambient component strength
 
float diffuse_strength
 material diffuse component strength
 
float specular_strength
 material specular component strength
 
float roughness
 material roughness (inversely proportional to specular shininess)
 
float specular_color_mix
 material specular color mix factor (0 = color from transfer function, 1 = pure white)
 
bool enable_gradient_modulation
 whether to enable modulating the volume opacity by the gradient magnitude
 
float gradient_lambda
 influence scale for gradient-based opacity modulation
 
enum cgv::render::volume_render_style::IsosurfaceMode isosurface_mode
 
float isovalue
 the value used to check for an isosurface
 
rgb isosurface_color
 the default constant isosurface color
 
bool isosurface_color_from_transfer_function
 whether to color the isosurface based on the transfer function
 
enum cgv::render::volume_render_style::SliceMode slice_mode
 
int slice_axis
 coordinate axis orthogonal to which slice is rendered
 
float slice_coordinate
 coordinate value along axis defining slice in range [0,1]
 
float slice_opacity
 in case of transparent mode, slice opacity
 
box3 clip_box
 a bounding box used to define a subspace of the volume to be visualized
 

Detailed Description

style of a volume

Definition at line 19 of file volume_renderer.h.

Member Enumeration Documentation

◆ CompositingMode

the compositing mode used

Definition at line 48 of file volume_renderer.h.

◆ IntegrationQuality

quality measure for the number of steps used during ray marching

Definition at line 23 of file volume_renderer.h.

◆ InterpolationMode

the interpolation method used (supplied volume texture should be set to GL_LINEAR)

Enumerator
IP_SMOOTHED 

only the closest voxel is sampled

IP_LINEAR 

modification of the built-in trilinear interpolation to prevent triangular artifacts (results look blockier in the volume, mid way between nearest and linear)

IP_CUBIC 

default built-in trilinear interpolation

Definition at line 38 of file volume_renderer.h.

◆ IsosurfaceMode

mode of a single supported isosurface

Enumerator
IM_ISOVALUE 

not enabled

IM_ALPHA_THRESHOLD 

based on volume value (volume >= isovalue)

Definition at line 82 of file volume_renderer.h.

◆ SliceMode

mode of slice rendering

Definition at line 95 of file volume_renderer.h.

Constructor & Destructor Documentation

◆ volume_render_style()

Member Data Documentation

◆ ambient_strength

float cgv::render::volume_render_style::ambient_strength

light ambient component strength

Definition at line 66 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ clip_box

box3 cgv::render::volume_render_style::clip_box

a bounding box used to define a subspace of the volume to be visualized

Definition at line 108 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::draw(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ diffuse_strength

float cgv::render::volume_render_style::diffuse_strength

material diffuse component strength

Definition at line 68 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ enable_depth_test

bool cgv::render::volume_render_style::enable_depth_test

whether to enable depth testing by reading depth from a texture to allow geometry intersecting the volume (depth texture must be supplied)

Definition at line 45 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::update_defines(), and volume_render_style().

◆ enable_gradient_modulation

bool cgv::render::volume_render_style::enable_gradient_modulation

whether to enable modulating the volume opacity by the gradient magnitude

Definition at line 77 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::update_defines(), and volume_render_style().

◆ enable_lighting

bool cgv::render::volume_render_style::enable_lighting

◆ enable_noise_offset

bool cgv::render::volume_render_style::enable_noise_offset

whether to use the noise texture to offset ray start positions in order to reduce sampling artifacts

Definition at line 36 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::update_defines(), and volume_render_style().

◆ gradient_lambda

float cgv::render::volume_render_style::gradient_lambda

influence scale for gradient-based opacity modulation

Definition at line 79 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ isosurface_color

rgb cgv::render::volume_render_style::isosurface_color

the default constant isosurface color

Definition at line 90 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ isosurface_color_from_transfer_function

bool cgv::render::volume_render_style::isosurface_color_from_transfer_function

whether to color the isosurface based on the transfer function

Definition at line 92 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::update_defines(), and volume_render_style().

◆ isovalue

float cgv::render::volume_render_style::isovalue

the value used to check for an isosurface

Definition at line 88 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ light_direction

vec3 cgv::render::volume_render_style::light_direction

the direction of the directional light

Definition at line 64 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ light_local_to_eye

bool cgv::render::volume_render_style::light_local_to_eye

whether the light is local to the eye position (moves with the eye) or is static to the scene

Definition at line 60 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ roughness

float cgv::render::volume_render_style::roughness

material roughness (inversely proportional to specular shininess)

Definition at line 72 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ scale_adjustment_factor

float cgv::render::volume_render_style::scale_adjustment_factor

the coefficient used to adjust sample opacity based on volume scaling (useful range between 50 and 500)

Definition at line 55 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ slice_axis

int cgv::render::volume_render_style::slice_axis

coordinate axis orthogonal to which slice is rendered

Definition at line 101 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ slice_coordinate

float cgv::render::volume_render_style::slice_coordinate

coordinate value along axis defining slice in range [0,1]

Definition at line 103 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ slice_opacity

float cgv::render::volume_render_style::slice_opacity

in case of transparent mode, slice opacity

Definition at line 105 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ specular_color_mix

float cgv::render::volume_render_style::specular_color_mix

material specular color mix factor (0 = color from transfer function, 1 = pure white)

Definition at line 74 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ specular_strength

float cgv::render::volume_render_style::specular_strength

material specular component strength

Definition at line 70 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::enable(), and volume_render_style().

◆ use_gradient_texture

bool cgv::render::volume_render_style::use_gradient_texture

whether to use a supplied gradient texture or compute gradients on the fly via central differences (default)

Definition at line 62 of file volume_renderer.h.

Referenced by cgv::gui::volume_render_style_gui_creator::create(), cgv::render::volume_renderer::update_defines(), and volume_render_style().


The documentation for this struct was generated from the following files: