Package sc.fiji.snt.viewer
Class Bvv.Keyframe
java.lang.Object
sc.fiji.snt.viewer.Bvv.Keyframe
- Enclosing class:
Bvv
A snapshot of the BVV viewer state at a particular moment, used as a
keyframe for movie recording. Captures the viewer transform, camera/slab
parameters (
dCam, nearClip, farClip), and which
"actors" (volume channels, paths, annotations) are visible.
Keyframes are serialized/deserialized via toString() and
fromString(String) so they can be dumped to the console with
the K hotkey and pasted into scripts.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intintEasing type for the transition into this keyframe (0-5).final doubleCamera depth parameter (perspective).final doubleFar clipping distance (slab back).intNumber of frames for the transition from the previous keyframe into this one.final doubleNear clipping distance (slab front).final net.imglib2.realtransform.AffineTransform3DViewer transform (camera position + zoom + rotation).Names of visible actors (e.g. -
Constructor Summary
ConstructorsConstructorDescriptionConvenience constructor that deserializes a keyframe from a string.Keyframe(net.imglib2.realtransform.AffineTransform3D transform, double dCam, double nearClip, double farClip, Set<String> visibleActors, int accelType) Keyframe(net.imglib2.realtransform.AffineTransform3D transform, double dCam, double nearClip, double farClip, Set<String> visibleActors, int accelType, int frames) -
Method Summary
Modifier and TypeMethodDescriptionstatic Bvv.KeyframefromString(String s) Deserializes a keyframe from the string produced bytoString().Returns the current easing type as a human-readable name.voidSets the easing type by name.toString()Serializes this keyframe to a single-line string:transform=d0,d1,...,d11|cam=dCam,near,far|visible=a;b;c|accel=N
-
Field Details
-
transform
public final net.imglib2.realtransform.AffineTransform3D transformViewer transform (camera position + zoom + rotation). -
dCam
public final double dCamCamera depth parameter (perspective). -
nearClip
public final double nearClipNear clipping distance (slab front). -
farClip
public final double farClipFar clipping distance (slab back). -
visibleActors
Names of visible actors (e.g. "vol:Sample#1", "paths", "annotations"). -
accelType
public int accelTypeEasing type for the transition into this keyframe (0-5). Can be set by name viasetAccel(String).- See Also:
-
ACCEL_SYMMETRIC
public static final int ACCEL_SYMMETRIC- See Also:
-
ACCEL_SLOW_START
public static final int ACCEL_SLOW_START- See Also:
-
ACCEL_SLOW_END
public static final int ACCEL_SLOW_END- See Also:
-
ACCEL_SOFT_SYMMETRIC
public static final int ACCEL_SOFT_SYMMETRIC- See Also:
-
ACCEL_SOFT_SLOW_START
public static final int ACCEL_SOFT_SLOW_START- See Also:
-
ACCEL_SOFT_SLOW_END
public static final int ACCEL_SOFT_SLOW_END- See Also:
-
frames
public int framesNumber of frames for the transition from the previous keyframe into this one. Ignored for the first keyframe in a sequence. Defaults to 60 (~2 s at 30 fps).
-
-
Constructor Details
-
Keyframe
Convenience constructor that deserializes a keyframe from a string. Equivalent tofromString(String)but usable asnew Keyframe("transform=...|cam=...|...")in scripts.- Parameters:
serialized- the string produced bytoString()- Throws:
IllegalArgumentException- if parsing fails
-
Keyframe
-
Keyframe
-
-
Method Details
-
setAccel
Sets the easing type by name. Accepted values (case-insensitive, spaces or underscores): "symmetric", "slow_start" / "slow start", "slow_end", "soft_symmetric", "soft_slow_start", "soft_slow_end".- Parameters:
name- the easing name- Throws:
IllegalArgumentException- if the name is not recognized
-
getAccelName
Returns the current easing type as a human-readable name.- Returns:
- the easing name, e.g. "slow start"
-
toString
Serializes this keyframe to a single-line string:transform=d0,d1,...,d11|cam=dCam,near,far|visible=a;b;c|accel=N -
fromString
Deserializes a keyframe from the string produced bytoString().- Parameters:
s- the serialised keyframe string- Returns:
- a new Keyframe, or
nullif parsing fails
-