pub struct VolumeRenderParams {
pub color_tf: ColorTransferFunction,
pub opacity_tf: OpacityTransferFunction,
pub gradient_opacity_tf: Option<OpacityTransferFunction>,
pub window_level: Option<WindowLevel>,
pub blend_mode: BlendMode,
pub interpolation: Interpolation,
pub shading: Option<ShadingParams>,
pub step_size_factor: f32,
pub clip_planes: Vec<ClipPlane>,
pub cropping_bounds: Option<Aabb>,
pub background: [f32; 4],
}Expand description
All parameters that control how a volume is rendered.
Built using a fluent builder pattern. Start from VolumeRenderParams::builder
or use VolumeRenderParams::default.
Fields§
§color_tf: ColorTransferFunctionColour transfer function.
opacity_tf: OpacityTransferFunctionOpacity transfer function.
gradient_opacity_tf: Option<OpacityTransferFunction>Optional gradient opacity modulation.
window_level: Option<WindowLevel>Window/level mapping (applied before TF lookup).
blend_mode: BlendModeCompositing algorithm.
interpolation: InterpolationTexture interpolation quality.
shading: Option<ShadingParams>Phong shading — only used in BlendMode::Composite and BlendMode::Isosurface.
step_size_factor: f32Raycasting step size as a fraction of the smallest voxel spacing (default 0.5).
clip_planes: Vec<ClipPlane>Up to 6 world-space clip planes.
cropping_bounds: Option<Aabb>Optional axis-aligned cropping box in world coordinates.
background: [f32; 4]Background colour RGBA in [0, 1].
Implementations§
Source§impl VolumeRenderParams
impl VolumeRenderParams
Sourcepub fn builder() -> VolumeRenderParamsBuilder
pub fn builder() -> VolumeRenderParamsBuilder
Start building a new parameter set from the defaults.
Trait Implementations§
Source§impl Clone for VolumeRenderParams
impl Clone for VolumeRenderParams
Source§fn clone(&self) -> VolumeRenderParams
fn clone(&self) -> VolumeRenderParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VolumeRenderParams
impl Debug for VolumeRenderParams
Auto Trait Implementations§
impl Freeze for VolumeRenderParams
impl RefUnwindSafe for VolumeRenderParams
impl Send for VolumeRenderParams
impl Sync for VolumeRenderParams
impl Unpin for VolumeRenderParams
impl UnsafeUnpin for VolumeRenderParams
impl UnwindSafe for VolumeRenderParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more