Package sc.fiji.snt.viewer
Class Bvv.PathRenderingOptions
java.lang.Object
sc.fiji.snt.viewer.Bvv.PathRenderingOptions
- Enclosing class:
Bvv
Configuration options for path rendering.
Controls thickness, transparency, and other visual properties.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears slab Z bounds (reverts to no slab culling).floatGets the maximum thickness for path rendering.floatGets the minimum thickness for path rendering.doubledoublefloatGets the thickness multiplier for path rendering.floatGets the transparency level for path rendering.booleanReturnstrueif annotation/marker rendering is restricted to the slab Z range.booleanReturnstrueif path rendering is restricted to the slab Z range.booleanGets whether 'clipped visibility' is enabledbooleanReturns whether paths are rendered as tapered frustums (true) or simple lines (false).booleanGets whether to use path radius for thickness calculation.voidsetClipAnnotationsToSlab(boolean clip) Restricts annotation/marker rendering to the slab Z range whentrue.voidsetClipPathsToSlab(boolean clip) Restricts path rendering to the slab Z range whentrue.voidsetClippingDistance(float clippingDistance) Enables or disables 'clipped visibility' for path overlays.voidsetDisplayRadii(boolean displayRadii) Controls whether paths are rendered as tapered frustums with per-node radii (true) or as simple anti-aliased lines (false).voidsetMaxThickness(float maxThickness) Sets the maximum thickness for path rendering.voidsetMinThickness(float minThickness) Sets the minimum thickness for path rendering.voidsetSlabZBounds(double zMin, double zMax) Sets the world-Z bounds of the current slab.voidsetThicknessMultiplier(float multiplier) Sets the thickness multiplier for path rendering.voidsetTransparency(float transparency) Sets the transparency level for path rendering.voidsetUsePathRadius(boolean usePathRadius) Sets whether to use path radius for thickness calculation.
-
Field Details
-
fallbackColor
-
-
Constructor Details
-
PathRenderingOptions
public PathRenderingOptions()
-
-
Method Details
-
getThicknessMultiplier
public float getThicknessMultiplier()Gets the thickness multiplier for path rendering.- Returns:
- thickness multiplier (default: 1.0)
-
setThicknessMultiplier
public void setThicknessMultiplier(float multiplier) Sets the thickness multiplier for path rendering.- Parameters:
multiplier- thickness multiplier (1.0 = normal, 2.0 = double thickness, etc.)
-
getTransparency
public float getTransparency()Gets the transparency level for path rendering.- Returns:
- transparency (1.0 = opaque, 0.0 = fully transparent)
-
setTransparency
public void setTransparency(float transparency) Sets the transparency level for path rendering.- Parameters:
transparency- transparency level (1.0 = opaque, 0.0 = fully transparent)
-
isUsePathRadius
public boolean isUsePathRadius()Gets whether to use path radius for thickness calculation.- Returns:
- true if using path radius
-
setUsePathRadius
public void setUsePathRadius(boolean usePathRadius) Sets whether to use path radius for thickness calculation.- Parameters:
usePathRadius- true to use path radius, false for uniform thickness
-
getMinThickness
public float getMinThickness()Gets the minimum thickness for path rendering.- Returns:
- minimum thickness in pixels
-
setMinThickness
public void setMinThickness(float minThickness) Sets the minimum thickness for path rendering.- Parameters:
minThickness- minimum thickness in physical (world-space) units
-
getMaxThickness
public float getMaxThickness()Gets the maximum thickness for path rendering.- Returns:
- maximum thickness in pixels
-
setMaxThickness
public void setMaxThickness(float maxThickness) Sets the maximum thickness for path rendering.- Parameters:
maxThickness- maximum thickness in pixels
-
isDisplayRadii
public boolean isDisplayRadii()Returns whether paths are rendered as tapered frustums (true) or simple lines (false). Line rendering is dramatically faster for large datasets.- Returns:
- true if frustum/radius rendering is active
-
setDisplayRadii
public void setDisplayRadii(boolean displayRadii) Controls whether paths are rendered as tapered frustums with per-node radii (true) or as simple anti-aliased lines (false).Line rendering uses Java2D's
BasicStrokewithROUND_CAP/ROUND_JOIN, which is GPU-accelerated and avoids all manual geometry and per-nodefillOvalcalls. This is the preferred mode for datasets with many paths.- Parameters:
displayRadii-truefor frustum rendering,falsefor fast line rendering
-
setClippingDistance
public void setClippingDistance(float clippingDistance) Enables or disables 'clipped visibility' for path overlays. When enabled, only path nodes within the specified distance from cursor are displayed. When disabled, paths are always visible regardless of cursor positon- Parameters:
clippingDistance- the clippingDistance (in real world units). Set to zero to disable clipping
-
isClippingEnabled
public boolean isClippingEnabled()Gets whether 'clipped visibility' is enabled- Returns:
- true if persistent visibility is enabled
- See Also:
-
setSlabZBounds
public void setSlabZBounds(double zMin, double zMax) Sets the world-Z bounds of the current slab. Called by the slab position/ thickness controls so the overlay renderer can cull paths outside the slab. -
clearSlabZBounds
public void clearSlabZBounds()Clears slab Z bounds (reverts to no slab culling). -
isClipPathsToSlab
public boolean isClipPathsToSlab()Returnstrueif path rendering is restricted to the slab Z range. -
setClipPathsToSlab
public void setClipPathsToSlab(boolean clip) Restricts path rendering to the slab Z range whentrue. -
isClipAnnotationsToSlab
public boolean isClipAnnotationsToSlab()Returnstrueif annotation/marker rendering is restricted to the slab Z range. -
setClipAnnotationsToSlab
public void setClipAnnotationsToSlab(boolean clip) Restricts annotation/marker rendering to the slab Z range whentrue. -
getSlabZMin
public double getSlabZMin() -
getSlabZMax
public double getSlabZMax()
-